diff --git a/package-lock.json b/package-lock.json index 148919b..db4509f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2850 +1,4250 @@ { - "name": "script", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "script", - "license": "MIT", - "dependencies": { - "@prisma/client": "5.15.0", - "dotenv": "^16.4.5", - "drizzle-orm": "^0.31.2", - "fast-csv": "^5.0.1", - "mysql2": "^3.10.2", - "pg": "^8.12.0", - "pg-native": "^3.1.0", - "postgres": "^3.4.4", - "reflect-metadata": "^0.2.2", - "typeorm": "^0.3.20" - }, - "devDependencies": { - "@faker-js/faker": "^8.4.1", - "@types/faker": "^6.6.9", - "@types/node": "20.14.7", - "drizzle-kit": "^0.22.7", - "prisma": "5.15.0", - "ts-node": "10.9.2", - "typescript": "5.5.2" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "devOptional": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz", - "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==", - "dev": true, - "dependencies": { - "esbuild": "~0.18.20", - "source-map-support": "^0.5.21" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "node_modules/@esbuild-kit/esm-loader": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz", - "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==", - "dev": true, - "dependencies": { - "@esbuild-kit/core-utils": "^3.3.2", - "get-tsconfig": "^4.7.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@faker-js/faker": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz", - "integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/fakerjs" - } - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0", - "npm": ">=6.14.13" - } - }, - "node_modules/@fast-csv/format": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", - "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", - "dependencies": { - "lodash.escaperegexp": "^4.1.2", - "lodash.isboolean": "^3.0.3", - "lodash.isequal": "^4.5.0", - "lodash.isfunction": "^3.0.9", - "lodash.isnil": "^4.0.0" - } - }, - "node_modules/@fast-csv/parse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", - "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", - "dependencies": { - "lodash.escaperegexp": "^4.1.2", - "lodash.groupby": "^4.6.0", - "lodash.isfunction": "^3.0.9", - "lodash.isnil": "^4.0.0", - "lodash.isundefined": "^3.0.1", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "devOptional": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "devOptional": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "devOptional": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@prisma/client": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.15.0.tgz", - "integrity": "sha512-wPTeTjbd2Q0abOeffN7zCDCbkp9C9cF+e9HPiI64lmpehyq2TepgXE+sY7FXr7Rhbb21prLMnhXX27/E11V09w==", - "hasInstallScript": true, - "engines": { - "node": ">=16.13" - }, - "peerDependencies": { - "prisma": "*" - }, - "peerDependenciesMeta": { - "prisma": { - "optional": true - } - } - }, - "node_modules/@prisma/debug": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.15.0.tgz", - "integrity": "sha512-QpEAOjieLPc/4sMny/WrWqtpIAmBYsgqwWlWwIctqZO0AbhQ9QcT6x2Ut3ojbDo/pFRCCA1Z1+xm2MUy7fAkZA==", - "devOptional": true - }, - "node_modules/@prisma/engines": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.15.0.tgz", - "integrity": "sha512-hXL5Sn9hh/ZpRKWiyPA5GbvF3laqBHKt6Vo70hYqqOhh5e0ZXDzHcdmxNvOefEFeqxra2DMz2hNbFoPvqrVe1w==", - "devOptional": true, - "hasInstallScript": true, - "dependencies": { - "@prisma/debug": "5.15.0", - "@prisma/engines-version": "5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", - "@prisma/fetch-engine": "5.15.0", - "@prisma/get-platform": "5.15.0" - } - }, - "node_modules/@prisma/engines-version": { - "version": "5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022.tgz", - "integrity": "sha512-3BEgZ41Qb4oWHz9kZNofToRvNeS4LZYaT9pienR1gWkjhky6t6K1NyeWNBkqSj2llgraUNbgMOCQPY4f7Qp5wA==", - "devOptional": true - }, - "node_modules/@prisma/fetch-engine": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.15.0.tgz", - "integrity": "sha512-z6AY5yyXxc20Klj7wwnfGP0iIUkVKzybqapT02zLYR/nf9ynaeN8bq73WRmi1TkLYn+DJ5Qy+JGu7hBf1pE78A==", - "devOptional": true, - "dependencies": { - "@prisma/debug": "5.15.0", - "@prisma/engines-version": "5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", - "@prisma/get-platform": "5.15.0" - } - }, - "node_modules/@prisma/get-platform": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.15.0.tgz", - "integrity": "sha512-1GULDkW4+/VQb73vihxCBSc4Chc2x88MA+O40tcZFjmBzG4/fF44PaXFxUqKSFltxU9L9GIMLhh0Gfkk/pUbtg==", - "devOptional": true, - "dependencies": { - "@prisma/debug": "5.15.0" - } - }, - "node_modules/@sqltools/formatter": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", - "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==" - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "devOptional": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "devOptional": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "devOptional": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "devOptional": true - }, - "node_modules/@types/faker": { - "version": "6.6.9", - "resolved": "https://registry.npmjs.org/@types/faker/-/faker-6.6.9.tgz", - "integrity": "sha512-Y9YYm5L//8ooiiknO++4Gr539zzdI0j3aXnOBjo1Vk+kTvffY10GuE2wn78AFPECwZ5MYGTjiDVw1naLLdDimw==", - "deprecated": "This is a stub types definition. faker provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "faker": "*" - } - }, - "node_modules/@types/node": { - "version": "20.14.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.7.tgz", - "integrity": "sha512-uTr2m2IbJJucF3KUxgnGOZvYbN0QgkGyWxG6973HCpMYFy2KfcgYuIwkJQMQkt1VbBMlvWRbpshFTLxnxCZjKQ==", - "devOptional": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "devOptional": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", - "devOptional": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" - }, - "node_modules/app-root-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", - "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "devOptional": true - }, - "node_modules/aws-ssl-profiles": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.1.tgz", - "integrity": "sha512-+H+kuK34PfMaI9PNU/NSjBKL5hh/KDM9J72kwYeYEm0A8B1AC4fuCy3qsjnA7lxklgyXsB68yn8Z2xoZEjgwCQ==", - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cli-highlight/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/cli-highlight/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-highlight/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "devOptional": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dayjs": { - "version": "1.11.12", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", - "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==" - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "devOptional": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/drizzle-kit": { - "version": "0.22.8", - "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.22.8.tgz", - "integrity": "sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ==", - "dev": true, - "dependencies": { - "@esbuild-kit/esm-loader": "^2.5.5", - "esbuild": "^0.19.7", - "esbuild-register": "^3.5.0" - }, - "bin": { - "drizzle-kit": "bin.cjs" - } - }, - "node_modules/drizzle-orm": { - "version": "0.31.4", - "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.31.4.tgz", - "integrity": "sha512-VGD9SH9aStF2z4QOTnVlVX/WghV/EnuEzTmsH3fSVp2E4fFgc8jl3viQrS/XUJx1ekW4rVVLJMH42SfGQdjX3Q==", - "peerDependencies": { - "@aws-sdk/client-rds-data": ">=3", - "@cloudflare/workers-types": ">=3", - "@electric-sql/pglite": ">=0.1.1", - "@libsql/client": "*", - "@neondatabase/serverless": ">=0.1", - "@op-engineering/op-sqlite": ">=2", - "@opentelemetry/api": "^1.4.1", - "@planetscale/database": ">=1", - "@prisma/client": "*", - "@tidbcloud/serverless": "*", - "@types/better-sqlite3": "*", - "@types/pg": "*", - "@types/react": ">=18", - "@types/sql.js": "*", - "@vercel/postgres": ">=0.8.0", - "@xata.io/client": "*", - "better-sqlite3": ">=7", - "bun-types": "*", - "expo-sqlite": ">=13.2.0", - "knex": "*", - "kysely": "*", - "mysql2": ">=2", - "pg": ">=8", - "postgres": ">=3", - "react": ">=18", - "sql.js": ">=1", - "sqlite3": ">=5" - }, - "peerDependenciesMeta": { - "@aws-sdk/client-rds-data": { - "optional": true - }, - "@cloudflare/workers-types": { - "optional": true - }, - "@electric-sql/pglite": { - "optional": true - }, - "@libsql/client": { - "optional": true - }, - "@neondatabase/serverless": { - "optional": true - }, - "@op-engineering/op-sqlite": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@prisma/client": { - "optional": true - }, - "@tidbcloud/serverless": { - "optional": true - }, - "@types/better-sqlite3": { - "optional": true - }, - "@types/pg": { - "optional": true - }, - "@types/react": { - "optional": true - }, - "@types/sql.js": { - "optional": true - }, - "@vercel/postgres": { - "optional": true - }, - "@xata.io/client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "bun-types": { - "optional": true - }, - "expo-sqlite": { - "optional": true - }, - "knex": { - "optional": true - }, - "kysely": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "pg": { - "optional": true - }, - "postgres": { - "optional": true - }, - "prisma": { - "optional": true + "name": "script", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "script", + "license": "MIT", + "dependencies": { + "@prisma/client": "^6.17.1", + "@zenstackhq/runtime": "next", + "dotenv": "^16.4.5", + "drizzle-orm": "^0.44.6", + "fast-csv": "^5.0.1", + "mysql2": "^3.10.2", + "pg": "^8.16.3", + "pg-native": "^3.1.0", + "postgres": "^3.4.4", + "reflect-metadata": "^0.2.2", + "typeorm": "^0.3.27" + }, + "devDependencies": { + "@faker-js/faker": "^8.4.1", + "@types/faker": "^6.6.9", + "@types/node": "20.14.7", + "@types/pg": "^8.15.5", + "@zenstackhq/cli": "next", + "drizzle-kit": "^0.31.5", + "prisma": "^6.17.1", + "ts-node": "^10.9.2", + "typescript": "^5.9.3" + } }, - "react": { - "optional": true + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } }, - "sql.js": { - "optional": true + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } }, - "sqlite3": { - "optional": true - } - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" - }, - "node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" - } - }, - "node_modules/esbuild-register": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.5.0.tgz", - "integrity": "sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "peerDependencies": { - "esbuild": ">=0.12 <1" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/faker": { - "version": "6.6.6", - "resolved": "https://registry.npmjs.org/faker/-/faker-6.6.6.tgz", - "integrity": "sha512-9tCqYEDHI5RYFQigXFwF1hnCwcWCOJl/hmll0lr5D2Ljjb0o4wphb69wikeJDz5qCEzXCoPvG6ss5SDP6IfOdg==", - "dev": true - }, - "node_modules/fast-csv": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.1.tgz", - "integrity": "sha512-Q43zC4NdQD5MAWOVQOF8KA+D6ddvTJjX2ib8zqysm74jZhtk6+dc8C75/OqRV6Y9CLc4kgvbC3PLG8YL4YZfgw==", - "dependencies": { - "@fast-csv/format": "5.0.0", - "@fast-csv/parse": "5.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", - "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", - "dev": true, - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "engines": { - "node": "*" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/libpq": { - "version": "1.8.13", - "resolved": "https://registry.npmjs.org/libpq/-/libpq-1.8.13.tgz", - "integrity": "sha512-t1wpnGVgwRIFSKoe4RFUllAFj953kNMcdXhGvFJwI0r6lJQqgSwTeiIciaCinjOmHk0HnFeWQSMC6Uw2591G4A==", - "hasInstallScript": true, - "dependencies": { - "bindings": "1.5.0", - "nan": "2.19.0" - } - }, - "node_modules/lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" - }, - "node_modules/lodash.groupby": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", - "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" - }, - "node_modules/lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" - }, - "node_modules/lodash.isnil": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", - "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" - }, - "node_modules/lodash.isundefined": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", - "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" - }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "engines": { - "node": ">=16.14" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "devOptional": true - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/mysql2": { - "version": "3.10.3", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.3.tgz", - "integrity": "sha512-k43gmH9i79rZD4hGPdj7pDuT0UBiFjs4UzXEy1cJrV0QqcSABomoLwvejqdbcXN+Vd7gi999CVM6o9vCPKq29g==", - "dependencies": { - "aws-ssl-profiles": "^1.1.1", - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/named-placeholders": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", - "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/nan": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", - "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" - }, - "node_modules/pg": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", - "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", - "dependencies": { - "pg-connection-string": "^2.6.4", - "pg-pool": "^3.6.2", - "pg-protocol": "^1.6.1", - "pg-types": "^2.1.0", - "pgpass": "1.x" - }, - "engines": { - "node": ">= 8.0.0" - }, - "optionalDependencies": { - "pg-cloudflare": "^1.1.1" - }, - "peerDependencies": { - "pg-native": ">=3.0.1" - }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - } - }, - "node_modules/pg-cloudflare": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", - "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", - "optional": true - }, - "node_modules/pg-connection-string": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", - "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==" - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-native": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pg-native/-/pg-native-3.1.0.tgz", - "integrity": "sha512-nhMf/d6ypOc6jtUYlfGkLyPkYK+boor0FziOcsnqVxQZlGIXjBlSp3bNkW27O1RN46JlupjziIr1NP3aCCyWOw==", - "dependencies": { - "libpq": "1.8.13", - "pg-types": "^1.12.1", - "readable-stream": "1.0.31" - } - }, - "node_modules/pg-native/node_modules/pg-types": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-1.13.0.tgz", - "integrity": "sha512-lfKli0Gkl/+za/+b6lzENajczwZHc7D5kiUCZfgm914jipD2kIOIvEkAhZ8GrW3/TUoP9w8FHjwpPObBye5KQQ==", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~1.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.0", - "postgres-interval": "^1.1.0" - } - }, - "node_modules/pg-native/node_modules/postgres-array": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-1.0.3.tgz", - "integrity": "sha512-5wClXrAP0+78mcsNX3/ithQ5exKvCyK5lr5NEEEeGwwM6NJdQgzIJBVxLvRW+huFpX92F2QnZ5CcokH0VhK2qQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pg-pool": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", - "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", - "peerDependencies": { - "pg": ">=8.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", - "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==" - }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pgpass": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", - "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", - "dependencies": { - "split2": "^4.1.0" - } - }, - "node_modules/postgres": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.4.tgz", - "integrity": "sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==", - "engines": { - "node": ">=12" - }, - "funding": { - "type": "individual", - "url": "https://github.com/sponsors/porsager" - } - }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prisma": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.15.0.tgz", - "integrity": "sha512-JA81ACQSCi3a7NUOgonOIkdx8PAVkO+HbUOxmd00Yb8DgIIEpr2V9+Qe/j6MLxIgWtE/OtVQ54rVjfYRbZsCfw==", - "devOptional": true, - "hasInstallScript": true, - "dependencies": { - "@prisma/engines": "5.15.0" - }, - "bin": { - "prisma": "build/index.js" - }, - "engines": { - "node": ">=16.13" - } - }, - "node_modules/readable-stream": { - "version": "1.0.31", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", - "integrity": "sha512-tco/Dwv1f/sgIgN6CWdj/restacPKNskK6yps1981ivH2ZmLYcs5o5rVzL3qaO/cSkhN8hYOMWs7+glzOLSgRg==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/reflect-metadata": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/seq-queue": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", - "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/sqlstring": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", - "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "devOptional": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/typeorm": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.20.tgz", - "integrity": "sha512-sJ0T08dV5eoZroaq9uPKBoNcGslHBR4E4y+EBHs//SiGbblGe7IeduP/IH4ddCcj0qp3PHwDwGnuvqEAnKlq/Q==", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "dayjs": "^1.11.9", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^10.3.10", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.2.1", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">=16.13.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0 || ^9.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.8.0", - "mssql": "^9.1.1 || ^10.0.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^6.3.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "devOptional": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@drizzle-team/brocli": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz", + "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@esbuild-kit/core-utils": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz", + "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==", + "dev": true, + "dependencies": { + "esbuild": "~0.18.20", + "source-map-support": "^0.5.21" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/@esbuild-kit/esm-loader": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz", + "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==", + "dev": true, + "dependencies": { + "@esbuild-kit/core-utils": "^3.3.2", + "get-tsconfig": "^4.7.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", + "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", + "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", + "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", + "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", + "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", + "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", + "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", + "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", + "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", + "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", + "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", + "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", + "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", + "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", + "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", + "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", + "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", + "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", + "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", + "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", + "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", + "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", + "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", + "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", + "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", + "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@faker-js/faker": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz", + "integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, + "node_modules/@fast-csv/format": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", + "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", + "dependencies": { + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + } + }, + "node_modules/@fast-csv/parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", + "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", + "dependencies": { + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "devOptional": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "devOptional": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "devOptional": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@paralleldrive/cuid2": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz", + "integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.1.5" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@prisma/client": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.17.1.tgz", + "integrity": "sha512-zL58jbLzYamjnNnmNA51IOZdbk5ci03KviXCuB0Tydc9btH2kDWsi1pQm2VecviRTM7jGia0OPPkgpGnT3nKvw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@prisma/config": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.17.1.tgz", + "integrity": "sha512-fs8wY6DsvOCzuiyWVckrVs1LOcbY4LZNz8ki4uUIQ28jCCzojTGqdLhN2Jl5lDnC1yI8/gNIKpsWDM8pLhOdwA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "c12": "3.1.0", + "deepmerge-ts": "7.1.5", + "effect": "3.16.12", + "empathic": "2.0.0" + } + }, + "node_modules/@prisma/debug": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.17.1.tgz", + "integrity": "sha512-Vf7Tt5Wh9XcndpbmeotuqOMLWPTjEKCsgojxXP2oxE1/xYe7PtnP76hsouG9vis6fctX+TxgmwxTuYi/+xc7dQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.17.1.tgz", + "integrity": "sha512-D95Ik3GYZkqZ8lSR4EyFOJ/tR33FcYRP8kK61o+WMsyD10UfJwd7+YielflHfKwiGodcqKqoraWw8ElAgMDbPw==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.17.1", + "@prisma/engines-version": "6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", + "@prisma/fetch-engine": "6.17.1", + "@prisma/get-platform": "6.17.1" + } + }, + "node_modules/@prisma/engines-version": { + "version": "6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac.tgz", + "integrity": "sha512-17140E3huOuD9lMdJ9+SF/juOf3WR3sTJMVyyenzqUPbuH+89nPhSWcrY+Mf7tmSs6HvaO+7S+HkELinn6bhdg==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.17.1.tgz", + "integrity": "sha512-AYZiHOs184qkDMiTeshyJCtyL4yERkjfTkJiSJdYuSfc24m94lTNL5+GFinZ6vVz+ktX4NJzHKn1zIFzGTWrWg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.17.1", + "@prisma/engines-version": "6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", + "@prisma/get-platform": "6.17.1" + } + }, + "node_modules/@prisma/get-platform": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.17.1.tgz", + "integrity": "sha512-AKEn6fsfz0r482S5KRDFlIGEaq9wLNcgalD1adL+fPcFFblIKs1sD81kY/utrHdqKuVC6E1XSRpegDK3ZLL4Qg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.17.1" + } + }, + "node_modules/@sqltools/formatter": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", + "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==" + }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "devOptional": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "devOptional": true + }, + "node_modules/@types/faker": { + "version": "6.6.9", + "resolved": "https://registry.npmjs.org/@types/faker/-/faker-6.6.9.tgz", + "integrity": "sha512-Y9YYm5L//8ooiiknO++4Gr539zzdI0j3aXnOBjo1Vk+kTvffY10GuE2wn78AFPECwZ5MYGTjiDVw1naLLdDimw==", + "deprecated": "This is a stub types definition. faker provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "faker": "*" + } + }, + "node_modules/@types/node": { + "version": "20.14.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.7.tgz", + "integrity": "sha512-uTr2m2IbJJucF3KUxgnGOZvYbN0QgkGyWxG6973HCpMYFy2KfcgYuIwkJQMQkt1VbBMlvWRbpshFTLxnxCZjKQ==", + "devOptional": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/pg": { + "version": "8.15.5", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.5.tgz", + "integrity": "sha512-LF7lF6zWEKxuT3/OR8wAZGzkg4ENGXFNyiV/JeOt9z5B+0ZVwbql9McqX5c/WStFq1GaGso7H1AzP/qSzmlCKQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^2.2.0" + } + }, + "node_modules/@zenstackhq/cli": { + "version": "3.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/cli/-/cli-3.0.0-beta.12.tgz", + "integrity": "sha512-auBhivS9PtW+lb0rvMSMcweQbK1BHXC4fbsjizl4YQEEbjyGoSWwTUHxFIhNCRvrsfrCMx3B1fnsdwbKgnMaqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zenstackhq/common-helpers": "3.0.0-beta.12", + "@zenstackhq/language": "3.0.0-beta.12", + "@zenstackhq/sdk": "3.0.0-beta.12", + "colors": "1.4.0", + "commander": "^8.3.0", + "langium": "3.5.0", + "mixpanel": "^0.18.1", + "ora": "^5.4.1", + "package-manager-detector": "^1.3.0", + "semver": "^7.7.2", + "ts-pattern": "^5.7.1" + }, + "bin": { + "zen": "bin/cli", + "zenstack": "bin/cli" + }, + "peerDependencies": { + "prisma": "^6.10.0" + } + }, + "node_modules/@zenstackhq/common-helpers": { + "version": "3.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/common-helpers/-/common-helpers-3.0.0-beta.12.tgz", + "integrity": "sha512-bYuSEP0VLhqoLSV4LUkBiYO/osfUyZoqQBy+o7iZ8XAqF5oWur52/JzEpTU3hO0PMV2qFzSMTlf8tj12cC11sA==", + "license": "MIT" + }, + "node_modules/@zenstackhq/language": { + "version": "3.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/language/-/language-3.0.0-beta.12.tgz", + "integrity": "sha512-JDDfutzYiohDkzy8sr3R79IfO5hThgD7wa+4YCzJkvClx93PtcIrsp3OiFdjIi2I4ADjH0q8kpzVXeMW/efkpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "langium": "3.5.0", + "pluralize": "^8.0.0", + "ts-pattern": "^5.7.1" + } + }, + "node_modules/@zenstackhq/runtime": { + "version": "3.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-3.0.0-beta.12.tgz", + "integrity": "sha512-kh+Xm00u2+Hrhy6M9KDFGLlRyogt1xbw0brzuhSiZilraycaWq/jRuesmpb9RTPH4HAwYZB91swVhztoKTBr6w==", + "license": "MIT", + "dependencies": { + "@paralleldrive/cuid2": "^2.2.2", + "@zenstackhq/common-helpers": "3.0.0-beta.12", + "decimal.js": "^10.4.3", + "json-stable-stringify": "^1.3.0", + "nanoid": "^5.0.9", + "toposort": "^2.0.2", + "ts-pattern": "^5.7.1", + "ulid": "^3.0.0", + "uuid": "^11.0.5", + "zod-validation-error": "^4.0.1" + }, + "peerDependencies": { + "better-sqlite3": "^12.2.0", + "kysely": "^0.27.6", + "pg": "^8.13.1", + "zod": "^3.25.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "better-sqlite3": { + "optional": true + }, + "pg": { + "optional": true + } + } + }, + "node_modules/@zenstackhq/sdk": { + "version": "3.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/sdk/-/sdk-3.0.0-beta.12.tgz", + "integrity": "sha512-i2hayz2bd2jfEgyINQRKOOzd21wuk6F/khcK5JDEwvvY2v8w6scCeyI/E1xYfQB2Pfrs5bU24BI2HqLGwgw/qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zenstackhq/common-helpers": "3.0.0-beta.12", + "@zenstackhq/language": "3.0.0-beta.12", + "langium": "3.5.0", + "ts-pattern": "^5.7.1", + "typescript": "^5.8.0" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "devOptional": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "devOptional": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansis": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz", + "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==", + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "devOptional": true + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.1.tgz", + "integrity": "sha512-+H+kuK34PfMaI9PNU/NSjBKL5hh/KDM9J72kwYeYEm0A8B1AC4fuCy3qsjnA7lxklgyXsB68yn8Z2xoZEjgwCQ==", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bl/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/c12": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", + "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^16.6.1", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.4.2", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^2.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/confbox": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", + "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "devOptional": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dayjs": { + "version": "1.11.18", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz", + "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "license": "MIT" + }, + "node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge-ts": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", + "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "devOptional": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/drizzle-kit": { + "version": "0.31.5", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.5.tgz", + "integrity": "sha512-+CHgPFzuoTQTt7cOYCV6MOw2w8vqEn/ap1yv4bpZOWL03u7rlVRQhUY0WYT3rHsgVTXwYQDZaSUJSQrMBUKuWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@drizzle-team/brocli": "^0.10.2", + "@esbuild-kit/esm-loader": "^2.5.5", + "esbuild": "^0.25.4", + "esbuild-register": "^3.5.0" + }, + "bin": { + "drizzle-kit": "bin.cjs" + } + }, + "node_modules/drizzle-orm": { + "version": "0.44.6", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.44.6.tgz", + "integrity": "sha512-uy6uarrrEOc9K1u5/uhBFJbdF5VJ5xQ/Yzbecw3eAYOunv5FDeYkR2m8iitocdHBOHbvorviKOW5GVw0U1j4LQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@aws-sdk/client-rds-data": ">=3", + "@cloudflare/workers-types": ">=4", + "@electric-sql/pglite": ">=0.2.0", + "@libsql/client": ">=0.10.0", + "@libsql/client-wasm": ">=0.10.0", + "@neondatabase/serverless": ">=0.10.0", + "@op-engineering/op-sqlite": ">=2", + "@opentelemetry/api": "^1.4.1", + "@planetscale/database": ">=1.13", + "@prisma/client": "*", + "@tidbcloud/serverless": "*", + "@types/better-sqlite3": "*", + "@types/pg": "*", + "@types/sql.js": "*", + "@upstash/redis": ">=1.34.7", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", + "better-sqlite3": ">=7", + "bun-types": "*", + "expo-sqlite": ">=14.0.0", + "gel": ">=2", + "knex": "*", + "kysely": "*", + "mysql2": ">=2", + "pg": ">=8", + "postgres": ">=3", + "sql.js": ">=1", + "sqlite3": ">=5" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-rds-data": { + "optional": true + }, + "@cloudflare/workers-types": { + "optional": true + }, + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@libsql/client-wasm": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@prisma/client": { + "optional": true + }, + "@tidbcloud/serverless": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/pg": { + "optional": true + }, + "@types/sql.js": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "bun-types": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "gel": { + "optional": true + }, + "knex": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "postgres": { + "optional": true + }, + "prisma": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + } + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/effect": { + "version": "3.16.12", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.16.12.tgz", + "integrity": "sha512-N39iBk0K71F9nb442TLbTkjl24FLUzuvx2i1I2RsEAQsdAdUTuUoW0vlfUXgkMTUOnYqKnWcFfqw4hK4Pw27hg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/empathic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz", + "integrity": "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", + "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.11", + "@esbuild/android-arm": "0.25.11", + "@esbuild/android-arm64": "0.25.11", + "@esbuild/android-x64": "0.25.11", + "@esbuild/darwin-arm64": "0.25.11", + "@esbuild/darwin-x64": "0.25.11", + "@esbuild/freebsd-arm64": "0.25.11", + "@esbuild/freebsd-x64": "0.25.11", + "@esbuild/linux-arm": "0.25.11", + "@esbuild/linux-arm64": "0.25.11", + "@esbuild/linux-ia32": "0.25.11", + "@esbuild/linux-loong64": "0.25.11", + "@esbuild/linux-mips64el": "0.25.11", + "@esbuild/linux-ppc64": "0.25.11", + "@esbuild/linux-riscv64": "0.25.11", + "@esbuild/linux-s390x": "0.25.11", + "@esbuild/linux-x64": "0.25.11", + "@esbuild/netbsd-arm64": "0.25.11", + "@esbuild/netbsd-x64": "0.25.11", + "@esbuild/openbsd-arm64": "0.25.11", + "@esbuild/openbsd-x64": "0.25.11", + "@esbuild/openharmony-arm64": "0.25.11", + "@esbuild/sunos-x64": "0.25.11", + "@esbuild/win32-arm64": "0.25.11", + "@esbuild/win32-ia32": "0.25.11", + "@esbuild/win32-x64": "0.25.11" + } + }, + "node_modules/esbuild-register": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.5.0.tgz", + "integrity": "sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "peerDependencies": { + "esbuild": ">=0.12 <1" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/exsolve": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.7.tgz", + "integrity": "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/faker": { + "version": "6.6.6", + "resolved": "https://registry.npmjs.org/faker/-/faker-6.6.6.tgz", + "integrity": "sha512-9tCqYEDHI5RYFQigXFwF1hnCwcWCOJl/hmll0lr5D2Ljjb0o4wphb69wikeJDz5qCEzXCoPvG6ss5SDP6IfOdg==", + "dev": true + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fast-csv": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.1.tgz", + "integrity": "sha512-Q43zC4NdQD5MAWOVQOF8KA+D6ddvTJjX2ib8zqysm74jZhtk6+dc8C75/OqRV6Y9CLc4kgvbC3PLG8YL4YZfgw==", + "dependencies": { + "@fast-csv/format": "5.0.0", + "@fast-csv/parse": "5.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", + "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "devOptional": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/json-stable-stringify": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz", + "integrity": "sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/json-stable-stringify/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/kysely": { + "version": "0.27.6", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.27.6.tgz", + "integrity": "sha512-FIyV/64EkKhJmjgC0g2hygpBv5RNWVPyNCqSAD7eTCv6eFWNIi4PN1UvdSJGicN/o35bnevgis4Y0UDC0qi8jQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/langium": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/langium/-/langium-3.5.0.tgz", + "integrity": "sha512-tnqVzWOkUcoiY0bWlyE8diFrZjmGBCF7MesC1bjUaZM+YGQSfdPC+KkhmHM0DWFG+uLcPxidKaPP1SYGtg3J0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chevrotain": "~11.0.3", + "chevrotain-allstar": "~0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.11", + "vscode-uri": "~3.0.8" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/libpq": { + "version": "1.8.13", + "resolved": "https://registry.npmjs.org/libpq/-/libpq-1.8.13.tgz", + "integrity": "sha512-t1wpnGVgwRIFSKoe4RFUllAFj953kNMcdXhGvFJwI0r6lJQqgSwTeiIciaCinjOmHk0HnFeWQSMC6Uw2591G4A==", + "hasInstallScript": true, + "dependencies": { + "bindings": "1.5.0", + "nan": "2.19.0" + } + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" + }, + "node_modules/lodash.groupby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" + }, + "node_modules/lodash.isnil": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" + }, + "node_modules/lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "devOptional": true + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mixpanel": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/mixpanel/-/mixpanel-0.18.1.tgz", + "integrity": "sha512-YD1xfn6WP6ZLQ6Pmgh0KgdXhueJEsrodThMTsHzHMH0VbWa9ck8s+ynDtM83OSgt+yQ61W/SQNrH8Y4wIwocGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "https-proxy-agent": "5.0.0" + }, + "engines": { + "node": ">=10.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mysql2": { + "version": "3.10.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.3.tgz", + "integrity": "sha512-k43gmH9i79rZD4hGPdj7pDuT0UBiFjs4UzXEy1cJrV0QqcSABomoLwvejqdbcXN+Vd7gi999CVM6o9vCPKq29g==", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" + }, + "node_modules/nanoid": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.6.tgz", + "integrity": "sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/nypm": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.2.tgz", + "integrity": "sha512-7eM+hpOtrKrBDCh7Ypu2lJ9Z7PNZBdi/8AT3AX8xoCj43BBVHD0hPSTEvMtkMpfs8FCqBGhxB+uToIQimA111g==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.2", + "pathe": "^2.0.3", + "pkg-types": "^2.3.0", + "tinyexec": "^1.0.1" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, + "node_modules/package-manager-detector": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.5.0.tgz", + "integrity": "sha512-uBj69dVlYe/+wxj8JOpr97XfsxH/eumMt6HqjNTmJDf/6NO9s+0uxeOneIz3AsPt2m6y9PqzDzd3ATcU17MNfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/pg": { + "version": "8.16.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.16.3.tgz", + "integrity": "sha512-enxc1h0jA/aq5oSDMvqyW3q89ra6XIIDZgCX9vkMrnz5DFTw/Ny3Li2lFQ+pt3L6MCgm/5o2o8HW9hiJji+xvw==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.9.1", + "pg-pool": "^3.10.1", + "pg-protocol": "^1.10.3", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.2.7" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.7.tgz", + "integrity": "sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.1.tgz", + "integrity": "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-native": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pg-native/-/pg-native-3.1.0.tgz", + "integrity": "sha512-nhMf/d6ypOc6jtUYlfGkLyPkYK+boor0FziOcsnqVxQZlGIXjBlSp3bNkW27O1RN46JlupjziIr1NP3aCCyWOw==", + "dependencies": { + "libpq": "1.8.13", + "pg-types": "^1.12.1", + "readable-stream": "1.0.31" + } + }, + "node_modules/pg-native/node_modules/pg-types": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-1.13.0.tgz", + "integrity": "sha512-lfKli0Gkl/+za/+b6lzENajczwZHc7D5kiUCZfgm914jipD2kIOIvEkAhZ8GrW3/TUoP9w8FHjwpPObBye5KQQ==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~1.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.0", + "postgres-interval": "^1.1.0" + } + }, + "node_modules/pg-native/node_modules/postgres-array": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-1.0.3.tgz", + "integrity": "sha512-5wClXrAP0+78mcsNX3/ithQ5exKvCyK5lr5NEEEeGwwM6NJdQgzIJBVxLvRW+huFpX92F2QnZ5CcokH0VhK2qQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pg-pool": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.10.1.tgz", + "integrity": "sha512-Tu8jMlcX+9d8+QVzKIvM/uJtp07PKr82IUOYEphaWcoBhIYkoHpLXN3qO59nAI11ripznDsEzEv8nUxBVWajGg==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.10.3.tgz", + "integrity": "sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postgres": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.4.tgz", + "integrity": "sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prisma": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.17.1.tgz", + "integrity": "sha512-ac6h0sM1Tg3zu8NInY+qhP/S9KhENVaw9n1BrGKQVFu05JT5yT5Qqqmb8tMRIE3ZXvVj4xcRA5yfrsy4X7Yy5g==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/config": "6.17.1", + "@prisma/engines": "6.17.1" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/readable-stream": { + "version": "1.0.31", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", + "integrity": "sha512-tco/Dwv1f/sgIgN6CWdj/restacPKNskK6yps1981ivH2ZmLYcs5o5rVzL3qaO/cSkhN8hYOMWs7+glzOLSgRg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/sql-highlight": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sql-highlight/-/sql-highlight-6.1.0.tgz", + "integrity": "sha512-ed7OK4e9ywpE7pgRMkMQmZDPKSVdm0oX5IEtZiKnFucSF0zu6c80GZBe38UqHuVhTWJ9xsKgSMjCG2bml86KvA==", + "funding": [ + "https://github.com/scriptcoded/sql-highlight?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/scriptcoded" + } + ], + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyexec": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", + "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==", + "license": "MIT" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-pattern": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.8.0.tgz", + "integrity": "sha512-kIjN2qmWiHnhgr5DAkAafF9fwb0T5OhMVSWrm8XEdTFnX6+wfXwYOFjeF86UZ54vduqiR7BfqScFmXSzSaH8oA==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typeorm": { + "version": "0.3.27", + "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.27.tgz", + "integrity": "sha512-pNV1bn+1n8qEe8tUNsNdD8ejuPcMAg47u2lUGnbsajiNUr3p2Js1XLKQjBMH0yMRMDfdX8T+fIRejFmIwy9x4A==", + "license": "MIT", + "dependencies": { + "@sqltools/formatter": "^1.2.5", + "ansis": "^3.17.0", + "app-root-path": "^3.1.0", + "buffer": "^6.0.3", + "dayjs": "^1.11.13", + "debug": "^4.4.0", + "dedent": "^1.6.0", + "dotenv": "^16.4.7", + "glob": "^10.4.5", + "sha.js": "^2.4.12", + "sql-highlight": "^6.0.0", + "tslib": "^2.8.1", + "uuid": "^11.1.0", + "yargs": "^17.7.2" + }, + "bin": { + "typeorm": "cli.js", + "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", + "typeorm-ts-node-esm": "cli-ts-node-esm.js" + }, + "engines": { + "node": ">=16.13.0" + }, + "funding": { + "url": "https://opencollective.com/typeorm" + }, + "peerDependencies": { + "@google-cloud/spanner": "^5.18.0 || ^6.0.0 || ^7.0.0", + "@sap/hana-client": "^2.14.22", + "better-sqlite3": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0", + "ioredis": "^5.0.4", + "mongodb": "^5.8.0 || ^6.0.0", + "mssql": "^9.1.1 || ^10.0.1 || ^11.0.1", + "mysql2": "^2.2.5 || ^3.0.1", + "oracledb": "^6.3.0", + "pg": "^8.5.1", + "pg-native": "^3.0.0", + "pg-query-stream": "^4.0.0", + "redis": "^3.1.1 || ^4.0.0 || ^5.0.14", + "reflect-metadata": "^0.1.14 || ^0.2.0", + "sql.js": "^1.4.0", + "sqlite3": "^5.0.3", + "ts-node": "^10.7.0", + "typeorm-aurora-data-api-driver": "^2.0.0 || ^3.0.0" + }, + "peerDependenciesMeta": { + "@google-cloud/spanner": { + "optional": true + }, + "@sap/hana-client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mssql": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "oracledb": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-native": { + "optional": true + }, + "pg-query-stream": { + "optional": true + }, + "redis": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + }, + "ts-node": { + "optional": true + }, + "typeorm-aurora-data-api-driver": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ulid": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-3.0.1.tgz", + "integrity": "sha512-dPJyqPzx8preQhqq24bBG1YNkvigm87K8kVEHCD+ruZg24t6IFEFv00xMWfxcC4djmFtiTLdFuADn4+DOz6R7Q==", + "license": "MIT", + "bin": { + "ulid": "dist/cli.js" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "devOptional": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/uuid": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "devOptional": true + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dev": true, + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "dev": true, + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "devOptional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/zod": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", + "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } } - } - }, - "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", - "devOptional": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "devOptional": true - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "devOptional": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "devOptional": true, - "engines": { - "node": ">=6" - } } - } } diff --git a/package.json b/package.json index 15611ad..b6376fc 100644 --- a/package.json +++ b/package.json @@ -1,32 +1,36 @@ { - "name": "script", - "license": "MIT", - "scripts": { - "start": "NODE_PG_FORCE_NATIVE=true NODE_OPTIONS='--max-old-space-size=4096' ts-node ./src/main.ts", - "prisma:gen:pg": "prisma generate --schema prisma-pg/schema.prisma", - "prisma:gen:mysql": "prisma generate --schema prisma-mysql/schema.prisma", - "prisma:gen:all": "npm run prisma:gen:pg && npm run prisma:gen:mysql", - "website:output": "npx ts-node ./src/lib/website-output --results-directory" - }, - "dependencies": { - "@prisma/client": "5.15.0", - "dotenv": "^16.4.5", - "drizzle-orm": "^0.31.2", - "fast-csv": "^5.0.1", - "mysql2": "^3.10.2", - "pg": "^8.12.0", - "pg-native": "^3.1.0", - "postgres": "^3.4.4", - "reflect-metadata": "^0.2.2", - "typeorm": "^0.3.20" - }, - "devDependencies": { - "@faker-js/faker": "^8.4.1", - "@types/faker": "^6.6.9", - "@types/node": "20.14.7", - "drizzle-kit": "^0.22.7", - "prisma": "5.15.0", - "ts-node": "10.9.2", - "typescript": "5.5.2" - } + "name": "script", + "license": "MIT", + "scripts": { + "start": "NODE_PG_FORCE_NATIVE=true NODE_OPTIONS='--max-old-space-size=4096' ts-node ./src/main.ts", + "prisma:gen:pg": "prisma generate --schema prisma-pg/schema.prisma", + "prisma:gen:mysql": "prisma generate --schema prisma-mysql/schema.prisma", + "prisma:gen:all": "npm run prisma:gen:pg && npm run prisma:gen:mysql", + "zen:gen": "zen generate --schema src/zenstack/schema/schema.zmodel", + "website:output": "npx ts-node ./src/lib/website-output --results-directory" + }, + "dependencies": { + "@prisma/client": "^6.17.1", + "@zenstackhq/runtime": "next", + "dotenv": "^16.4.5", + "drizzle-orm": "^0.44.6", + "fast-csv": "^5.0.1", + "mysql2": "^3.10.2", + "pg": "^8.16.3", + "pg-native": "^3.1.0", + "postgres": "^3.4.4", + "reflect-metadata": "^0.2.2", + "typeorm": "^0.3.27" + }, + "devDependencies": { + "@faker-js/faker": "^8.4.1", + "@types/faker": "^6.6.9", + "@types/node": "20.14.7", + "@types/pg": "^8.15.5", + "@zenstackhq/cli": "next", + "drizzle-kit": "^0.31.5", + "prisma": "^6.17.1", + "ts-node": "^10.9.2", + "typescript": "^5.9.3" + } } diff --git a/prisma-pg/schema.prisma b/prisma-pg/schema.prisma index 86ff726..5c67952 100644 --- a/prisma-pg/schema.prisma +++ b/prisma-pg/schema.prisma @@ -1,6 +1,9 @@ generator client { - provider = "prisma-client-js" - output = "../src/prisma/client-pg" + provider = "prisma-client" + output = "../src/prisma/client-pg" + moduleFormat = "commonjs" + importFileExtension = "" + previewFeatures = ["relationJoins"] } datasource db { @@ -9,29 +12,29 @@ datasource db { } model Customer { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - name String? - email String // @unique - address Address? - isActive Boolean @default(false) + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + name String? + email String // @unique + address Address? + isActive Boolean @default(false) // extraInfo Json? - orders Order[] + orders Order[] } model Address { - id Int @id @default(autoincrement()) - street String? - city String? - postalCode String? - country String? - customerId Int @unique - customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + id Int @id @default(autoincrement()) + street String? + city String? + postalCode String? + country String? + customerId Int @unique + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) } model Order { id Int @id @default(autoincrement()) - date DateTime + date DateTime totalAmount Float customerId Int customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) @@ -39,10 +42,10 @@ model Order { } model Product { - id Int @id @default(autoincrement()) + id Int @id @default(autoincrement()) name String price Float quantity Int description String? - orders Order[] @relation("OrderProducts") -} \ No newline at end of file + orders Order[] @relation("OrderProducts") +} diff --git a/src/lib/compare-results.ts b/src/lib/compare-results.ts index 177e2b8..04a6f63 100644 --- a/src/lib/compare-results.ts +++ b/src/lib/compare-results.ts @@ -1,83 +1,103 @@ -import { MultipleBenchmarkRunResults, ORM, QueryResult } from "./types"; +import { MultipleBenchmarkRunResults, ORM, QueryResult } from './types'; function extractIds(data: any, collectedIds: Set = new Set()): Set { - if (data === null || data === undefined) { - return collectedIds; - } - - if (Array.isArray(data)) { - for (const item of data) { - extractIds(item, collectedIds); - } - } else if (typeof data === 'object') { - if ('id' in data) { - collectedIds.add(data.id); + if (data === null || data === undefined) { + return collectedIds; } - for (const key in data) { - if (typeof data[key] === 'object') { - extractIds(data[key], collectedIds); - } + + if (Array.isArray(data)) { + for (const item of data) { + extractIds(item, collectedIds); + } + } else if (typeof data === 'object') { + if ('id' in data) { + collectedIds.add(data.id); + } + for (const key in data) { + if (typeof data[key] === 'object') { + extractIds(data[key], collectedIds); + } + } } - } - return collectedIds; + return collectedIds; } function setsAreEqual(setA: Set, setB: Set): boolean { - if (setA.size !== setB.size) return false; - let isEqual = true; - setA.forEach(item => { - if (!setB.has(item)) isEqual = false; - }); - return isEqual; + if (setA.size !== setB.size) return false; + let isEqual = true; + setA.forEach((item) => { + if (!setB.has(item)) isEqual = false; + }); + return isEqual; } - export function compareResults(results: { - prismaResults: MultipleBenchmarkRunResults, - drizzleResults: MultipleBenchmarkRunResults, - typeormResults: MultipleBenchmarkRunResults; + prismaResults: MultipleBenchmarkRunResults; + drizzleResults: MultipleBenchmarkRunResults; + typeormResults: MultipleBenchmarkRunResults; + zenstackResults: MultipleBenchmarkRunResults; }) { + const orms: ORM[] = ['prisma', /*'drizzle', 'typeorm',*/ 'zenstack']; + const { prismaResults, typeormResults, drizzleResults, zenstackResults } = + results; - const orms: ORM[] = ['prisma', 'drizzle', 'typeorm']; - const { prismaResults, typeormResults, drizzleResults } = results; - - // Assuming each ORM has the same set of queries in the same order - const numberOfQueries = prismaResults[0].length; - console.log(`no of queries`, numberOfQueries); + // Assuming each ORM has the same set of queries in the same order + const numberOfQueries = prismaResults[0].length; + console.log(`no of queries`, numberOfQueries); - for (let iterationIndex = 0; iterationIndex < prismaResults.length; iterationIndex++) { - const queriesInRun: QueryResult[] = prismaResults[iterationIndex]; + for ( + let iterationIndex = 0; + iterationIndex < prismaResults.length; + iterationIndex++ + ) { + const queriesInRun: QueryResult[] = prismaResults[iterationIndex]; - queriesInRun.forEach((queryResult, queryIndex) => { - const query = queryResult.query; + queriesInRun.forEach((queryResult, queryIndex) => { + const query = queryResult.query; - // if (!query.includes('find')) { - // return; - // } + // if (!query.includes('find')) { + // return; + // } - const idSets: { [key in ORM]: Set } = { - prisma: extractIds(prismaResults[iterationIndex][queryIndex].data), - drizzle: extractIds(drizzleResults[iterationIndex][queryIndex].data), - typeorm: extractIds(typeormResults[iterationIndex][queryIndex].data), - }; + const idSets: { [key in ORM]: Set } = { + prisma: extractIds( + prismaResults[iterationIndex][queryIndex].data + ), + drizzle: extractIds( + drizzleResults[iterationIndex][queryIndex].data + ), + typeorm: extractIds( + typeormResults[iterationIndex][queryIndex].data + ), + zenstack: extractIds( + zenstackResults[iterationIndex][queryIndex].data + ), + }; - // Compare id sets for the same query across all ORMs - const firstIdSet = idSets.prisma; - const isDataConsistent = orms.every(orm => { - if (orm === "prisma") return true; // Skip comparing the first set with itself - return setsAreEqual(firstIdSet, idSets[orm]); - }); + // Compare id sets for the same query across all ORMs + const firstIdSet = idSets.prisma; + const isDataConsistent = orms.every((orm) => { + if (orm === 'prisma') return true; // Skip comparing the first set with itself + return setsAreEqual(firstIdSet, idSets[orm]); + }); - if (!isDataConsistent) { - console.log(`Data is DIFFERENT for query "${query}" in run ${iterationIndex + 1}:`); - orms.forEach(orm => { - console.log(`- ${orm}:`, Array.from(idSets[orm])); + if (!isDataConsistent) { + console.log( + `Data is DIFFERENT for query "${query}" in run ${ + iterationIndex + 1 + }:` + ); + orms.forEach((orm) => { + console.log(`- ${orm}:`, Array.from(idSets[orm])); + }); + } else { + console.log( + `Data is SAME for query "${query}" in run ${ + iterationIndex + 1 + }:` + ); + } }); - } else { - console.log(`Data is SAME for query "${query}" in run ${iterationIndex + 1}:`); - - } - }); - } + } } diff --git a/src/lib/measure.ts b/src/lib/measure.ts index 93313e3..d2dceda 100644 --- a/src/lib/measure.ts +++ b/src/lib/measure.ts @@ -1,18 +1,18 @@ export default async function measure(label: string, query: any) { - const startTime = performance.now(); - let result = await query; - const endTime = performance.now(); + const startTime = performance.now(); + let result = await query; + const endTime = performance.now(); - // Calculate the elapsed time - const elapsedTime = endTime - startTime; + // Calculate the elapsed time + const elapsedTime = endTime - startTime; - console.log(`${label}: ${elapsedTime}ms`); + console.log(`${label}: ${elapsedTime.toFixed(2)}ms`); - return { - query: label, - time: elapsedTime, - // only collect data if DEBUG mode is turned on - data: process.env.DEBUG === 'benchmarks:compare-results' ? result : null, - }; + return { + query: label, + time: elapsedTime, + // only collect data if DEBUG mode is turned on + data: + process.env.DEBUG === 'benchmarks:compare-results' ? result : null, + }; } - diff --git a/src/lib/prepare-pg-native.ts b/src/lib/prepare-pg-native.ts index 64dde3b..6a78121 100644 --- a/src/lib/prepare-pg-native.ts +++ b/src/lib/prepare-pg-native.ts @@ -4,203 +4,224 @@ * This database dump is restored for all subsequent invocations via `pg_restore`. */ -import { PrismaClient } from "../prisma/client-pg"; -import { faker } from "@faker-js/faker"; -import { executeCommand, extractConnectionDetailsFromUrl } from "./execute-command"; +import { PrismaClient } from '../prisma/client-pg/client'; +import { faker } from '@faker-js/faker'; +import { + executeCommand, + extractConnectionDetailsFromUrl, +} from './execute-command'; import * as path from 'path'; import * as fs from 'fs'; import { promises as fsPromises } from 'fs'; -export async function preparePg( - options: { databaseUrl: string, size: number, fakerSeed: number; } -) { - - const NUMBER_OF_RECORDS = options.size || 1000; - const NUMBER_OF_RELATED_RECORDS = 10; - const FAKER_SEED = options.fakerSeed || 42; - - const dataDir = path.join('.', 'data'); - - if (!fs.existsSync(dataDir)) { - fs.mkdirSync(dataDir); - console.log(`data directory didn't exist, created directory: ${dataDir}`); - } - - const filePath = path.join('./data', `/data-pg-${NUMBER_OF_RECORDS}-${FAKER_SEED}.sql`); - if (await fileExists(filePath)) { - console.log(`Use SQL dump: ${filePath}`); - await restoreFromSQLDumpPg(options.databaseUrl, filePath); - return; - } - - console.log(`${filePath} doesn't exist yet, creating SQL dump ...`); - - const prisma = new PrismaClient({ - datasourceUrl: options.databaseUrl, - }); - - // Clean tables - console.log(`Clearing tables ...`); - - // Postgres - await prisma.address.deleteMany(); - await prisma.$executeRaw`ALTER SEQUENCE "Address_id_seq" RESTART WITH 1`; - - await prisma.order.deleteMany(); - await prisma.$executeRaw`ALTER SEQUENCE "Order_id_seq" RESTART WITH 1`; - - await prisma.product.deleteMany(); - await prisma.$executeRaw`ALTER SEQUENCE "Product_id_seq" RESTART WITH 1`; - - await prisma.customer.deleteMany(); - await prisma.$executeRaw`ALTER SEQUENCE "Customer_id_seq" RESTART WITH 1`; - - faker.seed(FAKER_SEED); - - console.log(`Seeding data ...`); - - const customerData: any[] = []; - const addressData: any[] = []; - const productData: any[] = []; - const orderData: any[] = []; - - for (let i = 0; i < NUMBER_OF_RECORDS; i++) { - - const customerRecord = { - email: faker.internet.email(), - name: faker.person.fullName(), - isActive: faker.datatype.boolean() - }; - customerData.push(customerRecord); - - const addressRecord = { - street: faker.location.streetAddress(), - postalCode: faker.location.zipCode(), - city: faker.location.city(), - country: faker.location.country(), - customerId: i + 1 - }; - addressData.push(addressRecord); - - const productRecord = { - name: faker.commerce.productName(), - description: faker.commerce.productDescription(), - price: parseFloat(faker.commerce.price()), - quantity: faker.number.int({ min: 1, max: 100 }), - }; - productData.push(productRecord); - - - for (let j = 0; j < NUMBER_OF_RELATED_RECORDS; j++) { - const orderRecord = { - date: faker.date.anytime(), - totalAmount: parseFloat(faker.commerce.price({ min: 100, max: 100000 })), - customerId: i + 1, - }; - orderData.push(orderRecord); +export async function preparePg(options: { + databaseUrl: string; + size: number; + fakerSeed: number; +}) { + const NUMBER_OF_RECORDS = options.size || 1000; + const NUMBER_OF_RELATED_RECORDS = 10; + const FAKER_SEED = options.fakerSeed || 42; + + const dataDir = path.join('.', 'data'); + + if (!fs.existsSync(dataDir)) { + fs.mkdirSync(dataDir); + console.log( + `data directory didn't exist, created directory: ${dataDir}` + ); } - } - await prisma.customer.createMany({ - data: customerData - }); - - await prisma.address.createMany({ - data: addressData - }); - - await prisma.product.createMany({ - data: productData - }); - - await prisma.order.createMany({ - data: orderData, - }); - - // const productIds = Array.from({ length: NUMBER_OF_RECORDS }, (_, index) => index + 1); - const orderIds = Array.from({ length: NUMBER_OF_RECORDS * NUMBER_OF_RELATED_RECORDS }, (_, index) => index + 1); - - const values = orderIds.map(orderId => { - const productId = faker.number.int({ min: 1, max: NUMBER_OF_RECORDS }); - return { - A: orderId, - B: productId - }; - }); - - function transformArrayToString(arr: { A: number; B: number; }[]): string { - return arr.map(item => `(${item.A}, ${item.B})`).join(', '); - } - - const input = transformArrayToString(values); - await prisma.$queryRawUnsafe(`INSERT INTO "_OrderProducts" ("A", "B") VALUES ${input} ON CONFLICT ("A", "B") DO NOTHING`); + const filePath = path.join( + './data', + `/data-pg-${NUMBER_OF_RECORDS}-${FAKER_SEED}.sql` + ); + if (await fileExists(filePath)) { + console.log(`Use SQL dump: ${filePath}`); + await restoreFromSQLDumpPg(options.databaseUrl, filePath); + return; + } - const ordersCount: any = await prisma.$queryRaw`SELECT COUNT(*) FROM "Order"`; - const productsCount: any = await prisma.$queryRaw`SELECT COUNT(*) FROM "Product"`; - const addressesCount: any = await prisma.$queryRaw`SELECT COUNT(*) FROM "Address"`; - const customersCount: any = await prisma.$queryRaw`SELECT COUNT(*) FROM "Customer"`; - console.log( - `Created the following records: \n${ordersCount[0].count} orders\n${productsCount[0].count} products\n${addressesCount[0].count} addresses\n${customersCount[0].count} customers` - ); + console.log(`${filePath} doesn't exist yet, creating SQL dump ...`); + + const prisma = new PrismaClient({ + datasourceUrl: options.databaseUrl, + }); + + // Clean tables + console.log(`Clearing tables ...`); + + // Postgres + await prisma.address.deleteMany(); + await prisma.$executeRaw`ALTER SEQUENCE "Address_id_seq" RESTART WITH 1`; + + await prisma.order.deleteMany(); + await prisma.$executeRaw`ALTER SEQUENCE "Order_id_seq" RESTART WITH 1`; + + await prisma.product.deleteMany(); + await prisma.$executeRaw`ALTER SEQUENCE "Product_id_seq" RESTART WITH 1`; + + await prisma.customer.deleteMany(); + await prisma.$executeRaw`ALTER SEQUENCE "Customer_id_seq" RESTART WITH 1`; + + faker.seed(FAKER_SEED); + + console.log(`Seeding data ...`); + + const customerData: any[] = []; + const addressData: any[] = []; + const productData: any[] = []; + const orderData: any[] = []; + + for (let i = 0; i < NUMBER_OF_RECORDS; i++) { + const customerRecord = { + email: faker.internet.email(), + name: faker.person.fullName(), + isActive: faker.datatype.boolean(), + }; + customerData.push(customerRecord); + + const addressRecord = { + street: faker.location.streetAddress(), + postalCode: faker.location.zipCode(), + city: faker.location.city(), + country: faker.location.country(), + customerId: i + 1, + }; + addressData.push(addressRecord); + + const productRecord = { + name: faker.commerce.productName(), + description: faker.commerce.productDescription(), + price: parseFloat(faker.commerce.price()), + quantity: faker.number.int({ min: 1, max: 100 }), + }; + productData.push(productRecord); + + for (let j = 0; j < NUMBER_OF_RELATED_RECORDS; j++) { + const orderRecord = { + date: faker.date.anytime(), + totalAmount: parseFloat( + faker.commerce.price({ min: 100, max: 100000 }) + ), + customerId: i + 1, + }; + orderData.push(orderRecord); + } + } - await prisma.$disconnect(); + await prisma.customer.createMany({ + data: customerData, + }); + + await prisma.address.createMany({ + data: addressData, + }); + + await prisma.product.createMany({ + data: productData, + }); + + await prisma.order.createMany({ + data: orderData, + }); + + // const productIds = Array.from({ length: NUMBER_OF_RECORDS }, (_, index) => index + 1); + const orderIds = Array.from( + { length: NUMBER_OF_RECORDS * NUMBER_OF_RELATED_RECORDS }, + (_, index) => index + 1 + ); + + const values = orderIds.map((orderId) => { + const productId = faker.number.int({ min: 1, max: NUMBER_OF_RECORDS }); + return { + A: orderId, + B: productId, + }; + }); + + function transformArrayToString(arr: { A: number; B: number }[]): string { + return arr.map((item) => `(${item.A}, ${item.B})`).join(', '); + } - await createSQLDumpPg(options.databaseUrl, filePath); + const input = transformArrayToString(values); + await prisma.$queryRawUnsafe( + `INSERT INTO "_OrderProducts" ("A", "B") VALUES ${input} ON CONFLICT ("A", "B") DO NOTHING` + ); + + const ordersCount: any = + await prisma.$queryRaw`SELECT COUNT(*) FROM "Order"`; + const productsCount: any = + await prisma.$queryRaw`SELECT COUNT(*) FROM "Product"`; + const addressesCount: any = + await prisma.$queryRaw`SELECT COUNT(*) FROM "Address"`; + const customersCount: any = + await prisma.$queryRaw`SELECT COUNT(*) FROM "Customer"`; + console.log( + `Created the following records: \n${ordersCount[0].count} orders\n${productsCount[0].count} products\n${addressesCount[0].count} addresses\n${customersCount[0].count} customers` + ); + + await prisma.$disconnect(); + + await createSQLDumpPg(options.databaseUrl, filePath); } async function createSQLDumpPg(databaseUrl: string, filePath?: string) { - const connectionDetails = extractConnectionDetailsFromUrl(databaseUrl); - if (!connectionDetails) { - console.log(`Error while creating SQL dump. DB URL not valid.`); - return; - } - console.log(`Dumping dataset with connection details: `, connectionDetails); - const { host, user, db, password } = connectionDetails; - const command = `pg_dump -h ${host} -U ${user} -d ${db} --no-owner -F c -b -v -f ${filePath}`; - // Other options for Xata - // const command = `pg_dump -h ${host} -U ${user} -d ${db} --no-acl --no-owner --no-table-access-method -F c -b -v -f ${filePath}`; - console.log(`SQL dump command: `, command); - try { - await executeCommand(command, { PGPASSWORD: password }); - console.log(`Sucessfully stored SQL dump in ${filePath}`); - } catch (error) { - console.error("Failed to execute pg_dump command."); - console.error(error); - } + const connectionDetails = extractConnectionDetailsFromUrl(databaseUrl); + if (!connectionDetails) { + console.log(`Error while creating SQL dump. DB URL not valid.`); + return; + } + console.log(`Dumping dataset with connection details: `, connectionDetails); + const { host, user, db, password } = connectionDetails; + const command = `pg_dump -h ${host} -U ${user} -d ${db} --no-owner -F c -b -v -f ${filePath}`; + // Other options for Xata + // const command = `pg_dump -h ${host} -U ${user} -d ${db} --no-acl --no-owner --no-table-access-method -F c -b -v -f ${filePath}`; + console.log(`SQL dump command: `, command); + try { + await executeCommand(command, { PGPASSWORD: password }); + console.log(`Sucessfully stored SQL dump in ${filePath}`); + } catch (error) { + console.error('Failed to execute pg_dump command.'); + console.error(error); + } } async function restoreFromSQLDumpPg(databaseUrl: string, filePath: string) { - const connectionDetails = extractConnectionDetailsFromUrl(databaseUrl); - console.log(`Restoring dataset with connection details: `, connectionDetails); - if (!connectionDetails) { - console.log(`Error while creating SQL dump. DB URL not valid.`); - return; - } - const { host, user, db, password } = connectionDetails; - const commandTruncate = `psql -h ${host} -U ${user} -d ${db} -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'`; - console.log(`Truncate command: `, commandTruncate); - try { - await executeCommand(commandTruncate, { PGPASSWORD: password }); - console.log("psql command executed successfully."); - } catch (error) { - console.error("Failed to execute psql command."); - } - const command = `pg_restore -h ${host} -U ${user} -d ${db} --no-owner -v ${filePath}`; - console.log(`SQL restore command: `, command); - try { - await executeCommand(command, { PGPASSWORD: password }); - console.log(`Sucessfully restored SQL dump from ${filePath}`); - } catch (error) { - console.error("Failed to execute pg_restore command."); - console.error(error); - } + const connectionDetails = extractConnectionDetailsFromUrl(databaseUrl); + console.log( + `Restoring dataset with connection details: `, + connectionDetails + ); + if (!connectionDetails) { + console.log(`Error while creating SQL dump. DB URL not valid.`); + return; + } + const { host, user, db, password } = connectionDetails; + const commandTruncate = `psql -h ${host} -U ${user} -d ${db} -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'`; + console.log(`Truncate command: `, commandTruncate); + try { + await executeCommand(commandTruncate, { PGPASSWORD: password }); + console.log('psql command executed successfully.'); + } catch (error) { + console.error('Failed to execute psql command.'); + } + const command = `pg_restore -h ${host} -U ${user} -d ${db} --no-owner -v ${filePath}`; + console.log(`SQL restore command: `, command); + try { + await executeCommand(command, { PGPASSWORD: password }); + console.log(`Sucessfully restored SQL dump from ${filePath}`); + } catch (error) { + console.error('Failed to execute pg_restore command.'); + console.error(error); + } } async function fileExists(filePath: string): Promise { - try { - await fsPromises.access(filePath); - return true; - } catch { - return false; - } + try { + await fsPromises.access(filePath); + return true; + } catch { + return false; + } } diff --git a/src/lib/types.ts b/src/lib/types.ts index c36c7fd..dedbbdb 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1,25 +1,25 @@ -export type ORM = "prisma" | "drizzle" | "typeorm"; -export type Database = "postgresql" | "mysql"; +export type ORM = 'prisma' | 'drizzle' | 'typeorm' | 'zenstack'; +export type Database = 'postgresql' | 'mysql'; export type QueryResult = { - query: string; - time: number; - data: any; + query: string; + time: number; + data: any; }; export type SingleBenchmarkRunResult = QueryResult[]; export type MultipleBenchmarkRunResults = SingleBenchmarkRunResult[]; export type AllResults = { [key in ORM]: MultipleBenchmarkRunResults }; export type ConnectionDetails = { - user: string; - password: string; - host: string; - port?: string; - db: string; + user: string; + password: string; + host: string; + port?: string; + db: string; }; export type BenchmarkOptions = { - databaseUrl: string; - iterations: number; - size: number; - fakerSeed: number; -}; \ No newline at end of file + databaseUrl: string; + iterations: number; + size: number; + fakerSeed: number; +}; diff --git a/src/lib/write-results.ts b/src/lib/write-results.ts index df29b11..32562f6 100644 --- a/src/lib/write-results.ts +++ b/src/lib/write-results.ts @@ -1,54 +1,65 @@ -import { MultipleBenchmarkRunResults, ORM, Database, BenchmarkOptions } from "./types"; -import * as fs from "fs"; +import { + MultipleBenchmarkRunResults, + ORM, + Database, + BenchmarkOptions, +} from './types'; +import * as fs from 'fs'; import * as path from 'path'; export default function writeResults( - orm: ORM, - db: Database, - results: MultipleBenchmarkRunResults, - benchmarkOptions: BenchmarkOptions, - resultsDirectoryTimestamp: string + orm: ORM, + db: Database, + results: MultipleBenchmarkRunResults, + benchmarkOptions: BenchmarkOptions, + resultsDirectoryTimestamp: string ) { + // Create dedicated results directory for this benchmark run + const resultsDir = path.join( + '.', + `results/${db}-${benchmarkOptions.size}-${benchmarkOptions.iterations}-${resultsDirectoryTimestamp}` + ); - // Create dedicated results directory for this benchmark run - const resultsDir = path.join('.', `results/${db}-${benchmarkOptions.size}-${benchmarkOptions.iterations}-${resultsDirectoryTimestamp}`); + if (!fs.existsSync(resultsDir)) { + fs.mkdirSync(resultsDir, { recursive: true }); + console.log( + `Results directory didn't exist, created directory: ${resultsDir}` + ); + } - if (!fs.existsSync(resultsDir)) { - fs.mkdirSync(resultsDir); - console.log(`Results directory didn't exist, created directory: ${resultsDir}`); - } + const filePath = path.join(resultsDir, `${orm}.csv`); + console.log(`Write results to ${filePath}.`); - const filePath = path.join(resultsDir, `${orm}.csv`); - console.log(`Write results to ${filePath}.`); + // Extract headers + const headers = Array.from( + new Set(results.flatMap((batch) => batch.map((item) => item.query))) + ); - // Extract headers - const headers = Array.from(new Set(results.flatMap((batch) => batch.map((item) => item.query)))); - - // Extract rows - const rows = results.map((batch) => { - const row: { [key: string]: number | string; } = {}; - batch.forEach((item) => { - row[item.query] = item.time; - }); - // Ensure all headers are included in each row, even if they are missing in the batch - headers.forEach((header) => { - if (!(header in row)) { - row[header] = ""; - } + // Extract rows + const rows: number[][] = results.map((batch) => { + const row: { [key: string]: number } = {}; + batch.forEach((item) => { + row[item.query] = item.time; + }); + // Ensure all headers are included in each row, even if they are missing in the batch + headers.forEach((header) => { + if (!(header in row)) { + row[header] = NaN; + } + }); + return headers.map((header) => row[header]); }); - return headers.map((header) => row[header]); - }); - // Write to CSV - // const filename = `./results/${orm}-results-${Date.now()}.csv`; - const csvStream = fs.createWriteStream(filePath); + // Write to CSV + // const filename = `./results/${orm}-results-${Date.now()}.csv`; + const csvStream = fs.createWriteStream(filePath); - csvStream.write(headers.join(",") + "\n"); - rows.forEach((row) => { - csvStream.write(row.join(",") + "\n"); - }); + csvStream.write(headers.join(',') + '\n'); + rows.forEach((row) => { + csvStream.write(row.join(',') + '\n'); + }); - csvStream.end(); + csvStream.end(); - console.log(`Results for ${orm} written to: ${filePath}`); + console.log(`Results for ${orm} written to: ${filePath}`); } diff --git a/src/prisma/client-pg/browser.ts b/src/prisma/client-pg/browser.ts new file mode 100644 index 0000000..b0ddcf9 --- /dev/null +++ b/src/prisma/client-pg/browser.ts @@ -0,0 +1,38 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟢 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser' +export { Prisma } +export * as $Enums from './enums' +export * from './enums'; +/** + * Model Customer + * + */ +export type Customer = Prisma.CustomerModel +/** + * Model Address + * + */ +export type Address = Prisma.AddressModel +/** + * Model Order + * + */ +export type Order = Prisma.OrderModel +/** + * Model Product + * + */ +export type Product = Prisma.ProductModel diff --git a/src/prisma/client-pg/client.ts b/src/prisma/client-pg/client.ts new file mode 100644 index 0000000..fa0418c --- /dev/null +++ b/src/prisma/client-pg/client.ts @@ -0,0 +1,63 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟢 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' + +import * as runtime from "@prisma/client/runtime/library" +import * as $Enums from "./enums" +import * as $Class from "./internal/class" +import * as Prisma from "./internal/prismaNamespace" + +export * as $Enums from './enums' +export * from "./enums" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export const PrismaClient = $Class.getPrismaClientClass(__dirname) +export type PrismaClient = $Class.PrismaClient +export { Prisma } + + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node") +path.join(process.cwd(), "src/prisma/client-pg/libquery_engine-darwin-arm64.dylib.node") + +/** + * Model Customer + * + */ +export type Customer = Prisma.CustomerModel +/** + * Model Address + * + */ +export type Address = Prisma.AddressModel +/** + * Model Order + * + */ +export type Order = Prisma.OrderModel +/** + * Model Product + * + */ +export type Product = Prisma.ProductModel diff --git a/src/prisma/client-pg/commonInputTypes.ts b/src/prisma/client-pg/commonInputTypes.ts new file mode 100644 index 0000000..7815e8e --- /dev/null +++ b/src/prisma/client-pg/commonInputTypes.ts @@ -0,0 +1,344 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟢 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/library" +import * as $Enums from "./enums" +import type * as Prisma from "./internal/prismaNamespace" + + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type FloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type FloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedFloatFilter<$PrismaModel> + _min?: Prisma.NestedFloatFilter<$PrismaModel> + _max?: Prisma.NestedFloatFilter<$PrismaModel> +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedFloatFilter<$PrismaModel> + _min?: Prisma.NestedFloatFilter<$PrismaModel> + _max?: Prisma.NestedFloatFilter<$PrismaModel> +} + + diff --git a/src/prisma/client-pg/default.d.ts b/src/prisma/client-pg/default.d.ts deleted file mode 100644 index 34c6161..0000000 --- a/src/prisma/client-pg/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index' \ No newline at end of file diff --git a/src/prisma/client-pg/default.js b/src/prisma/client-pg/default.js deleted file mode 100644 index fa52f0c..0000000 --- a/src/prisma/client-pg/default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/src/prisma/client-pg/edge.d.ts b/src/prisma/client-pg/edge.d.ts deleted file mode 100644 index 479a9ab..0000000 --- a/src/prisma/client-pg/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './default' \ No newline at end of file diff --git a/src/prisma/client-pg/edge.js b/src/prisma/client-pg/edge.js deleted file mode 100644 index d99098c..0000000 --- a/src/prisma/client-pg/edge.js +++ /dev/null @@ -1,213 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - NotFoundError, - getPrismaClient, - sqltag, - empty, - join, - raw, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/edge.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.15.0 - * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 - */ -Prisma.prismaVersion = { - client: "5.15.0", - engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.NotFoundError = NotFoundError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.CustomerScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - name: 'name', - email: 'email', - isActive: 'isActive' -}; - -exports.Prisma.AddressScalarFieldEnum = { - id: 'id', - street: 'street', - city: 'city', - postalCode: 'postalCode', - country: 'country', - customerId: 'customerId' -}; - -exports.Prisma.OrderScalarFieldEnum = { - id: 'id', - date: 'date', - totalAmount: 'totalAmount', - customerId: 'customerId' -}; - -exports.Prisma.ProductScalarFieldEnum = { - id: 'id', - name: 'name', - price: 'price', - quantity: 'quantity', - description: 'description' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Customer: 'Customer', - Address: 'Address', - Order: 'Order', - Product: 'Product' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/nikolasburk/Desktop/orm-benchmarks/src/prisma/client-pg", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin", - "native": true - } - ], - "previewFeatures": [], - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../../.env" - }, - "relativePath": "../../../prisma-pg", - "clientVersion": "5.15.0", - "engineVersion": "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/prisma/client-pg\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n name String?\n email String // @unique\n address Address?\n isActive Boolean @default(false)\n // extraInfo Json?\n orders Order[]\n}\n\nmodel Address {\n id Int @id @default(autoincrement())\n street String?\n city String?\n postalCode String?\n country String?\n customerId Int @unique\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n date DateTime\n totalAmount Float\n customerId Int\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n products Product[] @relation(\"OrderProducts\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String\n price Float\n quantity Int\n description String?\n orders Order[] @relation(\"OrderProducts\")\n}\n", - "inlineSchemaHash": "034621a130ad257520af372e2a0a254847c9c8d85fb033d99eadbe593e744736", - "copyEngine": true -} -config.dirname = '/' - -config.runtimeDataModel = JSON.parse("{\"models\":{\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Address\",\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Address\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"street\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"country\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"price\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - -config.injectableEdgeEnv = () => ({ - parsed: { - DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined - } -}) - -if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { - Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) -} - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - diff --git a/src/prisma/client-pg/enums.ts b/src/prisma/client-pg/enums.ts new file mode 100644 index 0000000..0189a34 --- /dev/null +++ b/src/prisma/client-pg/enums.ts @@ -0,0 +1,14 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟢 You can import this file directly. +*/ + + + +// This file is empty because there are no enums in the schema. +export {} diff --git a/src/prisma/client-pg/index-browser.js b/src/prisma/client-pg/index-browser.js deleted file mode 100644 index a094a4b..0000000 --- a/src/prisma/client-pg/index-browser.js +++ /dev/null @@ -1,206 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.15.0 - * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 - */ -Prisma.prismaVersion = { - client: "5.15.0", - engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.NotFoundError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.CustomerScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - name: 'name', - email: 'email', - isActive: 'isActive' -}; - -exports.Prisma.AddressScalarFieldEnum = { - id: 'id', - street: 'street', - city: 'city', - postalCode: 'postalCode', - country: 'country', - customerId: 'customerId' -}; - -exports.Prisma.OrderScalarFieldEnum = { - id: 'id', - date: 'date', - totalAmount: 'totalAmount', - customerId: 'customerId' -}; - -exports.Prisma.ProductScalarFieldEnum = { - id: 'id', - name: 'name', - price: 'price', - quantity: 'quantity', - description: 'description' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Customer: 'Customer', - Address: 'Address', - Order: 'Order', - Product: 'Product' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/src/prisma/client-pg/index.d.ts b/src/prisma/client-pg/index.d.ts deleted file mode 100644 index 36f44e1..0000000 --- a/src/prisma/client-pg/index.d.ts +++ /dev/null @@ -1,7009 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions -import $Result = runtime.Types.Result - -export type PrismaPromise = $Public.PrismaPromise - - -/** - * Model Customer - * - */ -export type Customer = $Result.DefaultSelection -/** - * Model Address - * - */ -export type Address = $Result.DefaultSelection -/** - * Model Order - * - */ -export type Order = $Result.DefaultSelection -/** - * Model Product - * - */ -export type Product = $Result.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Customers - * const customers = await prisma.customer.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Customers - * const customers = await prisma.customer.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg ?: Prisma.Subset); - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - -/** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> - - $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - - - $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> - - /** - * `prisma.customer`: Exposes CRUD operations for the **Customer** model. - * Example usage: - * ```ts - * // Fetch zero or more Customers - * const customers = await prisma.customer.findMany() - * ``` - */ - get customer(): Prisma.CustomerDelegate; - - /** - * `prisma.address`: Exposes CRUD operations for the **Address** model. - * Example usage: - * ```ts - * // Fetch zero or more Addresses - * const addresses = await prisma.address.findMany() - * ``` - */ - get address(): Prisma.AddressDelegate; - - /** - * `prisma.order`: Exposes CRUD operations for the **Order** model. - * Example usage: - * ```ts - * // Fetch zero or more Orders - * const orders = await prisma.order.findMany() - * ``` - */ - get order(): Prisma.OrderDelegate; - - /** - * `prisma.product`: Exposes CRUD operations for the **Product** model. - * Example usage: - * ```ts - * // Fetch zero or more Products - * const products = await prisma.product.findMany() - * ``` - */ - get product(): Prisma.ProductDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError - export import PrismaClientValidationError = runtime.PrismaClientValidationError - export import NotFoundError = runtime.NotFoundError - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag - export import empty = runtime.empty - export import join = runtime.join - export import raw = runtime.raw - export import Sql = runtime.Sql - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal - - export type DecimalJsLike = runtime.DecimalJsLike - - /** - * Metrics - */ - export type Metrics = runtime.Metrics - export type Metric = runtime.Metric - export type MetricHistogram = runtime.MetricHistogram - export type MetricHistogramBucket = runtime.MetricHistogramBucket - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = $Public.Args - export import Payload = $Public.Payload - export import Result = $Public.Result - export import Exact = $Public.Exact - - /** - * Prisma Client JS version: 5.15.0 - * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - /** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. - */ - export type JsonObject = {[Key in string]?: JsonValue} - - /** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ - export interface JsonArray extends Array {} - - /** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ - export type JsonValue = string | number | boolean | JsonObject | JsonArray | null - - /** - * Matches a JSON object. - * Unlike `JsonObject`, this type allows undefined and read-only properties. - */ - export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} - - /** - * Matches a JSON array. - * Unlike `JsonArray`, readonly arrays are assignable to this type. - */ - export interface InputJsonArray extends ReadonlyArray {} - - /** - * Matches any valid value that can be used as an input for operations like - * create and update as the value of a JSON field. Unlike `JsonValue`, this - * type allows read-only arrays and read-only object properties and disallows - * `null` at the top level. - * - * `null` cannot be used as the value of a JSON field because its meaning - * would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or - * `Prisma.DbNull` to clear the JSON value and set the field to the database - * NULL value instead. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values - */ - export type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { toJSON(): unknown } - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never - private constructor() - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never - private constructor() - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never - private constructor() - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull - - type SelectAndInclude = { - select: any - include: any - } - - type SelectAndOmit = { - select: any - omit: any - } - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType> - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K - }[keyof T] - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K - } - - export type TrueKeys = TruthyKeys>> - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}) - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - K - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - - - /** - * Is T a Record? - */ - type IsObject = T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False - - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick // With K possibilities - }[K] - - type EitherStrict = Strict<__Either> - - type EitherLoose = ComputeRaw<__Either> - - type _Either< - O extends object, - K extends Key, - strict extends Boolean - > = { - 1: EitherStrict - 0: EitherLoose - }[strict] - - type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 - > = O extends unknown ? _Either : never - - export type Union = any - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K] - } & {} - - /** Helper Types for "Merge" **/ - export type IntersectOf = ( - U extends unknown ? (k: U) => void : never - ) extends (k: infer I) => void - ? I - : never - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf; - }>>; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O - : never>; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False - - // /** - // 1 - // */ - export type True = 1 - - /** - 0 - */ - export type False = 0 - - export type Not = { - 0: 1 - 1: 0 - }[B] - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0 - - export type Has = Not< - Extends, U1> - > - - export type Or = { - 0: { - 0: 0 - 1: 1 - } - 1: { - 0: 1 - 1: 1 - } - }[B1][B2] - - export type Keys = U extends unknown ? keyof U : never - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - - - /** - * Used by group by - */ - - export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never - } : never - - type FieldPaths< - T, - U = Omit - > = IsObject extends True ? U : T - - type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K - }[keyof T] - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never - type TupleToUnion = _TupleToUnion - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick> - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - - - export type FieldRef = runtime.FieldRef - - type FieldRefInputType = Model extends never ? never : FieldRef - - - export const ModelName: { - Customer: 'Customer', - Address: 'Address', - Order: 'Order', - Product: 'Product' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs}, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: 'customer' | 'address' | 'order' | 'product' - txIsolationLevel: Prisma.TransactionIsolationLevel - }, - model: { - Customer: { - payload: Prisma.$CustomerPayload - fields: Prisma.CustomerFieldRefs - operations: { - findUnique: { - args: Prisma.CustomerFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CustomerFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CustomerFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CustomerFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CustomerFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CustomerCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CustomerCreateManyArgs, - result: Prisma.BatchPayload - } - createManyAndReturn: { - args: Prisma.CustomerCreateManyAndReturnArgs, - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CustomerDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CustomerUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CustomerDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.CustomerUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.CustomerUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CustomerAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.CustomerGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.CustomerCountArgs, - result: $Utils.Optional | number - } - } - } - Address: { - payload: Prisma.$AddressPayload - fields: Prisma.AddressFieldRefs - operations: { - findUnique: { - args: Prisma.AddressFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AddressFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AddressFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AddressFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AddressFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AddressCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AddressCreateManyArgs, - result: Prisma.BatchPayload - } - createManyAndReturn: { - args: Prisma.AddressCreateManyAndReturnArgs, - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.AddressDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AddressUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AddressDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.AddressUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.AddressUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AddressAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.AddressGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.AddressCountArgs, - result: $Utils.Optional | number - } - } - } - Order: { - payload: Prisma.$OrderPayload - fields: Prisma.OrderFieldRefs - operations: { - findUnique: { - args: Prisma.OrderFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.OrderFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.OrderFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.OrderFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.OrderFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.OrderCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.OrderCreateManyArgs, - result: Prisma.BatchPayload - } - createManyAndReturn: { - args: Prisma.OrderCreateManyAndReturnArgs, - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.OrderDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.OrderUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.OrderDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.OrderUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.OrderUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.OrderAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.OrderGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.OrderCountArgs, - result: $Utils.Optional | number - } - } - } - Product: { - payload: Prisma.$ProductPayload - fields: Prisma.ProductFieldRefs - operations: { - findUnique: { - args: Prisma.ProductFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductCreateManyArgs, - result: Prisma.BatchPayload - } - createManyAndReturn: { - args: Prisma.ProductCreateManyAndReturnArgs, - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.ProductDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ProductUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.ProductUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.ProductUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.ProductGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.ProductCountArgs, - result: $Utils.Optional | number - } - } - } - } - } & { - other: { - payload: any - operations: { - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - } - } - } - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> - export type DefaultPrismaClient = PrismaClient - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat - /** - * @example - * ``` - * // Defaults to stdout - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * ] - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[] - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number - timeout?: number - isolationLevel?: Prisma.TransactionIsolationLevel - } - } - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error' - export type LogDefinition = { - level: LogLevel - emit: 'stdout' | 'event' - } - - export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never - export type GetEvents = T extends Array ? - GetLogType | GetLogType | GetLogType | GetLogType - : never - - export type QueryEvent = { - timestamp: Date - query: string - params: string - duration: number - target: string - } - - export type LogEvent = { - timestamp: Date - message: string - target: string - } - /* End Types for Logging */ - - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy' - - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit - - export type Datasource = { - url?: string - } - - /** - * Count Types - */ - - - /** - * Count Type CustomerCountOutputType - */ - - export type CustomerCountOutputType = { - orders: number - } - - export type CustomerCountOutputTypeSelect = { - orders?: boolean | CustomerCountOutputTypeCountOrdersArgs - } - - // Custom InputTypes - /** - * CustomerCountOutputType without action - */ - export type CustomerCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the CustomerCountOutputType - */ - select?: CustomerCountOutputTypeSelect | null - } - - /** - * CustomerCountOutputType without action - */ - export type CustomerCountOutputTypeCountOrdersArgs = { - where?: OrderWhereInput - } - - - /** - * Count Type OrderCountOutputType - */ - - export type OrderCountOutputType = { - products: number - } - - export type OrderCountOutputTypeSelect = { - products?: boolean | OrderCountOutputTypeCountProductsArgs - } - - // Custom InputTypes - /** - * OrderCountOutputType without action - */ - export type OrderCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the OrderCountOutputType - */ - select?: OrderCountOutputTypeSelect | null - } - - /** - * OrderCountOutputType without action - */ - export type OrderCountOutputTypeCountProductsArgs = { - where?: ProductWhereInput - } - - - /** - * Count Type ProductCountOutputType - */ - - export type ProductCountOutputType = { - orders: number - } - - export type ProductCountOutputTypeSelect = { - orders?: boolean | ProductCountOutputTypeCountOrdersArgs - } - - // Custom InputTypes - /** - * ProductCountOutputType without action - */ - export type ProductCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ProductCountOutputType - */ - select?: ProductCountOutputTypeSelect | null - } - - /** - * ProductCountOutputType without action - */ - export type ProductCountOutputTypeCountOrdersArgs = { - where?: OrderWhereInput - } - - - /** - * Models - */ - - /** - * Model Customer - */ - - export type AggregateCustomer = { - _count: CustomerCountAggregateOutputType | null - _avg: CustomerAvgAggregateOutputType | null - _sum: CustomerSumAggregateOutputType | null - _min: CustomerMinAggregateOutputType | null - _max: CustomerMaxAggregateOutputType | null - } - - export type CustomerAvgAggregateOutputType = { - id: number | null - } - - export type CustomerSumAggregateOutputType = { - id: number | null - } - - export type CustomerMinAggregateOutputType = { - id: number | null - createdAt: Date | null - name: string | null - email: string | null - isActive: boolean | null - } - - export type CustomerMaxAggregateOutputType = { - id: number | null - createdAt: Date | null - name: string | null - email: string | null - isActive: boolean | null - } - - export type CustomerCountAggregateOutputType = { - id: number - createdAt: number - name: number - email: number - isActive: number - _all: number - } - - - export type CustomerAvgAggregateInputType = { - id?: true - } - - export type CustomerSumAggregateInputType = { - id?: true - } - - export type CustomerMinAggregateInputType = { - id?: true - createdAt?: true - name?: true - email?: true - isActive?: true - } - - export type CustomerMaxAggregateInputType = { - id?: true - createdAt?: true - name?: true - email?: true - isActive?: true - } - - export type CustomerCountAggregateInputType = { - id?: true - createdAt?: true - name?: true - email?: true - isActive?: true - _all?: true - } - - export type CustomerAggregateArgs = { - /** - * Filter which Customer to aggregate. - */ - where?: CustomerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Customers to fetch. - */ - orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CustomerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Customers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Customers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Customers - **/ - _count?: true | CustomerCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CustomerAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CustomerSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CustomerMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CustomerMaxAggregateInputType - } - - export type GetCustomerAggregateType = { - [P in keyof T & keyof AggregateCustomer]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CustomerGroupByArgs = { - where?: CustomerWhereInput - orderBy?: CustomerOrderByWithAggregationInput | CustomerOrderByWithAggregationInput[] - by: CustomerScalarFieldEnum[] | CustomerScalarFieldEnum - having?: CustomerScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CustomerCountAggregateInputType | true - _avg?: CustomerAvgAggregateInputType - _sum?: CustomerSumAggregateInputType - _min?: CustomerMinAggregateInputType - _max?: CustomerMaxAggregateInputType - } - - export type CustomerGroupByOutputType = { - id: number - createdAt: Date - name: string | null - email: string - isActive: boolean - _count: CustomerCountAggregateOutputType | null - _avg: CustomerAvgAggregateOutputType | null - _sum: CustomerSumAggregateOutputType | null - _min: CustomerMinAggregateOutputType | null - _max: CustomerMaxAggregateOutputType | null - } - - type GetCustomerGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CustomerGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CustomerSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - name?: boolean - email?: boolean - isActive?: boolean - address?: boolean | Customer$addressArgs - orders?: boolean | Customer$ordersArgs - _count?: boolean | CustomerCountOutputTypeDefaultArgs - }, ExtArgs["result"]["customer"]> - - export type CustomerSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - name?: boolean - email?: boolean - isActive?: boolean - }, ExtArgs["result"]["customer"]> - - export type CustomerSelectScalar = { - id?: boolean - createdAt?: boolean - name?: boolean - email?: boolean - isActive?: boolean - } - - export type CustomerInclude = { - address?: boolean | Customer$addressArgs - orders?: boolean | Customer$ordersArgs - _count?: boolean | CustomerCountOutputTypeDefaultArgs - } - export type CustomerIncludeCreateManyAndReturn = {} - - export type $CustomerPayload = { - name: "Customer" - objects: { - address: Prisma.$AddressPayload | null - orders: Prisma.$OrderPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - createdAt: Date - name: string | null - email: string - isActive: boolean - }, ExtArgs["result"]["customer"]> - composites: {} - } - - type CustomerGetPayload = $Result.GetResult - - type CustomerCountArgs = - Omit & { - select?: CustomerCountAggregateInputType | true - } - - export interface CustomerDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Customer'], meta: { name: 'Customer' } } - /** - * Find zero or one Customer that matches the filter. - * @param {CustomerFindUniqueArgs} args - Arguments to find a Customer - * @example - * // Get one Customer - * const customer = await prisma.customer.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> - - /** - * Find one Customer that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CustomerFindUniqueOrThrowArgs} args - Arguments to find a Customer - * @example - * // Get one Customer - * const customer = await prisma.customer.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> - - /** - * Find the first Customer that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerFindFirstArgs} args - Arguments to find a Customer - * @example - * // Get one Customer - * const customer = await prisma.customer.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> - - /** - * Find the first Customer that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerFindFirstOrThrowArgs} args - Arguments to find a Customer - * @example - * // Get one Customer - * const customer = await prisma.customer.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> - - /** - * Find zero or more Customers that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Customers - * const customers = await prisma.customer.findMany() - * - * // Get first 10 Customers - * const customers = await prisma.customer.findMany({ take: 10 }) - * - * // Only select the `id` - * const customerWithIdOnly = await prisma.customer.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> - - /** - * Create a Customer. - * @param {CustomerCreateArgs} args - Arguments to create a Customer. - * @example - * // Create one Customer - * const Customer = await prisma.customer.create({ - * data: { - * // ... data to create a Customer - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'create'>, never, ExtArgs> - - /** - * Create many Customers. - * @param {CustomerCreateManyArgs} args - Arguments to create many Customers. - * @example - * // Create many Customers - * const customer = await prisma.customer.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create many Customers and returns the data saved in the database. - * @param {CustomerCreateManyAndReturnArgs} args - Arguments to create many Customers. - * @example - * // Create many Customers - * const customer = await prisma.customer.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Customers and only return the `id` - * const customerWithIdOnly = await prisma.customer.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - **/ - createManyAndReturn>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'createManyAndReturn'>> - - /** - * Delete a Customer. - * @param {CustomerDeleteArgs} args - Arguments to delete one Customer. - * @example - * // Delete one Customer - * const Customer = await prisma.customer.delete({ - * where: { - * // ... filter to delete one Customer - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> - - /** - * Update one Customer. - * @param {CustomerUpdateArgs} args - Arguments to update one Customer. - * @example - * // Update one Customer - * const customer = await prisma.customer.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'update'>, never, ExtArgs> - - /** - * Delete zero or more Customers. - * @param {CustomerDeleteManyArgs} args - Arguments to filter Customers to delete. - * @example - * // Delete a few Customers - * const { count } = await prisma.customer.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Customers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Customers - * const customer = await prisma.customer.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Customer. - * @param {CustomerUpsertArgs} args - Arguments to update or create a Customer. - * @example - * // Update or create a Customer - * const customer = await prisma.customer.upsert({ - * create: { - * // ... data to create a Customer - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Customer we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CustomerClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> - - /** - * Count the number of Customers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerCountArgs} args - Arguments to filter Customers to count. - * @example - * // Count the number of Customers - * const count = await prisma.customer.count({ - * where: { - * // ... the filter for the Customers we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Customer. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Customer. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CustomerGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CustomerGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CustomerGroupByArgs['orderBy'] } - : { orderBy?: CustomerGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCustomerGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Customer model - */ - readonly fields: CustomerFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Customer. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CustomerClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - address = {}>(args?: Subset>): Prisma__AddressClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; - - orders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - - - /** - * Fields of the Customer model - */ - interface CustomerFieldRefs { - readonly id: FieldRef<"Customer", 'Int'> - readonly createdAt: FieldRef<"Customer", 'DateTime'> - readonly name: FieldRef<"Customer", 'String'> - readonly email: FieldRef<"Customer", 'String'> - readonly isActive: FieldRef<"Customer", 'Boolean'> - } - - - // Custom InputTypes - /** - * Customer findUnique - */ - export type CustomerFindUniqueArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter, which Customer to fetch. - */ - where: CustomerWhereUniqueInput - } - - /** - * Customer findUniqueOrThrow - */ - export type CustomerFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter, which Customer to fetch. - */ - where: CustomerWhereUniqueInput - } - - /** - * Customer findFirst - */ - export type CustomerFindFirstArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter, which Customer to fetch. - */ - where?: CustomerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Customers to fetch. - */ - orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Customers. - */ - cursor?: CustomerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Customers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Customers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Customers. - */ - distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] - } - - /** - * Customer findFirstOrThrow - */ - export type CustomerFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter, which Customer to fetch. - */ - where?: CustomerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Customers to fetch. - */ - orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Customers. - */ - cursor?: CustomerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Customers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Customers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Customers. - */ - distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] - } - - /** - * Customer findMany - */ - export type CustomerFindManyArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter, which Customers to fetch. - */ - where?: CustomerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Customers to fetch. - */ - orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Customers. - */ - cursor?: CustomerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Customers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Customers. - */ - skip?: number - distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] - } - - /** - * Customer create - */ - export type CustomerCreateArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * The data needed to create a Customer. - */ - data: XOR - } - - /** - * Customer createMany - */ - export type CustomerCreateManyArgs = { - /** - * The data used to create many Customers. - */ - data: CustomerCreateManyInput | CustomerCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Customer createManyAndReturn - */ - export type CustomerCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelectCreateManyAndReturn | null - /** - * The data used to create many Customers. - */ - data: CustomerCreateManyInput | CustomerCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Customer update - */ - export type CustomerUpdateArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * The data needed to update a Customer. - */ - data: XOR - /** - * Choose, which Customer to update. - */ - where: CustomerWhereUniqueInput - } - - /** - * Customer updateMany - */ - export type CustomerUpdateManyArgs = { - /** - * The data used to update Customers. - */ - data: XOR - /** - * Filter which Customers to update - */ - where?: CustomerWhereInput - } - - /** - * Customer upsert - */ - export type CustomerUpsertArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * The filter to search for the Customer to update in case it exists. - */ - where: CustomerWhereUniqueInput - /** - * In case the Customer found by the `where` argument doesn't exist, create a new Customer with this data. - */ - create: XOR - /** - * In case the Customer was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Customer delete - */ - export type CustomerDeleteArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - /** - * Filter which Customer to delete. - */ - where: CustomerWhereUniqueInput - } - - /** - * Customer deleteMany - */ - export type CustomerDeleteManyArgs = { - /** - * Filter which Customers to delete - */ - where?: CustomerWhereInput - } - - /** - * Customer.address - */ - export type Customer$addressArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - where?: AddressWhereInput - } - - /** - * Customer.orders - */ - export type Customer$ordersArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - where?: OrderWhereInput - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - cursor?: OrderWhereUniqueInput - take?: number - skip?: number - distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] - } - - /** - * Customer without action - */ - export type CustomerDefaultArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: CustomerSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CustomerInclude | null - } - - - /** - * Model Address - */ - - export type AggregateAddress = { - _count: AddressCountAggregateOutputType | null - _avg: AddressAvgAggregateOutputType | null - _sum: AddressSumAggregateOutputType | null - _min: AddressMinAggregateOutputType | null - _max: AddressMaxAggregateOutputType | null - } - - export type AddressAvgAggregateOutputType = { - id: number | null - customerId: number | null - } - - export type AddressSumAggregateOutputType = { - id: number | null - customerId: number | null - } - - export type AddressMinAggregateOutputType = { - id: number | null - street: string | null - city: string | null - postalCode: string | null - country: string | null - customerId: number | null - } - - export type AddressMaxAggregateOutputType = { - id: number | null - street: string | null - city: string | null - postalCode: string | null - country: string | null - customerId: number | null - } - - export type AddressCountAggregateOutputType = { - id: number - street: number - city: number - postalCode: number - country: number - customerId: number - _all: number - } - - - export type AddressAvgAggregateInputType = { - id?: true - customerId?: true - } - - export type AddressSumAggregateInputType = { - id?: true - customerId?: true - } - - export type AddressMinAggregateInputType = { - id?: true - street?: true - city?: true - postalCode?: true - country?: true - customerId?: true - } - - export type AddressMaxAggregateInputType = { - id?: true - street?: true - city?: true - postalCode?: true - country?: true - customerId?: true - } - - export type AddressCountAggregateInputType = { - id?: true - street?: true - city?: true - postalCode?: true - country?: true - customerId?: true - _all?: true - } - - export type AddressAggregateArgs = { - /** - * Filter which Address to aggregate. - */ - where?: AddressWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Addresses to fetch. - */ - orderBy?: AddressOrderByWithRelationInput | AddressOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: AddressWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Addresses from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Addresses. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Addresses - **/ - _count?: true | AddressCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AddressAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AddressSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AddressMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AddressMaxAggregateInputType - } - - export type GetAddressAggregateType = { - [P in keyof T & keyof AggregateAddress]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AddressGroupByArgs = { - where?: AddressWhereInput - orderBy?: AddressOrderByWithAggregationInput | AddressOrderByWithAggregationInput[] - by: AddressScalarFieldEnum[] | AddressScalarFieldEnum - having?: AddressScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AddressCountAggregateInputType | true - _avg?: AddressAvgAggregateInputType - _sum?: AddressSumAggregateInputType - _min?: AddressMinAggregateInputType - _max?: AddressMaxAggregateInputType - } - - export type AddressGroupByOutputType = { - id: number - street: string | null - city: string | null - postalCode: string | null - country: string | null - customerId: number - _count: AddressCountAggregateOutputType | null - _avg: AddressAvgAggregateOutputType | null - _sum: AddressSumAggregateOutputType | null - _min: AddressMinAggregateOutputType | null - _max: AddressMaxAggregateOutputType | null - } - - type GetAddressGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof AddressGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AddressSelect = $Extensions.GetSelect<{ - id?: boolean - street?: boolean - city?: boolean - postalCode?: boolean - country?: boolean - customerId?: boolean - customer?: boolean | CustomerDefaultArgs - }, ExtArgs["result"]["address"]> - - export type AddressSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - street?: boolean - city?: boolean - postalCode?: boolean - country?: boolean - customerId?: boolean - customer?: boolean | CustomerDefaultArgs - }, ExtArgs["result"]["address"]> - - export type AddressSelectScalar = { - id?: boolean - street?: boolean - city?: boolean - postalCode?: boolean - country?: boolean - customerId?: boolean - } - - export type AddressInclude = { - customer?: boolean | CustomerDefaultArgs - } - export type AddressIncludeCreateManyAndReturn = { - customer?: boolean | CustomerDefaultArgs - } - - export type $AddressPayload = { - name: "Address" - objects: { - customer: Prisma.$CustomerPayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - street: string | null - city: string | null - postalCode: string | null - country: string | null - customerId: number - }, ExtArgs["result"]["address"]> - composites: {} - } - - type AddressGetPayload = $Result.GetResult - - type AddressCountArgs = - Omit & { - select?: AddressCountAggregateInputType | true - } - - export interface AddressDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Address'], meta: { name: 'Address' } } - /** - * Find zero or one Address that matches the filter. - * @param {AddressFindUniqueArgs} args - Arguments to find a Address - * @example - * // Get one Address - * const address = await prisma.address.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> - - /** - * Find one Address that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AddressFindUniqueOrThrowArgs} args - Arguments to find a Address - * @example - * // Get one Address - * const address = await prisma.address.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> - - /** - * Find the first Address that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressFindFirstArgs} args - Arguments to find a Address - * @example - * // Get one Address - * const address = await prisma.address.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> - - /** - * Find the first Address that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressFindFirstOrThrowArgs} args - Arguments to find a Address - * @example - * // Get one Address - * const address = await prisma.address.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> - - /** - * Find zero or more Addresses that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Addresses - * const addresses = await prisma.address.findMany() - * - * // Get first 10 Addresses - * const addresses = await prisma.address.findMany({ take: 10 }) - * - * // Only select the `id` - * const addressWithIdOnly = await prisma.address.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> - - /** - * Create a Address. - * @param {AddressCreateArgs} args - Arguments to create a Address. - * @example - * // Create one Address - * const Address = await prisma.address.create({ - * data: { - * // ... data to create a Address - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'create'>, never, ExtArgs> - - /** - * Create many Addresses. - * @param {AddressCreateManyArgs} args - Arguments to create many Addresses. - * @example - * // Create many Addresses - * const address = await prisma.address.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create many Addresses and returns the data saved in the database. - * @param {AddressCreateManyAndReturnArgs} args - Arguments to create many Addresses. - * @example - * // Create many Addresses - * const address = await prisma.address.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Addresses and only return the `id` - * const addressWithIdOnly = await prisma.address.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - **/ - createManyAndReturn>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'createManyAndReturn'>> - - /** - * Delete a Address. - * @param {AddressDeleteArgs} args - Arguments to delete one Address. - * @example - * // Delete one Address - * const Address = await prisma.address.delete({ - * where: { - * // ... filter to delete one Address - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> - - /** - * Update one Address. - * @param {AddressUpdateArgs} args - Arguments to update one Address. - * @example - * // Update one Address - * const address = await prisma.address.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'update'>, never, ExtArgs> - - /** - * Delete zero or more Addresses. - * @param {AddressDeleteManyArgs} args - Arguments to filter Addresses to delete. - * @example - * // Delete a few Addresses - * const { count } = await prisma.address.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Addresses. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Addresses - * const address = await prisma.address.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Address. - * @param {AddressUpsertArgs} args - Arguments to update or create a Address. - * @example - * // Update or create a Address - * const address = await prisma.address.upsert({ - * create: { - * // ... data to create a Address - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Address we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__AddressClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> - - /** - * Count the number of Addresses. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressCountArgs} args - Arguments to filter Addresses to count. - * @example - * // Count the number of Addresses - * const count = await prisma.address.count({ - * where: { - * // ... the filter for the Addresses we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Address. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Address. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AddressGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AddressGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AddressGroupByArgs['orderBy'] } - : { orderBy?: AddressGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAddressGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Address model - */ - readonly fields: AddressFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Address. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__AddressClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - - - /** - * Fields of the Address model - */ - interface AddressFieldRefs { - readonly id: FieldRef<"Address", 'Int'> - readonly street: FieldRef<"Address", 'String'> - readonly city: FieldRef<"Address", 'String'> - readonly postalCode: FieldRef<"Address", 'String'> - readonly country: FieldRef<"Address", 'String'> - readonly customerId: FieldRef<"Address", 'Int'> - } - - - // Custom InputTypes - /** - * Address findUnique - */ - export type AddressFindUniqueArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter, which Address to fetch. - */ - where: AddressWhereUniqueInput - } - - /** - * Address findUniqueOrThrow - */ - export type AddressFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter, which Address to fetch. - */ - where: AddressWhereUniqueInput - } - - /** - * Address findFirst - */ - export type AddressFindFirstArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter, which Address to fetch. - */ - where?: AddressWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Addresses to fetch. - */ - orderBy?: AddressOrderByWithRelationInput | AddressOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Addresses. - */ - cursor?: AddressWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Addresses from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Addresses. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Addresses. - */ - distinct?: AddressScalarFieldEnum | AddressScalarFieldEnum[] - } - - /** - * Address findFirstOrThrow - */ - export type AddressFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter, which Address to fetch. - */ - where?: AddressWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Addresses to fetch. - */ - orderBy?: AddressOrderByWithRelationInput | AddressOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Addresses. - */ - cursor?: AddressWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Addresses from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Addresses. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Addresses. - */ - distinct?: AddressScalarFieldEnum | AddressScalarFieldEnum[] - } - - /** - * Address findMany - */ - export type AddressFindManyArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter, which Addresses to fetch. - */ - where?: AddressWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Addresses to fetch. - */ - orderBy?: AddressOrderByWithRelationInput | AddressOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Addresses. - */ - cursor?: AddressWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Addresses from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Addresses. - */ - skip?: number - distinct?: AddressScalarFieldEnum | AddressScalarFieldEnum[] - } - - /** - * Address create - */ - export type AddressCreateArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * The data needed to create a Address. - */ - data: XOR - } - - /** - * Address createMany - */ - export type AddressCreateManyArgs = { - /** - * The data used to create many Addresses. - */ - data: AddressCreateManyInput | AddressCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Address createManyAndReturn - */ - export type AddressCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelectCreateManyAndReturn | null - /** - * The data used to create many Addresses. - */ - data: AddressCreateManyInput | AddressCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressIncludeCreateManyAndReturn | null - } - - /** - * Address update - */ - export type AddressUpdateArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * The data needed to update a Address. - */ - data: XOR - /** - * Choose, which Address to update. - */ - where: AddressWhereUniqueInput - } - - /** - * Address updateMany - */ - export type AddressUpdateManyArgs = { - /** - * The data used to update Addresses. - */ - data: XOR - /** - * Filter which Addresses to update - */ - where?: AddressWhereInput - } - - /** - * Address upsert - */ - export type AddressUpsertArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * The filter to search for the Address to update in case it exists. - */ - where: AddressWhereUniqueInput - /** - * In case the Address found by the `where` argument doesn't exist, create a new Address with this data. - */ - create: XOR - /** - * In case the Address was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Address delete - */ - export type AddressDeleteArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - /** - * Filter which Address to delete. - */ - where: AddressWhereUniqueInput - } - - /** - * Address deleteMany - */ - export type AddressDeleteManyArgs = { - /** - * Filter which Addresses to delete - */ - where?: AddressWhereInput - } - - /** - * Address without action - */ - export type AddressDefaultArgs = { - /** - * Select specific fields to fetch from the Address - */ - select?: AddressSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AddressInclude | null - } - - - /** - * Model Order - */ - - export type AggregateOrder = { - _count: OrderCountAggregateOutputType | null - _avg: OrderAvgAggregateOutputType | null - _sum: OrderSumAggregateOutputType | null - _min: OrderMinAggregateOutputType | null - _max: OrderMaxAggregateOutputType | null - } - - export type OrderAvgAggregateOutputType = { - id: number | null - totalAmount: number | null - customerId: number | null - } - - export type OrderSumAggregateOutputType = { - id: number | null - totalAmount: number | null - customerId: number | null - } - - export type OrderMinAggregateOutputType = { - id: number | null - date: Date | null - totalAmount: number | null - customerId: number | null - } - - export type OrderMaxAggregateOutputType = { - id: number | null - date: Date | null - totalAmount: number | null - customerId: number | null - } - - export type OrderCountAggregateOutputType = { - id: number - date: number - totalAmount: number - customerId: number - _all: number - } - - - export type OrderAvgAggregateInputType = { - id?: true - totalAmount?: true - customerId?: true - } - - export type OrderSumAggregateInputType = { - id?: true - totalAmount?: true - customerId?: true - } - - export type OrderMinAggregateInputType = { - id?: true - date?: true - totalAmount?: true - customerId?: true - } - - export type OrderMaxAggregateInputType = { - id?: true - date?: true - totalAmount?: true - customerId?: true - } - - export type OrderCountAggregateInputType = { - id?: true - date?: true - totalAmount?: true - customerId?: true - _all?: true - } - - export type OrderAggregateArgs = { - /** - * Filter which Order to aggregate. - */ - where?: OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Orders - **/ - _count?: true | OrderCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: OrderAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: OrderSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: OrderMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: OrderMaxAggregateInputType - } - - export type GetOrderAggregateType = { - [P in keyof T & keyof AggregateOrder]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type OrderGroupByArgs = { - where?: OrderWhereInput - orderBy?: OrderOrderByWithAggregationInput | OrderOrderByWithAggregationInput[] - by: OrderScalarFieldEnum[] | OrderScalarFieldEnum - having?: OrderScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: OrderCountAggregateInputType | true - _avg?: OrderAvgAggregateInputType - _sum?: OrderSumAggregateInputType - _min?: OrderMinAggregateInputType - _max?: OrderMaxAggregateInputType - } - - export type OrderGroupByOutputType = { - id: number - date: Date - totalAmount: number - customerId: number - _count: OrderCountAggregateOutputType | null - _avg: OrderAvgAggregateOutputType | null - _sum: OrderSumAggregateOutputType | null - _min: OrderMinAggregateOutputType | null - _max: OrderMaxAggregateOutputType | null - } - - type GetOrderGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof OrderGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type OrderSelect = $Extensions.GetSelect<{ - id?: boolean - date?: boolean - totalAmount?: boolean - customerId?: boolean - customer?: boolean | CustomerDefaultArgs - products?: boolean | Order$productsArgs - _count?: boolean | OrderCountOutputTypeDefaultArgs - }, ExtArgs["result"]["order"]> - - export type OrderSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - date?: boolean - totalAmount?: boolean - customerId?: boolean - customer?: boolean | CustomerDefaultArgs - }, ExtArgs["result"]["order"]> - - export type OrderSelectScalar = { - id?: boolean - date?: boolean - totalAmount?: boolean - customerId?: boolean - } - - export type OrderInclude = { - customer?: boolean | CustomerDefaultArgs - products?: boolean | Order$productsArgs - _count?: boolean | OrderCountOutputTypeDefaultArgs - } - export type OrderIncludeCreateManyAndReturn = { - customer?: boolean | CustomerDefaultArgs - } - - export type $OrderPayload = { - name: "Order" - objects: { - customer: Prisma.$CustomerPayload - products: Prisma.$ProductPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - date: Date - totalAmount: number - customerId: number - }, ExtArgs["result"]["order"]> - composites: {} - } - - type OrderGetPayload = $Result.GetResult - - type OrderCountArgs = - Omit & { - select?: OrderCountAggregateInputType | true - } - - export interface OrderDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Order'], meta: { name: 'Order' } } - /** - * Find zero or one Order that matches the filter. - * @param {OrderFindUniqueArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> - - /** - * Find one Order that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {OrderFindUniqueOrThrowArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> - - /** - * Find the first Order that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindFirstArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> - - /** - * Find the first Order that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindFirstOrThrowArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> - - /** - * Find zero or more Orders that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Orders - * const orders = await prisma.order.findMany() - * - * // Get first 10 Orders - * const orders = await prisma.order.findMany({ take: 10 }) - * - * // Only select the `id` - * const orderWithIdOnly = await prisma.order.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> - - /** - * Create a Order. - * @param {OrderCreateArgs} args - Arguments to create a Order. - * @example - * // Create one Order - * const Order = await prisma.order.create({ - * data: { - * // ... data to create a Order - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'create'>, never, ExtArgs> - - /** - * Create many Orders. - * @param {OrderCreateManyArgs} args - Arguments to create many Orders. - * @example - * // Create many Orders - * const order = await prisma.order.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create many Orders and returns the data saved in the database. - * @param {OrderCreateManyAndReturnArgs} args - Arguments to create many Orders. - * @example - * // Create many Orders - * const order = await prisma.order.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Orders and only return the `id` - * const orderWithIdOnly = await prisma.order.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - **/ - createManyAndReturn>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'createManyAndReturn'>> - - /** - * Delete a Order. - * @param {OrderDeleteArgs} args - Arguments to delete one Order. - * @example - * // Delete one Order - * const Order = await prisma.order.delete({ - * where: { - * // ... filter to delete one Order - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> - - /** - * Update one Order. - * @param {OrderUpdateArgs} args - Arguments to update one Order. - * @example - * // Update one Order - * const order = await prisma.order.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'update'>, never, ExtArgs> - - /** - * Delete zero or more Orders. - * @param {OrderDeleteManyArgs} args - Arguments to filter Orders to delete. - * @example - * // Delete a few Orders - * const { count } = await prisma.order.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Orders. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Orders - * const order = await prisma.order.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Order. - * @param {OrderUpsertArgs} args - Arguments to update or create a Order. - * @example - * // Update or create a Order - * const order = await prisma.order.upsert({ - * create: { - * // ... data to create a Order - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Order we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__OrderClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> - - /** - * Count the number of Orders. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderCountArgs} args - Arguments to filter Orders to count. - * @example - * // Count the number of Orders - * const count = await prisma.order.count({ - * where: { - * // ... the filter for the Orders we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Order. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Order. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends OrderGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: OrderGroupByArgs['orderBy'] } - : { orderBy?: OrderGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetOrderGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Order model - */ - readonly fields: OrderFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Order. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__OrderClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - - products = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - - - /** - * Fields of the Order model - */ - interface OrderFieldRefs { - readonly id: FieldRef<"Order", 'Int'> - readonly date: FieldRef<"Order", 'DateTime'> - readonly totalAmount: FieldRef<"Order", 'Float'> - readonly customerId: FieldRef<"Order", 'Int'> - } - - - // Custom InputTypes - /** - * Order findUnique - */ - export type OrderFindUniqueArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where: OrderWhereUniqueInput - } - - /** - * Order findUniqueOrThrow - */ - export type OrderFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where: OrderWhereUniqueInput - } - - /** - * Order findFirst - */ - export type OrderFindFirstArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where?: OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Orders. - */ - cursor?: OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Orders. - */ - distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] - } - - /** - * Order findFirstOrThrow - */ - export type OrderFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where?: OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Orders. - */ - cursor?: OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Orders. - */ - distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] - } - - /** - * Order findMany - */ - export type OrderFindManyArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter, which Orders to fetch. - */ - where?: OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Orders. - */ - cursor?: OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] - } - - /** - * Order create - */ - export type OrderCreateArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * The data needed to create a Order. - */ - data: XOR - } - - /** - * Order createMany - */ - export type OrderCreateManyArgs = { - /** - * The data used to create many Orders. - */ - data: OrderCreateManyInput | OrderCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Order createManyAndReturn - */ - export type OrderCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelectCreateManyAndReturn | null - /** - * The data used to create many Orders. - */ - data: OrderCreateManyInput | OrderCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderIncludeCreateManyAndReturn | null - } - - /** - * Order update - */ - export type OrderUpdateArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * The data needed to update a Order. - */ - data: XOR - /** - * Choose, which Order to update. - */ - where: OrderWhereUniqueInput - } - - /** - * Order updateMany - */ - export type OrderUpdateManyArgs = { - /** - * The data used to update Orders. - */ - data: XOR - /** - * Filter which Orders to update - */ - where?: OrderWhereInput - } - - /** - * Order upsert - */ - export type OrderUpsertArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * The filter to search for the Order to update in case it exists. - */ - where: OrderWhereUniqueInput - /** - * In case the Order found by the `where` argument doesn't exist, create a new Order with this data. - */ - create: XOR - /** - * In case the Order was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Order delete - */ - export type OrderDeleteArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - /** - * Filter which Order to delete. - */ - where: OrderWhereUniqueInput - } - - /** - * Order deleteMany - */ - export type OrderDeleteManyArgs = { - /** - * Filter which Orders to delete - */ - where?: OrderWhereInput - } - - /** - * Order.products - */ - export type Order$productsArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - where?: ProductWhereInput - orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] - cursor?: ProductWhereUniqueInput - take?: number - skip?: number - distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] - } - - /** - * Order without action - */ - export type OrderDefaultArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - } - - - /** - * Model Product - */ - - export type AggregateProduct = { - _count: ProductCountAggregateOutputType | null - _avg: ProductAvgAggregateOutputType | null - _sum: ProductSumAggregateOutputType | null - _min: ProductMinAggregateOutputType | null - _max: ProductMaxAggregateOutputType | null - } - - export type ProductAvgAggregateOutputType = { - id: number | null - price: number | null - quantity: number | null - } - - export type ProductSumAggregateOutputType = { - id: number | null - price: number | null - quantity: number | null - } - - export type ProductMinAggregateOutputType = { - id: number | null - name: string | null - price: number | null - quantity: number | null - description: string | null - } - - export type ProductMaxAggregateOutputType = { - id: number | null - name: string | null - price: number | null - quantity: number | null - description: string | null - } - - export type ProductCountAggregateOutputType = { - id: number - name: number - price: number - quantity: number - description: number - _all: number - } - - - export type ProductAvgAggregateInputType = { - id?: true - price?: true - quantity?: true - } - - export type ProductSumAggregateInputType = { - id?: true - price?: true - quantity?: true - } - - export type ProductMinAggregateInputType = { - id?: true - name?: true - price?: true - quantity?: true - description?: true - } - - export type ProductMaxAggregateInputType = { - id?: true - name?: true - price?: true - quantity?: true - description?: true - } - - export type ProductCountAggregateInputType = { - id?: true - name?: true - price?: true - quantity?: true - description?: true - _all?: true - } - - export type ProductAggregateArgs = { - /** - * Filter which Product to aggregate. - */ - where?: ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Products - **/ - _count?: true | ProductCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductMaxAggregateInputType - } - - export type GetProductAggregateType = { - [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ProductGroupByArgs = { - where?: ProductWhereInput - orderBy?: ProductOrderByWithAggregationInput | ProductOrderByWithAggregationInput[] - by: ProductScalarFieldEnum[] | ProductScalarFieldEnum - having?: ProductScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductCountAggregateInputType | true - _avg?: ProductAvgAggregateInputType - _sum?: ProductSumAggregateInputType - _min?: ProductMinAggregateInputType - _max?: ProductMaxAggregateInputType - } - - export type ProductGroupByOutputType = { - id: number - name: string - price: number - quantity: number - description: string | null - _count: ProductCountAggregateOutputType | null - _avg: ProductAvgAggregateOutputType | null - _sum: ProductSumAggregateOutputType | null - _min: ProductMinAggregateOutputType | null - _max: ProductMaxAggregateOutputType | null - } - - type GetProductGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ProductSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - price?: boolean - quantity?: boolean - description?: boolean - orders?: boolean | Product$ordersArgs - _count?: boolean | ProductCountOutputTypeDefaultArgs - }, ExtArgs["result"]["product"]> - - export type ProductSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - price?: boolean - quantity?: boolean - description?: boolean - }, ExtArgs["result"]["product"]> - - export type ProductSelectScalar = { - id?: boolean - name?: boolean - price?: boolean - quantity?: boolean - description?: boolean - } - - export type ProductInclude = { - orders?: boolean | Product$ordersArgs - _count?: boolean | ProductCountOutputTypeDefaultArgs - } - export type ProductIncludeCreateManyAndReturn = {} - - export type $ProductPayload = { - name: "Product" - objects: { - orders: Prisma.$OrderPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - price: number - quantity: number - description: string | null - }, ExtArgs["result"]["product"]> - composites: {} - } - - type ProductGetPayload = $Result.GetResult - - type ProductCountArgs = - Omit & { - select?: ProductCountAggregateInputType | true - } - - export interface ProductDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Product'], meta: { name: 'Product' } } - /** - * Find zero or one Product that matches the filter. - * @param {ProductFindUniqueArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> - - /** - * Find one Product that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> - - /** - * Find the first Product that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindFirstArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> - - /** - * Find the first Product that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindFirstOrThrowArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> - - /** - * Find zero or more Products that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Products - * const products = await prisma.product.findMany() - * - * // Get first 10 Products - * const products = await prisma.product.findMany({ take: 10 }) - * - * // Only select the `id` - * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> - - /** - * Create a Product. - * @param {ProductCreateArgs} args - Arguments to create a Product. - * @example - * // Create one Product - * const Product = await prisma.product.create({ - * data: { - * // ... data to create a Product - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'create'>, never, ExtArgs> - - /** - * Create many Products. - * @param {ProductCreateManyArgs} args - Arguments to create many Products. - * @example - * // Create many Products - * const product = await prisma.product.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create many Products and returns the data saved in the database. - * @param {ProductCreateManyAndReturnArgs} args - Arguments to create many Products. - * @example - * // Create many Products - * const product = await prisma.product.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Products and only return the `id` - * const productWithIdOnly = await prisma.product.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - **/ - createManyAndReturn>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'createManyAndReturn'>> - - /** - * Delete a Product. - * @param {ProductDeleteArgs} args - Arguments to delete one Product. - * @example - * // Delete one Product - * const Product = await prisma.product.delete({ - * where: { - * // ... filter to delete one Product - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> - - /** - * Update one Product. - * @param {ProductUpdateArgs} args - Arguments to update one Product. - * @example - * // Update one Product - * const product = await prisma.product.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'update'>, never, ExtArgs> - - /** - * Delete zero or more Products. - * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete. - * @example - * // Delete a few Products - * const { count } = await prisma.product.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Products. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Products - * const product = await prisma.product.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Product. - * @param {ProductUpsertArgs} args - Arguments to update or create a Product. - * @example - * // Update or create a Product - * const product = await prisma.product.upsert({ - * create: { - * // ... data to create a Product - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Product we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__ProductClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> - - /** - * Count the number of Products. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCountArgs} args - Arguments to filter Products to count. - * @example - * // Count the number of Products - * const count = await prisma.product.count({ - * where: { - * // ... the filter for the Products we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Product. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Product. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProductGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ProductGroupByArgs['orderBy'] } - : { orderBy?: ProductGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Product model - */ - readonly fields: ProductFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Product. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ProductClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - orders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - - - /** - * Fields of the Product model - */ - interface ProductFieldRefs { - readonly id: FieldRef<"Product", 'Int'> - readonly name: FieldRef<"Product", 'String'> - readonly price: FieldRef<"Product", 'Float'> - readonly quantity: FieldRef<"Product", 'Int'> - readonly description: FieldRef<"Product", 'String'> - } - - - // Custom InputTypes - /** - * Product findUnique - */ - export type ProductFindUniqueArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where: ProductWhereUniqueInput - } - - /** - * Product findUniqueOrThrow - */ - export type ProductFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where: ProductWhereUniqueInput - } - - /** - * Product findFirst - */ - export type ProductFindFirstArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where?: ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Products. - */ - cursor?: ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Products. - */ - distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] - } - - /** - * Product findFirstOrThrow - */ - export type ProductFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where?: ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Products. - */ - cursor?: ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Products. - */ - distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] - } - - /** - * Product findMany - */ - export type ProductFindManyArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter, which Products to fetch. - */ - where?: ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Products. - */ - cursor?: ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] - } - - /** - * Product create - */ - export type ProductCreateArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * The data needed to create a Product. - */ - data: XOR - } - - /** - * Product createMany - */ - export type ProductCreateManyArgs = { - /** - * The data used to create many Products. - */ - data: ProductCreateManyInput | ProductCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Product createManyAndReturn - */ - export type ProductCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelectCreateManyAndReturn | null - /** - * The data used to create many Products. - */ - data: ProductCreateManyInput | ProductCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Product update - */ - export type ProductUpdateArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * The data needed to update a Product. - */ - data: XOR - /** - * Choose, which Product to update. - */ - where: ProductWhereUniqueInput - } - - /** - * Product updateMany - */ - export type ProductUpdateManyArgs = { - /** - * The data used to update Products. - */ - data: XOR - /** - * Filter which Products to update - */ - where?: ProductWhereInput - } - - /** - * Product upsert - */ - export type ProductUpsertArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * The filter to search for the Product to update in case it exists. - */ - where: ProductWhereUniqueInput - /** - * In case the Product found by the `where` argument doesn't exist, create a new Product with this data. - */ - create: XOR - /** - * In case the Product was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Product delete - */ - export type ProductDeleteArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - /** - * Filter which Product to delete. - */ - where: ProductWhereUniqueInput - } - - /** - * Product deleteMany - */ - export type ProductDeleteManyArgs = { - /** - * Filter which Products to delete - */ - where?: ProductWhereInput - } - - /** - * Product.orders - */ - export type Product$ordersArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: OrderSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: OrderInclude | null - where?: OrderWhereInput - orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] - cursor?: OrderWhereUniqueInput - take?: number - skip?: number - distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] - } - - /** - * Product without action - */ - export type ProductDefaultArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: ProductSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ProductInclude | null - } - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const CustomerScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - name: 'name', - email: 'email', - isActive: 'isActive' - }; - - export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] - - - export const AddressScalarFieldEnum: { - id: 'id', - street: 'street', - city: 'city', - postalCode: 'postalCode', - country: 'country', - customerId: 'customerId' - }; - - export type AddressScalarFieldEnum = (typeof AddressScalarFieldEnum)[keyof typeof AddressScalarFieldEnum] - - - export const OrderScalarFieldEnum: { - id: 'id', - date: 'date', - totalAmount: 'totalAmount', - customerId: 'customerId' - }; - - export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] - - - export const ProductScalarFieldEnum: { - id: 'id', - name: 'name', - price: 'price', - quantity: 'quantity', - description: 'description' - }; - - export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - - export const NullsOrder: { - first: 'first', - last: 'last' - }; - - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - - - /** - * Field references - */ - - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - - - - /** - * Reference to a field of type 'Int[]' - */ - export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> - - - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - - - /** - * Reference to a field of type 'DateTime[]' - */ - export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> - - - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - - /** - * Reference to a field of type 'String[]' - */ - export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> - - - - /** - * Reference to a field of type 'Boolean' - */ - export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> - - - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> - - - - /** - * Reference to a field of type 'Float[]' - */ - export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> - - /** - * Deep Input Types - */ - - - export type CustomerWhereInput = { - AND?: CustomerWhereInput | CustomerWhereInput[] - OR?: CustomerWhereInput[] - NOT?: CustomerWhereInput | CustomerWhereInput[] - id?: IntFilter<"Customer"> | number - createdAt?: DateTimeFilter<"Customer"> | Date | string - name?: StringNullableFilter<"Customer"> | string | null - email?: StringFilter<"Customer"> | string - isActive?: BoolFilter<"Customer"> | boolean - address?: XOR | null - orders?: OrderListRelationFilter - } - - export type CustomerOrderByWithRelationInput = { - id?: SortOrder - createdAt?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - isActive?: SortOrder - address?: AddressOrderByWithRelationInput - orders?: OrderOrderByRelationAggregateInput - } - - export type CustomerWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CustomerWhereInput | CustomerWhereInput[] - OR?: CustomerWhereInput[] - NOT?: CustomerWhereInput | CustomerWhereInput[] - createdAt?: DateTimeFilter<"Customer"> | Date | string - name?: StringNullableFilter<"Customer"> | string | null - email?: StringFilter<"Customer"> | string - isActive?: BoolFilter<"Customer"> | boolean - address?: XOR | null - orders?: OrderListRelationFilter - }, "id"> - - export type CustomerOrderByWithAggregationInput = { - id?: SortOrder - createdAt?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - isActive?: SortOrder - _count?: CustomerCountOrderByAggregateInput - _avg?: CustomerAvgOrderByAggregateInput - _max?: CustomerMaxOrderByAggregateInput - _min?: CustomerMinOrderByAggregateInput - _sum?: CustomerSumOrderByAggregateInput - } - - export type CustomerScalarWhereWithAggregatesInput = { - AND?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[] - OR?: CustomerScalarWhereWithAggregatesInput[] - NOT?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Customer"> | number - createdAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string - name?: StringNullableWithAggregatesFilter<"Customer"> | string | null - email?: StringWithAggregatesFilter<"Customer"> | string - isActive?: BoolWithAggregatesFilter<"Customer"> | boolean - } - - export type AddressWhereInput = { - AND?: AddressWhereInput | AddressWhereInput[] - OR?: AddressWhereInput[] - NOT?: AddressWhereInput | AddressWhereInput[] - id?: IntFilter<"Address"> | number - street?: StringNullableFilter<"Address"> | string | null - city?: StringNullableFilter<"Address"> | string | null - postalCode?: StringNullableFilter<"Address"> | string | null - country?: StringNullableFilter<"Address"> | string | null - customerId?: IntFilter<"Address"> | number - customer?: XOR - } - - export type AddressOrderByWithRelationInput = { - id?: SortOrder - street?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - postalCode?: SortOrderInput | SortOrder - country?: SortOrderInput | SortOrder - customerId?: SortOrder - customer?: CustomerOrderByWithRelationInput - } - - export type AddressWhereUniqueInput = Prisma.AtLeast<{ - id?: number - customerId?: number - AND?: AddressWhereInput | AddressWhereInput[] - OR?: AddressWhereInput[] - NOT?: AddressWhereInput | AddressWhereInput[] - street?: StringNullableFilter<"Address"> | string | null - city?: StringNullableFilter<"Address"> | string | null - postalCode?: StringNullableFilter<"Address"> | string | null - country?: StringNullableFilter<"Address"> | string | null - customer?: XOR - }, "id" | "customerId"> - - export type AddressOrderByWithAggregationInput = { - id?: SortOrder - street?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - postalCode?: SortOrderInput | SortOrder - country?: SortOrderInput | SortOrder - customerId?: SortOrder - _count?: AddressCountOrderByAggregateInput - _avg?: AddressAvgOrderByAggregateInput - _max?: AddressMaxOrderByAggregateInput - _min?: AddressMinOrderByAggregateInput - _sum?: AddressSumOrderByAggregateInput - } - - export type AddressScalarWhereWithAggregatesInput = { - AND?: AddressScalarWhereWithAggregatesInput | AddressScalarWhereWithAggregatesInput[] - OR?: AddressScalarWhereWithAggregatesInput[] - NOT?: AddressScalarWhereWithAggregatesInput | AddressScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Address"> | number - street?: StringNullableWithAggregatesFilter<"Address"> | string | null - city?: StringNullableWithAggregatesFilter<"Address"> | string | null - postalCode?: StringNullableWithAggregatesFilter<"Address"> | string | null - country?: StringNullableWithAggregatesFilter<"Address"> | string | null - customerId?: IntWithAggregatesFilter<"Address"> | number - } - - export type OrderWhereInput = { - AND?: OrderWhereInput | OrderWhereInput[] - OR?: OrderWhereInput[] - NOT?: OrderWhereInput | OrderWhereInput[] - id?: IntFilter<"Order"> | number - date?: DateTimeFilter<"Order"> | Date | string - totalAmount?: FloatFilter<"Order"> | number - customerId?: IntFilter<"Order"> | number - customer?: XOR - products?: ProductListRelationFilter - } - - export type OrderOrderByWithRelationInput = { - id?: SortOrder - date?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - customer?: CustomerOrderByWithRelationInput - products?: ProductOrderByRelationAggregateInput - } - - export type OrderWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: OrderWhereInput | OrderWhereInput[] - OR?: OrderWhereInput[] - NOT?: OrderWhereInput | OrderWhereInput[] - date?: DateTimeFilter<"Order"> | Date | string - totalAmount?: FloatFilter<"Order"> | number - customerId?: IntFilter<"Order"> | number - customer?: XOR - products?: ProductListRelationFilter - }, "id"> - - export type OrderOrderByWithAggregationInput = { - id?: SortOrder - date?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - _count?: OrderCountOrderByAggregateInput - _avg?: OrderAvgOrderByAggregateInput - _max?: OrderMaxOrderByAggregateInput - _min?: OrderMinOrderByAggregateInput - _sum?: OrderSumOrderByAggregateInput - } - - export type OrderScalarWhereWithAggregatesInput = { - AND?: OrderScalarWhereWithAggregatesInput | OrderScalarWhereWithAggregatesInput[] - OR?: OrderScalarWhereWithAggregatesInput[] - NOT?: OrderScalarWhereWithAggregatesInput | OrderScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Order"> | number - date?: DateTimeWithAggregatesFilter<"Order"> | Date | string - totalAmount?: FloatWithAggregatesFilter<"Order"> | number - customerId?: IntWithAggregatesFilter<"Order"> | number - } - - export type ProductWhereInput = { - AND?: ProductWhereInput | ProductWhereInput[] - OR?: ProductWhereInput[] - NOT?: ProductWhereInput | ProductWhereInput[] - id?: IntFilter<"Product"> | number - name?: StringFilter<"Product"> | string - price?: FloatFilter<"Product"> | number - quantity?: IntFilter<"Product"> | number - description?: StringNullableFilter<"Product"> | string | null - orders?: OrderListRelationFilter - } - - export type ProductOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - price?: SortOrder - quantity?: SortOrder - description?: SortOrderInput | SortOrder - orders?: OrderOrderByRelationAggregateInput - } - - export type ProductWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: ProductWhereInput | ProductWhereInput[] - OR?: ProductWhereInput[] - NOT?: ProductWhereInput | ProductWhereInput[] - name?: StringFilter<"Product"> | string - price?: FloatFilter<"Product"> | number - quantity?: IntFilter<"Product"> | number - description?: StringNullableFilter<"Product"> | string | null - orders?: OrderListRelationFilter - }, "id"> - - export type ProductOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - price?: SortOrder - quantity?: SortOrder - description?: SortOrderInput | SortOrder - _count?: ProductCountOrderByAggregateInput - _avg?: ProductAvgOrderByAggregateInput - _max?: ProductMaxOrderByAggregateInput - _min?: ProductMinOrderByAggregateInput - _sum?: ProductSumOrderByAggregateInput - } - - export type ProductScalarWhereWithAggregatesInput = { - AND?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[] - OR?: ProductScalarWhereWithAggregatesInput[] - NOT?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Product"> | number - name?: StringWithAggregatesFilter<"Product"> | string - price?: FloatWithAggregatesFilter<"Product"> | number - quantity?: IntWithAggregatesFilter<"Product"> | number - description?: StringNullableWithAggregatesFilter<"Product"> | string | null - } - - export type CustomerCreateInput = { - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - address?: AddressCreateNestedOneWithoutCustomerInput - orders?: OrderCreateNestedManyWithoutCustomerInput - } - - export type CustomerUncheckedCreateInput = { - id?: number - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - address?: AddressUncheckedCreateNestedOneWithoutCustomerInput - orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput - } - - export type CustomerUpdateInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - address?: AddressUpdateOneWithoutCustomerNestedInput - orders?: OrderUpdateManyWithoutCustomerNestedInput - } - - export type CustomerUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - address?: AddressUncheckedUpdateOneWithoutCustomerNestedInput - orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput - } - - export type CustomerCreateManyInput = { - id?: number - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - } - - export type CustomerUpdateManyMutationInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - } - - export type CustomerUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - } - - export type AddressCreateInput = { - street?: string | null - city?: string | null - postalCode?: string | null - country?: string | null - customer: CustomerCreateNestedOneWithoutAddressInput - } - - export type AddressUncheckedCreateInput = { - id?: number - street?: string | null - city?: string | null - postalCode?: string | null - country?: string | null - customerId: number - } - - export type AddressUpdateInput = { - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - customer?: CustomerUpdateOneRequiredWithoutAddressNestedInput - } - - export type AddressUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - customerId?: IntFieldUpdateOperationsInput | number - } - - export type AddressCreateManyInput = { - id?: number - street?: string | null - city?: string | null - postalCode?: string | null - country?: string | null - customerId: number - } - - export type AddressUpdateManyMutationInput = { - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type AddressUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - customerId?: IntFieldUpdateOperationsInput | number - } - - export type OrderCreateInput = { - date: Date | string - totalAmount: number - customer: CustomerCreateNestedOneWithoutOrdersInput - products?: ProductCreateNestedManyWithoutOrdersInput - } - - export type OrderUncheckedCreateInput = { - id?: number - date: Date | string - totalAmount: number - customerId: number - products?: ProductUncheckedCreateNestedManyWithoutOrdersInput - } - - export type OrderUpdateInput = { - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput - products?: ProductUpdateManyWithoutOrdersNestedInput - } - - export type OrderUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customerId?: IntFieldUpdateOperationsInput | number - products?: ProductUncheckedUpdateManyWithoutOrdersNestedInput - } - - export type OrderCreateManyInput = { - id?: number - date: Date | string - totalAmount: number - customerId: number - } - - export type OrderUpdateManyMutationInput = { - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - } - - export type OrderUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customerId?: IntFieldUpdateOperationsInput | number - } - - export type ProductCreateInput = { - name: string - price: number - quantity: number - description?: string | null - orders?: OrderCreateNestedManyWithoutProductsInput - } - - export type ProductUncheckedCreateInput = { - id?: number - name: string - price: number - quantity: number - description?: string | null - orders?: OrderUncheckedCreateNestedManyWithoutProductsInput - } - - export type ProductUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - orders?: OrderUpdateManyWithoutProductsNestedInput - } - - export type ProductUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - orders?: OrderUncheckedUpdateManyWithoutProductsNestedInput - } - - export type ProductCreateManyInput = { - id?: number - name: string - price: number - quantity: number - description?: string | null - } - - export type ProductUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ProductUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringFilter<$PrismaModel> | string - } - - export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type AddressNullableRelationFilter = { - is?: AddressWhereInput | null - isNot?: AddressWhereInput | null - } - - export type OrderListRelationFilter = { - every?: OrderWhereInput - some?: OrderWhereInput - none?: OrderWhereInput - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder - } - - export type OrderOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CustomerCountOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - name?: SortOrder - email?: SortOrder - isActive?: SortOrder - } - - export type CustomerAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type CustomerMaxOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - name?: SortOrder - email?: SortOrder - isActive?: SortOrder - } - - export type CustomerMinOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - name?: SortOrder - email?: SortOrder - isActive?: SortOrder - } - - export type CustomerSumOrderByAggregateInput = { - id?: SortOrder - } - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type CustomerRelationFilter = { - is?: CustomerWhereInput - isNot?: CustomerWhereInput - } - - export type AddressCountOrderByAggregateInput = { - id?: SortOrder - street?: SortOrder - city?: SortOrder - postalCode?: SortOrder - country?: SortOrder - customerId?: SortOrder - } - - export type AddressAvgOrderByAggregateInput = { - id?: SortOrder - customerId?: SortOrder - } - - export type AddressMaxOrderByAggregateInput = { - id?: SortOrder - street?: SortOrder - city?: SortOrder - postalCode?: SortOrder - country?: SortOrder - customerId?: SortOrder - } - - export type AddressMinOrderByAggregateInput = { - id?: SortOrder - street?: SortOrder - city?: SortOrder - postalCode?: SortOrder - country?: SortOrder - customerId?: SortOrder - } - - export type AddressSumOrderByAggregateInput = { - id?: SortOrder - customerId?: SortOrder - } - - export type FloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type ProductListRelationFilter = { - every?: ProductWhereInput - some?: ProductWhereInput - none?: ProductWhereInput - } - - export type ProductOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type OrderCountOrderByAggregateInput = { - id?: SortOrder - date?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - } - - export type OrderAvgOrderByAggregateInput = { - id?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - } - - export type OrderMaxOrderByAggregateInput = { - id?: SortOrder - date?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - } - - export type OrderMinOrderByAggregateInput = { - id?: SortOrder - date?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - } - - export type OrderSumOrderByAggregateInput = { - id?: SortOrder - totalAmount?: SortOrder - customerId?: SortOrder - } - - export type FloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedFloatFilter<$PrismaModel> - _min?: NestedFloatFilter<$PrismaModel> - _max?: NestedFloatFilter<$PrismaModel> - } - - export type ProductCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - price?: SortOrder - quantity?: SortOrder - description?: SortOrder - } - - export type ProductAvgOrderByAggregateInput = { - id?: SortOrder - price?: SortOrder - quantity?: SortOrder - } - - export type ProductMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - price?: SortOrder - quantity?: SortOrder - description?: SortOrder - } - - export type ProductMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - price?: SortOrder - quantity?: SortOrder - description?: SortOrder - } - - export type ProductSumOrderByAggregateInput = { - id?: SortOrder - price?: SortOrder - quantity?: SortOrder - } - - export type AddressCreateNestedOneWithoutCustomerInput = { - create?: XOR - connectOrCreate?: AddressCreateOrConnectWithoutCustomerInput - connect?: AddressWhereUniqueInput - } - - export type OrderCreateNestedManyWithoutCustomerInput = { - create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] - createMany?: OrderCreateManyCustomerInputEnvelope - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - } - - export type AddressUncheckedCreateNestedOneWithoutCustomerInput = { - create?: XOR - connectOrCreate?: AddressCreateOrConnectWithoutCustomerInput - connect?: AddressWhereUniqueInput - } - - export type OrderUncheckedCreateNestedManyWithoutCustomerInput = { - create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] - createMany?: OrderCreateManyCustomerInputEnvelope - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type BoolFieldUpdateOperationsInput = { - set?: boolean - } - - export type AddressUpdateOneWithoutCustomerNestedInput = { - create?: XOR - connectOrCreate?: AddressCreateOrConnectWithoutCustomerInput - upsert?: AddressUpsertWithoutCustomerInput - disconnect?: AddressWhereInput | boolean - delete?: AddressWhereInput | boolean - connect?: AddressWhereUniqueInput - update?: XOR, AddressUncheckedUpdateWithoutCustomerInput> - } - - export type OrderUpdateManyWithoutCustomerNestedInput = { - create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] - upsert?: OrderUpsertWithWhereUniqueWithoutCustomerInput | OrderUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: OrderCreateManyCustomerInputEnvelope - set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - update?: OrderUpdateWithWhereUniqueWithoutCustomerInput | OrderUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: OrderUpdateManyWithWhereWithoutCustomerInput | OrderUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type AddressUncheckedUpdateOneWithoutCustomerNestedInput = { - create?: XOR - connectOrCreate?: AddressCreateOrConnectWithoutCustomerInput - upsert?: AddressUpsertWithoutCustomerInput - disconnect?: AddressWhereInput | boolean - delete?: AddressWhereInput | boolean - connect?: AddressWhereUniqueInput - update?: XOR, AddressUncheckedUpdateWithoutCustomerInput> - } - - export type OrderUncheckedUpdateManyWithoutCustomerNestedInput = { - create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] - upsert?: OrderUpsertWithWhereUniqueWithoutCustomerInput | OrderUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: OrderCreateManyCustomerInputEnvelope - set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - update?: OrderUpdateWithWhereUniqueWithoutCustomerInput | OrderUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: OrderUpdateManyWithWhereWithoutCustomerInput | OrderUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] - } - - export type CustomerCreateNestedOneWithoutAddressInput = { - create?: XOR - connectOrCreate?: CustomerCreateOrConnectWithoutAddressInput - connect?: CustomerWhereUniqueInput - } - - export type CustomerUpdateOneRequiredWithoutAddressNestedInput = { - create?: XOR - connectOrCreate?: CustomerCreateOrConnectWithoutAddressInput - upsert?: CustomerUpsertWithoutAddressInput - connect?: CustomerWhereUniqueInput - update?: XOR, CustomerUncheckedUpdateWithoutAddressInput> - } - - export type CustomerCreateNestedOneWithoutOrdersInput = { - create?: XOR - connectOrCreate?: CustomerCreateOrConnectWithoutOrdersInput - connect?: CustomerWhereUniqueInput - } - - export type ProductCreateNestedManyWithoutOrdersInput = { - create?: XOR | ProductCreateWithoutOrdersInput[] | ProductUncheckedCreateWithoutOrdersInput[] - connectOrCreate?: ProductCreateOrConnectWithoutOrdersInput | ProductCreateOrConnectWithoutOrdersInput[] - connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - } - - export type ProductUncheckedCreateNestedManyWithoutOrdersInput = { - create?: XOR | ProductCreateWithoutOrdersInput[] | ProductUncheckedCreateWithoutOrdersInput[] - connectOrCreate?: ProductCreateOrConnectWithoutOrdersInput | ProductCreateOrConnectWithoutOrdersInput[] - connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - } - - export type FloatFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type CustomerUpdateOneRequiredWithoutOrdersNestedInput = { - create?: XOR - connectOrCreate?: CustomerCreateOrConnectWithoutOrdersInput - upsert?: CustomerUpsertWithoutOrdersInput - connect?: CustomerWhereUniqueInput - update?: XOR, CustomerUncheckedUpdateWithoutOrdersInput> - } - - export type ProductUpdateManyWithoutOrdersNestedInput = { - create?: XOR | ProductCreateWithoutOrdersInput[] | ProductUncheckedCreateWithoutOrdersInput[] - connectOrCreate?: ProductCreateOrConnectWithoutOrdersInput | ProductCreateOrConnectWithoutOrdersInput[] - upsert?: ProductUpsertWithWhereUniqueWithoutOrdersInput | ProductUpsertWithWhereUniqueWithoutOrdersInput[] - set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - update?: ProductUpdateWithWhereUniqueWithoutOrdersInput | ProductUpdateWithWhereUniqueWithoutOrdersInput[] - updateMany?: ProductUpdateManyWithWhereWithoutOrdersInput | ProductUpdateManyWithWhereWithoutOrdersInput[] - deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] - } - - export type ProductUncheckedUpdateManyWithoutOrdersNestedInput = { - create?: XOR | ProductCreateWithoutOrdersInput[] | ProductUncheckedCreateWithoutOrdersInput[] - connectOrCreate?: ProductCreateOrConnectWithoutOrdersInput | ProductCreateOrConnectWithoutOrdersInput[] - upsert?: ProductUpsertWithWhereUniqueWithoutOrdersInput | ProductUpsertWithWhereUniqueWithoutOrdersInput[] - set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] - update?: ProductUpdateWithWhereUniqueWithoutOrdersInput | ProductUpdateWithWhereUniqueWithoutOrdersInput[] - updateMany?: ProductUpdateManyWithWhereWithoutOrdersInput | ProductUpdateManyWithWhereWithoutOrdersInput[] - deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] - } - - export type OrderCreateNestedManyWithoutProductsInput = { - create?: XOR | OrderCreateWithoutProductsInput[] | OrderUncheckedCreateWithoutProductsInput[] - connectOrCreate?: OrderCreateOrConnectWithoutProductsInput | OrderCreateOrConnectWithoutProductsInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - } - - export type OrderUncheckedCreateNestedManyWithoutProductsInput = { - create?: XOR | OrderCreateWithoutProductsInput[] | OrderUncheckedCreateWithoutProductsInput[] - connectOrCreate?: OrderCreateOrConnectWithoutProductsInput | OrderCreateOrConnectWithoutProductsInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - } - - export type OrderUpdateManyWithoutProductsNestedInput = { - create?: XOR | OrderCreateWithoutProductsInput[] | OrderUncheckedCreateWithoutProductsInput[] - connectOrCreate?: OrderCreateOrConnectWithoutProductsInput | OrderCreateOrConnectWithoutProductsInput[] - upsert?: OrderUpsertWithWhereUniqueWithoutProductsInput | OrderUpsertWithWhereUniqueWithoutProductsInput[] - set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - update?: OrderUpdateWithWhereUniqueWithoutProductsInput | OrderUpdateWithWhereUniqueWithoutProductsInput[] - updateMany?: OrderUpdateManyWithWhereWithoutProductsInput | OrderUpdateManyWithWhereWithoutProductsInput[] - deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] - } - - export type OrderUncheckedUpdateManyWithoutProductsNestedInput = { - create?: XOR | OrderCreateWithoutProductsInput[] | OrderUncheckedCreateWithoutProductsInput[] - connectOrCreate?: OrderCreateOrConnectWithoutProductsInput | OrderCreateOrConnectWithoutProductsInput[] - upsert?: OrderUpsertWithWhereUniqueWithoutProductsInput | OrderUpsertWithWhereUniqueWithoutProductsInput[] - set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] - update?: OrderUpdateWithWhereUniqueWithoutProductsInput | OrderUpdateWithWhereUniqueWithoutProductsInput[] - updateMany?: OrderUpdateManyWithWhereWithoutProductsInput | OrderUpdateManyWithWhereWithoutProductsInput[] - deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] - } - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedFloatFilter<$PrismaModel> - _min?: NestedFloatFilter<$PrismaModel> - _max?: NestedFloatFilter<$PrismaModel> - } - - export type AddressCreateWithoutCustomerInput = { - street?: string | null - city?: string | null - postalCode?: string | null - country?: string | null - } - - export type AddressUncheckedCreateWithoutCustomerInput = { - id?: number - street?: string | null - city?: string | null - postalCode?: string | null - country?: string | null - } - - export type AddressCreateOrConnectWithoutCustomerInput = { - where: AddressWhereUniqueInput - create: XOR - } - - export type OrderCreateWithoutCustomerInput = { - date: Date | string - totalAmount: number - products?: ProductCreateNestedManyWithoutOrdersInput - } - - export type OrderUncheckedCreateWithoutCustomerInput = { - id?: number - date: Date | string - totalAmount: number - products?: ProductUncheckedCreateNestedManyWithoutOrdersInput - } - - export type OrderCreateOrConnectWithoutCustomerInput = { - where: OrderWhereUniqueInput - create: XOR - } - - export type OrderCreateManyCustomerInputEnvelope = { - data: OrderCreateManyCustomerInput | OrderCreateManyCustomerInput[] - skipDuplicates?: boolean - } - - export type AddressUpsertWithoutCustomerInput = { - update: XOR - create: XOR - where?: AddressWhereInput - } - - export type AddressUpdateToOneWithWhereWithoutCustomerInput = { - where?: AddressWhereInput - data: XOR - } - - export type AddressUpdateWithoutCustomerInput = { - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type AddressUncheckedUpdateWithoutCustomerInput = { - id?: IntFieldUpdateOperationsInput | number - street?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - postalCode?: NullableStringFieldUpdateOperationsInput | string | null - country?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type OrderUpsertWithWhereUniqueWithoutCustomerInput = { - where: OrderWhereUniqueInput - update: XOR - create: XOR - } - - export type OrderUpdateWithWhereUniqueWithoutCustomerInput = { - where: OrderWhereUniqueInput - data: XOR - } - - export type OrderUpdateManyWithWhereWithoutCustomerInput = { - where: OrderScalarWhereInput - data: XOR - } - - export type OrderScalarWhereInput = { - AND?: OrderScalarWhereInput | OrderScalarWhereInput[] - OR?: OrderScalarWhereInput[] - NOT?: OrderScalarWhereInput | OrderScalarWhereInput[] - id?: IntFilter<"Order"> | number - date?: DateTimeFilter<"Order"> | Date | string - totalAmount?: FloatFilter<"Order"> | number - customerId?: IntFilter<"Order"> | number - } - - export type CustomerCreateWithoutAddressInput = { - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - orders?: OrderCreateNestedManyWithoutCustomerInput - } - - export type CustomerUncheckedCreateWithoutAddressInput = { - id?: number - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput - } - - export type CustomerCreateOrConnectWithoutAddressInput = { - where: CustomerWhereUniqueInput - create: XOR - } - - export type CustomerUpsertWithoutAddressInput = { - update: XOR - create: XOR - where?: CustomerWhereInput - } - - export type CustomerUpdateToOneWithWhereWithoutAddressInput = { - where?: CustomerWhereInput - data: XOR - } - - export type CustomerUpdateWithoutAddressInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - orders?: OrderUpdateManyWithoutCustomerNestedInput - } - - export type CustomerUncheckedUpdateWithoutAddressInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput - } - - export type CustomerCreateWithoutOrdersInput = { - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - address?: AddressCreateNestedOneWithoutCustomerInput - } - - export type CustomerUncheckedCreateWithoutOrdersInput = { - id?: number - createdAt?: Date | string - name?: string | null - email: string - isActive?: boolean - address?: AddressUncheckedCreateNestedOneWithoutCustomerInput - } - - export type CustomerCreateOrConnectWithoutOrdersInput = { - where: CustomerWhereUniqueInput - create: XOR - } - - export type ProductCreateWithoutOrdersInput = { - name: string - price: number - quantity: number - description?: string | null - } - - export type ProductUncheckedCreateWithoutOrdersInput = { - id?: number - name: string - price: number - quantity: number - description?: string | null - } - - export type ProductCreateOrConnectWithoutOrdersInput = { - where: ProductWhereUniqueInput - create: XOR - } - - export type CustomerUpsertWithoutOrdersInput = { - update: XOR - create: XOR - where?: CustomerWhereInput - } - - export type CustomerUpdateToOneWithWhereWithoutOrdersInput = { - where?: CustomerWhereInput - data: XOR - } - - export type CustomerUpdateWithoutOrdersInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - address?: AddressUpdateOneWithoutCustomerNestedInput - } - - export type CustomerUncheckedUpdateWithoutOrdersInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - address?: AddressUncheckedUpdateOneWithoutCustomerNestedInput - } - - export type ProductUpsertWithWhereUniqueWithoutOrdersInput = { - where: ProductWhereUniqueInput - update: XOR - create: XOR - } - - export type ProductUpdateWithWhereUniqueWithoutOrdersInput = { - where: ProductWhereUniqueInput - data: XOR - } - - export type ProductUpdateManyWithWhereWithoutOrdersInput = { - where: ProductScalarWhereInput - data: XOR - } - - export type ProductScalarWhereInput = { - AND?: ProductScalarWhereInput | ProductScalarWhereInput[] - OR?: ProductScalarWhereInput[] - NOT?: ProductScalarWhereInput | ProductScalarWhereInput[] - id?: IntFilter<"Product"> | number - name?: StringFilter<"Product"> | string - price?: FloatFilter<"Product"> | number - quantity?: IntFilter<"Product"> | number - description?: StringNullableFilter<"Product"> | string | null - } - - export type OrderCreateWithoutProductsInput = { - date: Date | string - totalAmount: number - customer: CustomerCreateNestedOneWithoutOrdersInput - } - - export type OrderUncheckedCreateWithoutProductsInput = { - id?: number - date: Date | string - totalAmount: number - customerId: number - } - - export type OrderCreateOrConnectWithoutProductsInput = { - where: OrderWhereUniqueInput - create: XOR - } - - export type OrderUpsertWithWhereUniqueWithoutProductsInput = { - where: OrderWhereUniqueInput - update: XOR - create: XOR - } - - export type OrderUpdateWithWhereUniqueWithoutProductsInput = { - where: OrderWhereUniqueInput - data: XOR - } - - export type OrderUpdateManyWithWhereWithoutProductsInput = { - where: OrderScalarWhereInput - data: XOR - } - - export type OrderCreateManyCustomerInput = { - id?: number - date: Date | string - totalAmount: number - } - - export type OrderUpdateWithoutCustomerInput = { - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - products?: ProductUpdateManyWithoutOrdersNestedInput - } - - export type OrderUncheckedUpdateWithoutCustomerInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - products?: ProductUncheckedUpdateManyWithoutOrdersNestedInput - } - - export type OrderUncheckedUpdateManyWithoutCustomerInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - } - - export type ProductUpdateWithoutOrdersInput = { - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ProductUncheckedUpdateWithoutOrdersInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ProductUncheckedUpdateManyWithoutOrdersInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - price?: FloatFieldUpdateOperationsInput | number - quantity?: IntFieldUpdateOperationsInput | number - description?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type OrderUpdateWithoutProductsInput = { - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput - } - - export type OrderUncheckedUpdateWithoutProductsInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customerId?: IntFieldUpdateOperationsInput | number - } - - export type OrderUncheckedUpdateManyWithoutProductsInput = { - id?: IntFieldUpdateOperationsInput | number - date?: DateTimeFieldUpdateOperationsInput | Date | string - totalAmount?: FloatFieldUpdateOperationsInput | number - customerId?: IntFieldUpdateOperationsInput | number - } - - - - /** - * Aliases for legacy arg types - */ - /** - * @deprecated Use CustomerCountOutputTypeDefaultArgs instead - */ - export type CustomerCountOutputTypeArgs = CustomerCountOutputTypeDefaultArgs - /** - * @deprecated Use OrderCountOutputTypeDefaultArgs instead - */ - export type OrderCountOutputTypeArgs = OrderCountOutputTypeDefaultArgs - /** - * @deprecated Use ProductCountOutputTypeDefaultArgs instead - */ - export type ProductCountOutputTypeArgs = ProductCountOutputTypeDefaultArgs - /** - * @deprecated Use CustomerDefaultArgs instead - */ - export type CustomerArgs = CustomerDefaultArgs - /** - * @deprecated Use AddressDefaultArgs instead - */ - export type AddressArgs = AddressDefaultArgs - /** - * @deprecated Use OrderDefaultArgs instead - */ - export type OrderArgs = OrderDefaultArgs - /** - * @deprecated Use ProductDefaultArgs instead - */ - export type ProductArgs = ProductDefaultArgs - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number - } - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF -} \ No newline at end of file diff --git a/src/prisma/client-pg/index.js b/src/prisma/client-pg/index.js deleted file mode 100644 index cefe50b..0000000 --- a/src/prisma/client-pg/index.js +++ /dev/null @@ -1,234 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - NotFoundError, - getPrismaClient, - sqltag, - empty, - join, - raw, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/library.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.15.0 - * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 - */ -Prisma.prismaVersion = { - client: "5.15.0", - engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.NotFoundError = NotFoundError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - const path = require('path') - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.CustomerScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - name: 'name', - email: 'email', - isActive: 'isActive' -}; - -exports.Prisma.AddressScalarFieldEnum = { - id: 'id', - street: 'street', - city: 'city', - postalCode: 'postalCode', - country: 'country', - customerId: 'customerId' -}; - -exports.Prisma.OrderScalarFieldEnum = { - id: 'id', - date: 'date', - totalAmount: 'totalAmount', - customerId: 'customerId' -}; - -exports.Prisma.ProductScalarFieldEnum = { - id: 'id', - name: 'name', - price: 'price', - quantity: 'quantity', - description: 'description' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Customer: 'Customer', - Address: 'Address', - Order: 'Order', - Product: 'Product' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/nikolasburk/Desktop/orm-benchmarks/src/prisma/client-pg", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin", - "native": true - } - ], - "previewFeatures": [], - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../../.env" - }, - "relativePath": "../../../prisma-pg", - "clientVersion": "5.15.0", - "engineVersion": "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/prisma/client-pg\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n name String?\n email String // @unique\n address Address?\n isActive Boolean @default(false)\n // extraInfo Json?\n orders Order[]\n}\n\nmodel Address {\n id Int @id @default(autoincrement())\n street String?\n city String?\n postalCode String?\n country String?\n customerId Int @unique\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n date DateTime\n totalAmount Float\n customerId Int\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n products Product[] @relation(\"OrderProducts\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String\n price Float\n quantity Int\n description String?\n orders Order[] @relation(\"OrderProducts\")\n}\n", - "inlineSchemaHash": "034621a130ad257520af372e2a0a254847c9c8d85fb033d99eadbe593e744736", - "copyEngine": true -} - -const fs = require('fs') - -config.dirname = __dirname -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = [ - "src/prisma/client-pg", - "prisma/client-pg", - ] - - const alternativePath = alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) - }) ?? alternativePaths[0] - - config.dirname = path.join(process.cwd(), alternativePath) - config.isBundled = true -} - -config.runtimeDataModel = JSON.parse("{\"models\":{\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Address\",\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Address\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"street\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"country\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"price\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - - -const { warnEnvConflicts } = require('./runtime/library.js') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -// file annotations for bundling tools to include these files -path.join(__dirname, "libquery_engine-darwin.dylib.node"); -path.join(process.cwd(), "src/prisma/client-pg/libquery_engine-darwin.dylib.node") -// file annotations for bundling tools to include these files -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "src/prisma/client-pg/schema.prisma") diff --git a/src/prisma/client-pg/internal/class.ts b/src/prisma/client-pg/internal/class.ts new file mode 100644 index 0000000..e407676 --- /dev/null +++ b/src/prisma/client-pg/internal/class.ts @@ -0,0 +1,251 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/library" +import type * as Prisma from "./prismaNamespace" + + +const config: runtime.GetPrismaClientConfig = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client" + }, + "output": { + "value": "/Users/yiming/git/orm-benchmarks/src/prisma/client-pg", + "fromEnvVar": null + }, + "config": { + "importFileExtension": "", + "moduleFormat": "commonjs", + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "darwin-arm64", + "native": true + } + ], + "previewFeatures": [ + "relationJoins" + ], + "sourceFilePath": "/Users/yiming/git/orm-benchmarks/prisma-pg/schema.prisma", + "isCustomOutput": true + }, + "relativePath": "../../../prisma-pg", + "clientVersion": "6.17.1", + "engineVersion": "272a37d34178c2894197e17273bf937f25acdeac", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../src/prisma/client-pg\"\n moduleFormat = \"commonjs\"\n importFileExtension = \"\"\n previewFeatures = [\"relationJoins\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n name String?\n email String // @unique\n address Address?\n isActive Boolean @default(false)\n // extraInfo Json?\n orders Order[]\n}\n\nmodel Address {\n id Int @id @default(autoincrement())\n street String?\n city String?\n postalCode String?\n country String?\n customerId Int @unique\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n date DateTime\n totalAmount Float\n customerId Int\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n products Product[] @relation(\"OrderProducts\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String\n price Float\n quantity Int\n description String?\n orders Order[] @relation(\"OrderProducts\")\n}\n", + "inlineSchemaHash": "c6ffbbd4b726308de4ca2ec227c76509cd113c2d7d69afbfd1061018b3dc0408", + "copyEngine": true, + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + }, + "dirname": "" +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Customer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Address\",\"nativeType\":null,\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"nativeType\":null,\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Address\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"street\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"country\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"nativeType\":null,\"relationName\":\"AddressToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"nativeType\":null,\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"nativeType\":null,\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"price\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"nativeType\":null,\"relationName\":\"OrderProducts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +config.engineWasm = undefined +config.compilerWasm = undefined + + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options?: Prisma.Subset ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'], + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.customer`: Exposes CRUD operations for the **Customer** model. + * Example usage: + * ```ts + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + */ + get customer(): Prisma.CustomerDelegate; + + /** + * `prisma.address`: Exposes CRUD operations for the **Address** model. + * Example usage: + * ```ts + * // Fetch zero or more Addresses + * const addresses = await prisma.address.findMany() + * ``` + */ + get address(): Prisma.AddressDelegate; + + /** + * `prisma.order`: Exposes CRUD operations for the **Order** model. + * Example usage: + * ```ts + * // Fetch zero or more Orders + * const orders = await prisma.order.findMany() + * ``` + */ + get order(): Prisma.OrderDelegate; + + /** + * `prisma.product`: Exposes CRUD operations for the **Product** model. + * Example usage: + * ```ts + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + */ + get product(): Prisma.ProductDelegate; +} + +export function getPrismaClientClass(dirname: string): PrismaClientConstructor { + config.dirname = dirname + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/src/prisma/client-pg/internal/prismaNamespace.ts b/src/prisma/client-pg/internal/prismaNamespace.ts new file mode 100644 index 0000000..a183c3e --- /dev/null +++ b/src/prisma/client-pg/internal/prismaNamespace.ts @@ -0,0 +1,1046 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/library" +import type * as Prisma from "../models" +import { type PrismaClient } from "./class" + +export type * from '../models' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** + * Metrics + */ +export type Metrics = runtime.Metrics +export type Metric = runtime.Metric +export type MetricHistogram = runtime.MetricHistogram +export type MetricHistogramBucket = runtime.MetricHistogramBucket + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 6.17.1 + * Query Engine version: 272a37d34178c2894197e17273bf937f25acdeac + */ +export const prismaVersion: PrismaVersion = { + client: "6.17.1", + engine: "272a37d34178c2894197e17273bf937f25acdeac" +} + +/** + * Utility Types + */ + +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull), + JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull), + AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.objectEnumValues.instances.DbNull +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.objectEnumValues.instances.JsonNull +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.objectEnumValues.instances.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Prisma__Pick = { + [P in K]: T[P]; +}; + +export type Enumerable = T | Array; + +/** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ +export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; +}; + +/** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ +export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + +/** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ +export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + K + +type Without = { [P in Exclude]?: never }; + +/** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ +export type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + +/** + * Is T a Record? + */ +type IsObject = T extends Array +? False +: T extends Date +? False +: T extends Uint8Array +? False +: T extends BigInt +? False +: T extends object +? True +: False + + +/** + * If it's T[], return T + */ +export type UnEnumerate = T extends Array ? U : T + +/** + * From ts-toolbelt + */ + +type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + +type EitherStrict = Strict<__Either> + +type EitherLoose = ComputeRaw<__Either> + +type _Either< + O extends object, + K extends Key, + strict extends Boolean +> = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] +} & {} + +/** Helper Types for "Merge" **/ +export type IntersectOf = ( + U extends unknown ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never + +export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +} & {}; + +type _Merge = IntersectOf; +}>>; + +type Key = string | number | symbol; +type AtStrict = O[K & keyof O]; +type AtLoose = O extends unknown ? AtStrict : never; +export type At = { + 1: AtStrict; + 0: AtLoose; +}[strict]; + +export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; +} & {}; + +export type OptionalFlat = { + [K in keyof O]?: O[K]; +} & {}; + +type _Record = { + [P in K]: T; +}; + +// cause typescript not to expand types and preserve names +type NoExpand = T extends unknown ? T : never; + +// this type assumes the passed object is entirely optional +export type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + +type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + +export type Strict = ComputeRaw<_Strict>; +/** End Helper Types for "Merge" **/ + +export type Merge = ComputeRaw<_Merge>>; + +export type Boolean = True | False + +export type True = 1 + +export type False = 0 + +export type Not = { + 0: 1 + 1: 0 +}[B] + +export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + +export type Has = Not< + Extends, U1> +> + +export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } +}[B1][B2] + +export type Keys = U extends unknown ? keyof U : never + +export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never +} : never + +type FieldPaths< + T, + U = Omit +> = IsObject extends True ? U : T + +export type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K +}[keyof T] + +/** + * Convert tuple to union + */ +type _TupleToUnion = T extends (infer E)[] ? E : never +type TupleToUnion = _TupleToUnion +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + Customer: 'Customer', + Address: 'Address', + Order: 'Order', + Product: 'Product' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "customer" | "address" | "order" | "product" + txIsolationLevel: TransactionIsolationLevel + } + model: { + Customer: { + payload: Prisma.$CustomerPayload + fields: Prisma.CustomerFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CustomerCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.CustomerDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.CustomerUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.CustomerUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.CustomerUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.CustomerGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.CustomerCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Address: { + payload: Prisma.$AddressPayload + fields: Prisma.AddressFieldRefs + operations: { + findUnique: { + args: Prisma.AddressFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AddressFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.AddressFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AddressFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.AddressFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.AddressCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.AddressCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AddressCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.AddressDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.AddressUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AddressDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AddressUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AddressUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AddressUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.AddressAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.AddressGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.AddressCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Order: { + payload: Prisma.$OrderPayload + fields: Prisma.OrderFieldRefs + operations: { + findUnique: { + args: Prisma.OrderFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.OrderFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.OrderFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.OrderFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.OrderFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.OrderCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.OrderCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.OrderCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.OrderDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.OrderUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.OrderDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.OrderUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.OrderUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.OrderUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.OrderAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.OrderGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.OrderCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Product: { + payload: Prisma.$ProductPayload + fields: Prisma.ProductFieldRefs + operations: { + findUnique: { + args: Prisma.ProductFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ProductFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.ProductFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ProductFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.ProductFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.ProductCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.ProductCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProductCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.ProductDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.ProductUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ProductDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ProductUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ProductUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ProductUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.ProductAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.ProductGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.ProductCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const CustomerScalarFieldEnum = { + id: 'id', + createdAt: 'createdAt', + name: 'name', + email: 'email', + isActive: 'isActive' +} as const + +export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + + +export const RelationLoadStrategy = { + query: 'query', + join: 'join' +} as const + +export type RelationLoadStrategy = (typeof RelationLoadStrategy)[keyof typeof RelationLoadStrategy] + + +export const AddressScalarFieldEnum = { + id: 'id', + street: 'street', + city: 'city', + postalCode: 'postalCode', + country: 'country', + customerId: 'customerId' +} as const + +export type AddressScalarFieldEnum = (typeof AddressScalarFieldEnum)[keyof typeof AddressScalarFieldEnum] + + +export const OrderScalarFieldEnum = { + id: 'id', + date: 'date', + totalAmount: 'totalAmount', + customerId: 'customerId' +} as const + +export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] + + +export const ProductScalarFieldEnum = { + id: 'id', + name: 'name', + price: 'price', + quantity: 'quantity', + description: 'description' +} as const + +export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + +/** + * Field references + */ + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'Int[]' + */ +export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'DateTime[]' + */ +export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + +/** + * Reference to a field of type 'String' + */ +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + +/** + * Reference to a field of type 'String[]' + */ +export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + +/** + * Reference to a field of type 'Float[]' + */ +export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + + +export type Datasource = { + url?: string +} +export type Datasources = { + db?: Datasource +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale` + */ + adapter?: runtime.SqlDriverAdapterFactory | null + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig +} +export type GlobalOmitConfig = { + customer?: Prisma.CustomerOmit + address?: Prisma.AddressOmit + order?: Prisma.OrderOmit + product?: Prisma.ProductOmit +} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type CheckIsLogLevel = T extends LogLevel ? T : never; + +export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T +>; + +export type GetEvents = T extends Array + ? GetLogType + : never; + +export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string +} + +export type LogEvent = { + timestamp: Date + message: string + target: string +} +/* End Types for Logging */ + + +export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/src/prisma/client-pg/internal/prismaNamespaceBrowser.ts b/src/prisma/client-pg/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..a8fdd5d --- /dev/null +++ b/src/prisma/client-pg/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,147 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models' +export type * from './prismaNamespace' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull), + JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull), + AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.objectEnumValues.instances.DbNull +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.objectEnumValues.instances.JsonNull +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.objectEnumValues.instances.AnyNull + + +export const ModelName = { + Customer: 'Customer', + Address: 'Address', + Order: 'Order', + Product: 'Product' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const CustomerScalarFieldEnum = { + id: 'id', + createdAt: 'createdAt', + name: 'name', + email: 'email', + isActive: 'isActive' +} as const + +export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + + +export const RelationLoadStrategy = { + query: 'query', + join: 'join' +} as const + +export type RelationLoadStrategy = (typeof RelationLoadStrategy)[keyof typeof RelationLoadStrategy] + + +export const AddressScalarFieldEnum = { + id: 'id', + street: 'street', + city: 'city', + postalCode: 'postalCode', + country: 'country', + customerId: 'customerId' +} as const + +export type AddressScalarFieldEnum = (typeof AddressScalarFieldEnum)[keyof typeof AddressScalarFieldEnum] + + +export const OrderScalarFieldEnum = { + id: 'id', + date: 'date', + totalAmount: 'totalAmount', + customerId: 'customerId' +} as const + +export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] + + +export const ProductScalarFieldEnum = { + id: 'id', + name: 'name', + price: 'price', + quantity: 'quantity', + description: 'description' +} as const + +export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + diff --git a/src/prisma/client-pg/libquery_engine-darwin.dylib.node b/src/prisma/client-pg/libquery_engine-darwin-arm64.dylib.node similarity index 66% rename from src/prisma/client-pg/libquery_engine-darwin.dylib.node rename to src/prisma/client-pg/libquery_engine-darwin-arm64.dylib.node index 51fcb87..03298cd 100755 Binary files a/src/prisma/client-pg/libquery_engine-darwin.dylib.node and b/src/prisma/client-pg/libquery_engine-darwin-arm64.dylib.node differ diff --git a/src/prisma/client-pg/models.ts b/src/prisma/client-pg/models.ts new file mode 100644 index 0000000..d794255 --- /dev/null +++ b/src/prisma/client-pg/models.ts @@ -0,0 +1,14 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟢 You can import this file directly. + */ +export type * from './models/Customer' +export type * from './models/Address' +export type * from './models/Order' +export type * from './models/Product' +export type * from './commonInputTypes' \ No newline at end of file diff --git a/src/prisma/client-pg/models/Address.ts b/src/prisma/client-pg/models/Address.ts new file mode 100644 index 0000000..12ba012 --- /dev/null +++ b/src/prisma/client-pg/models/Address.ts @@ -0,0 +1,1375 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file exports the `Address` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/library" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Address + * + */ +export type AddressModel = runtime.Types.Result.DefaultSelection + +export type AggregateAddress = { + _count: AddressCountAggregateOutputType | null + _avg: AddressAvgAggregateOutputType | null + _sum: AddressSumAggregateOutputType | null + _min: AddressMinAggregateOutputType | null + _max: AddressMaxAggregateOutputType | null +} + +export type AddressAvgAggregateOutputType = { + id: number | null + customerId: number | null +} + +export type AddressSumAggregateOutputType = { + id: number | null + customerId: number | null +} + +export type AddressMinAggregateOutputType = { + id: number | null + street: string | null + city: string | null + postalCode: string | null + country: string | null + customerId: number | null +} + +export type AddressMaxAggregateOutputType = { + id: number | null + street: string | null + city: string | null + postalCode: string | null + country: string | null + customerId: number | null +} + +export type AddressCountAggregateOutputType = { + id: number + street: number + city: number + postalCode: number + country: number + customerId: number + _all: number +} + + +export type AddressAvgAggregateInputType = { + id?: true + customerId?: true +} + +export type AddressSumAggregateInputType = { + id?: true + customerId?: true +} + +export type AddressMinAggregateInputType = { + id?: true + street?: true + city?: true + postalCode?: true + country?: true + customerId?: true +} + +export type AddressMaxAggregateInputType = { + id?: true + street?: true + city?: true + postalCode?: true + country?: true + customerId?: true +} + +export type AddressCountAggregateInputType = { + id?: true + street?: true + city?: true + postalCode?: true + country?: true + customerId?: true + _all?: true +} + +export type AddressAggregateArgs = { + /** + * Filter which Address to aggregate. + */ + where?: Prisma.AddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Addresses to fetch. + */ + orderBy?: Prisma.AddressOrderByWithRelationInput | Prisma.AddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.AddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Addresses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Addresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Addresses + **/ + _count?: true | AddressCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AddressAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AddressSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AddressMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AddressMaxAggregateInputType +} + +export type GetAddressAggregateType = { + [P in keyof T & keyof AggregateAddress]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type AddressGroupByArgs = { + where?: Prisma.AddressWhereInput + orderBy?: Prisma.AddressOrderByWithAggregationInput | Prisma.AddressOrderByWithAggregationInput[] + by: Prisma.AddressScalarFieldEnum[] | Prisma.AddressScalarFieldEnum + having?: Prisma.AddressScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AddressCountAggregateInputType | true + _avg?: AddressAvgAggregateInputType + _sum?: AddressSumAggregateInputType + _min?: AddressMinAggregateInputType + _max?: AddressMaxAggregateInputType +} + +export type AddressGroupByOutputType = { + id: number + street: string | null + city: string | null + postalCode: string | null + country: string | null + customerId: number + _count: AddressCountAggregateOutputType | null + _avg: AddressAvgAggregateOutputType | null + _sum: AddressSumAggregateOutputType | null + _min: AddressMinAggregateOutputType | null + _max: AddressMaxAggregateOutputType | null +} + +type GetAddressGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof AddressGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type AddressWhereInput = { + AND?: Prisma.AddressWhereInput | Prisma.AddressWhereInput[] + OR?: Prisma.AddressWhereInput[] + NOT?: Prisma.AddressWhereInput | Prisma.AddressWhereInput[] + id?: Prisma.IntFilter<"Address"> | number + street?: Prisma.StringNullableFilter<"Address"> | string | null + city?: Prisma.StringNullableFilter<"Address"> | string | null + postalCode?: Prisma.StringNullableFilter<"Address"> | string | null + country?: Prisma.StringNullableFilter<"Address"> | string | null + customerId?: Prisma.IntFilter<"Address"> | number + customer?: Prisma.XOR +} + +export type AddressOrderByWithRelationInput = { + id?: Prisma.SortOrder + street?: Prisma.SortOrderInput | Prisma.SortOrder + city?: Prisma.SortOrderInput | Prisma.SortOrder + postalCode?: Prisma.SortOrderInput | Prisma.SortOrder + country?: Prisma.SortOrderInput | Prisma.SortOrder + customerId?: Prisma.SortOrder + customer?: Prisma.CustomerOrderByWithRelationInput +} + +export type AddressWhereUniqueInput = Prisma.AtLeast<{ + id?: number + customerId?: number + AND?: Prisma.AddressWhereInput | Prisma.AddressWhereInput[] + OR?: Prisma.AddressWhereInput[] + NOT?: Prisma.AddressWhereInput | Prisma.AddressWhereInput[] + street?: Prisma.StringNullableFilter<"Address"> | string | null + city?: Prisma.StringNullableFilter<"Address"> | string | null + postalCode?: Prisma.StringNullableFilter<"Address"> | string | null + country?: Prisma.StringNullableFilter<"Address"> | string | null + customer?: Prisma.XOR +}, "id" | "customerId"> + +export type AddressOrderByWithAggregationInput = { + id?: Prisma.SortOrder + street?: Prisma.SortOrderInput | Prisma.SortOrder + city?: Prisma.SortOrderInput | Prisma.SortOrder + postalCode?: Prisma.SortOrderInput | Prisma.SortOrder + country?: Prisma.SortOrderInput | Prisma.SortOrder + customerId?: Prisma.SortOrder + _count?: Prisma.AddressCountOrderByAggregateInput + _avg?: Prisma.AddressAvgOrderByAggregateInput + _max?: Prisma.AddressMaxOrderByAggregateInput + _min?: Prisma.AddressMinOrderByAggregateInput + _sum?: Prisma.AddressSumOrderByAggregateInput +} + +export type AddressScalarWhereWithAggregatesInput = { + AND?: Prisma.AddressScalarWhereWithAggregatesInput | Prisma.AddressScalarWhereWithAggregatesInput[] + OR?: Prisma.AddressScalarWhereWithAggregatesInput[] + NOT?: Prisma.AddressScalarWhereWithAggregatesInput | Prisma.AddressScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Address"> | number + street?: Prisma.StringNullableWithAggregatesFilter<"Address"> | string | null + city?: Prisma.StringNullableWithAggregatesFilter<"Address"> | string | null + postalCode?: Prisma.StringNullableWithAggregatesFilter<"Address"> | string | null + country?: Prisma.StringNullableWithAggregatesFilter<"Address"> | string | null + customerId?: Prisma.IntWithAggregatesFilter<"Address"> | number +} + +export type AddressCreateInput = { + street?: string | null + city?: string | null + postalCode?: string | null + country?: string | null + customer: Prisma.CustomerCreateNestedOneWithoutAddressInput +} + +export type AddressUncheckedCreateInput = { + id?: number + street?: string | null + city?: string | null + postalCode?: string | null + country?: string | null + customerId: number +} + +export type AddressUpdateInput = { + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + customer?: Prisma.CustomerUpdateOneRequiredWithoutAddressNestedInput +} + +export type AddressUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + customerId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type AddressCreateManyInput = { + id?: number + street?: string | null + city?: string | null + postalCode?: string | null + country?: string | null + customerId: number +} + +export type AddressUpdateManyMutationInput = { + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type AddressUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + customerId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type AddressNullableScalarRelationFilter = { + is?: Prisma.AddressWhereInput | null + isNot?: Prisma.AddressWhereInput | null +} + +export type AddressCountOrderByAggregateInput = { + id?: Prisma.SortOrder + street?: Prisma.SortOrder + city?: Prisma.SortOrder + postalCode?: Prisma.SortOrder + country?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type AddressAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type AddressMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + street?: Prisma.SortOrder + city?: Prisma.SortOrder + postalCode?: Prisma.SortOrder + country?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type AddressMinOrderByAggregateInput = { + id?: Prisma.SortOrder + street?: Prisma.SortOrder + city?: Prisma.SortOrder + postalCode?: Prisma.SortOrder + country?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type AddressSumOrderByAggregateInput = { + id?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type AddressCreateNestedOneWithoutCustomerInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AddressCreateOrConnectWithoutCustomerInput + connect?: Prisma.AddressWhereUniqueInput +} + +export type AddressUncheckedCreateNestedOneWithoutCustomerInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AddressCreateOrConnectWithoutCustomerInput + connect?: Prisma.AddressWhereUniqueInput +} + +export type AddressUpdateOneWithoutCustomerNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AddressCreateOrConnectWithoutCustomerInput + upsert?: Prisma.AddressUpsertWithoutCustomerInput + disconnect?: Prisma.AddressWhereInput | boolean + delete?: Prisma.AddressWhereInput | boolean + connect?: Prisma.AddressWhereUniqueInput + update?: Prisma.XOR, Prisma.AddressUncheckedUpdateWithoutCustomerInput> +} + +export type AddressUncheckedUpdateOneWithoutCustomerNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AddressCreateOrConnectWithoutCustomerInput + upsert?: Prisma.AddressUpsertWithoutCustomerInput + disconnect?: Prisma.AddressWhereInput | boolean + delete?: Prisma.AddressWhereInput | boolean + connect?: Prisma.AddressWhereUniqueInput + update?: Prisma.XOR, Prisma.AddressUncheckedUpdateWithoutCustomerInput> +} + +export type AddressCreateWithoutCustomerInput = { + street?: string | null + city?: string | null + postalCode?: string | null + country?: string | null +} + +export type AddressUncheckedCreateWithoutCustomerInput = { + id?: number + street?: string | null + city?: string | null + postalCode?: string | null + country?: string | null +} + +export type AddressCreateOrConnectWithoutCustomerInput = { + where: Prisma.AddressWhereUniqueInput + create: Prisma.XOR +} + +export type AddressUpsertWithoutCustomerInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.AddressWhereInput +} + +export type AddressUpdateToOneWithWhereWithoutCustomerInput = { + where?: Prisma.AddressWhereInput + data: Prisma.XOR +} + +export type AddressUpdateWithoutCustomerInput = { + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type AddressUncheckedUpdateWithoutCustomerInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + street?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + postalCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + + + +export type AddressSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + street?: boolean + city?: boolean + postalCode?: boolean + country?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs +}, ExtArgs["result"]["address"]> + +export type AddressSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + street?: boolean + city?: boolean + postalCode?: boolean + country?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs +}, ExtArgs["result"]["address"]> + +export type AddressSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + street?: boolean + city?: boolean + postalCode?: boolean + country?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs +}, ExtArgs["result"]["address"]> + +export type AddressSelectScalar = { + id?: boolean + street?: boolean + city?: boolean + postalCode?: boolean + country?: boolean + customerId?: boolean +} + +export type AddressOmit = runtime.Types.Extensions.GetOmit<"id" | "street" | "city" | "postalCode" | "country" | "customerId", ExtArgs["result"]["address"]> +export type AddressInclude = { + customer?: boolean | Prisma.CustomerDefaultArgs +} +export type AddressIncludeCreateManyAndReturn = { + customer?: boolean | Prisma.CustomerDefaultArgs +} +export type AddressIncludeUpdateManyAndReturn = { + customer?: boolean | Prisma.CustomerDefaultArgs +} + +export type $AddressPayload = { + name: "Address" + objects: { + customer: Prisma.$CustomerPayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + street: string | null + city: string | null + postalCode: string | null + country: string | null + customerId: number + }, ExtArgs["result"]["address"]> + composites: {} +} + +export type AddressGetPayload = runtime.Types.Result.GetResult + +export type AddressCountArgs = + Omit & { + select?: AddressCountAggregateInputType | true + } + +export interface AddressDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Address'], meta: { name: 'Address' } } + /** + * Find zero or one Address that matches the filter. + * @param {AddressFindUniqueArgs} args - Arguments to find a Address + * @example + * // Get one Address + * const address = await prisma.address.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Address that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AddressFindUniqueOrThrowArgs} args - Arguments to find a Address + * @example + * // Get one Address + * const address = await prisma.address.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Address that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressFindFirstArgs} args - Arguments to find a Address + * @example + * // Get one Address + * const address = await prisma.address.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Address that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressFindFirstOrThrowArgs} args - Arguments to find a Address + * @example + * // Get one Address + * const address = await prisma.address.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Addresses that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Addresses + * const addresses = await prisma.address.findMany() + * + * // Get first 10 Addresses + * const addresses = await prisma.address.findMany({ take: 10 }) + * + * // Only select the `id` + * const addressWithIdOnly = await prisma.address.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Address. + * @param {AddressCreateArgs} args - Arguments to create a Address. + * @example + * // Create one Address + * const Address = await prisma.address.create({ + * data: { + * // ... data to create a Address + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Addresses. + * @param {AddressCreateManyArgs} args - Arguments to create many Addresses. + * @example + * // Create many Addresses + * const address = await prisma.address.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Addresses and returns the data saved in the database. + * @param {AddressCreateManyAndReturnArgs} args - Arguments to create many Addresses. + * @example + * // Create many Addresses + * const address = await prisma.address.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Addresses and only return the `id` + * const addressWithIdOnly = await prisma.address.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Address. + * @param {AddressDeleteArgs} args - Arguments to delete one Address. + * @example + * // Delete one Address + * const Address = await prisma.address.delete({ + * where: { + * // ... filter to delete one Address + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Address. + * @param {AddressUpdateArgs} args - Arguments to update one Address. + * @example + * // Update one Address + * const address = await prisma.address.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Addresses. + * @param {AddressDeleteManyArgs} args - Arguments to filter Addresses to delete. + * @example + * // Delete a few Addresses + * const { count } = await prisma.address.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Addresses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Addresses + * const address = await prisma.address.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Addresses and returns the data updated in the database. + * @param {AddressUpdateManyAndReturnArgs} args - Arguments to update many Addresses. + * @example + * // Update many Addresses + * const address = await prisma.address.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Addresses and only return the `id` + * const addressWithIdOnly = await prisma.address.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Address. + * @param {AddressUpsertArgs} args - Arguments to update or create a Address. + * @example + * // Update or create a Address + * const address = await prisma.address.upsert({ + * create: { + * // ... data to create a Address + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Address we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AddressClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Addresses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressCountArgs} args - Arguments to filter Addresses to count. + * @example + * // Count the number of Addresses + * const count = await prisma.address.count({ + * where: { + * // ... the filter for the Addresses we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Address. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Address. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AddressGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AddressGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: AddressGroupByArgs['orderBy'] } + : { orderBy?: AddressGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAddressGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Address model + */ +readonly fields: AddressFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Address. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__AddressClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Address model + */ +export interface AddressFieldRefs { + readonly id: Prisma.FieldRef<"Address", 'Int'> + readonly street: Prisma.FieldRef<"Address", 'String'> + readonly city: Prisma.FieldRef<"Address", 'String'> + readonly postalCode: Prisma.FieldRef<"Address", 'String'> + readonly country: Prisma.FieldRef<"Address", 'String'> + readonly customerId: Prisma.FieldRef<"Address", 'Int'> +} + + +// Custom InputTypes +/** + * Address findUnique + */ +export type AddressFindUniqueArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter, which Address to fetch. + */ + where: Prisma.AddressWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address findUniqueOrThrow + */ +export type AddressFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter, which Address to fetch. + */ + where: Prisma.AddressWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address findFirst + */ +export type AddressFindFirstArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter, which Address to fetch. + */ + where?: Prisma.AddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Addresses to fetch. + */ + orderBy?: Prisma.AddressOrderByWithRelationInput | Prisma.AddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Addresses. + */ + cursor?: Prisma.AddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Addresses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Addresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Addresses. + */ + distinct?: Prisma.AddressScalarFieldEnum | Prisma.AddressScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address findFirstOrThrow + */ +export type AddressFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter, which Address to fetch. + */ + where?: Prisma.AddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Addresses to fetch. + */ + orderBy?: Prisma.AddressOrderByWithRelationInput | Prisma.AddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Addresses. + */ + cursor?: Prisma.AddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Addresses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Addresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Addresses. + */ + distinct?: Prisma.AddressScalarFieldEnum | Prisma.AddressScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address findMany + */ +export type AddressFindManyArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter, which Addresses to fetch. + */ + where?: Prisma.AddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Addresses to fetch. + */ + orderBy?: Prisma.AddressOrderByWithRelationInput | Prisma.AddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Addresses. + */ + cursor?: Prisma.AddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Addresses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Addresses. + */ + skip?: number + distinct?: Prisma.AddressScalarFieldEnum | Prisma.AddressScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address create + */ +export type AddressCreateArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * The data needed to create a Address. + */ + data: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address createMany + */ +export type AddressCreateManyArgs = { + /** + * The data used to create many Addresses. + */ + data: Prisma.AddressCreateManyInput | Prisma.AddressCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Address createManyAndReturn + */ +export type AddressCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * The data used to create many Addresses. + */ + data: Prisma.AddressCreateManyInput | Prisma.AddressCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressIncludeCreateManyAndReturn | null +} + +/** + * Address update + */ +export type AddressUpdateArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * The data needed to update a Address. + */ + data: Prisma.XOR + /** + * Choose, which Address to update. + */ + where: Prisma.AddressWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address updateMany + */ +export type AddressUpdateManyArgs = { + /** + * The data used to update Addresses. + */ + data: Prisma.XOR + /** + * Filter which Addresses to update + */ + where?: Prisma.AddressWhereInput + /** + * Limit how many Addresses to update. + */ + limit?: number +} + +/** + * Address updateManyAndReturn + */ +export type AddressUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * The data used to update Addresses. + */ + data: Prisma.XOR + /** + * Filter which Addresses to update + */ + where?: Prisma.AddressWhereInput + /** + * Limit how many Addresses to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressIncludeUpdateManyAndReturn | null +} + +/** + * Address upsert + */ +export type AddressUpsertArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * The filter to search for the Address to update in case it exists. + */ + where: Prisma.AddressWhereUniqueInput + /** + * In case the Address found by the `where` argument doesn't exist, create a new Address with this data. + */ + create: Prisma.XOR + /** + * In case the Address was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address delete + */ +export type AddressDeleteArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + /** + * Filter which Address to delete. + */ + where: Prisma.AddressWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Address deleteMany + */ +export type AddressDeleteManyArgs = { + /** + * Filter which Addresses to delete + */ + where?: Prisma.AddressWhereInput + /** + * Limit how many Addresses to delete. + */ + limit?: number +} + +/** + * Address without action + */ +export type AddressDefaultArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null +} diff --git a/src/prisma/client-pg/models/Customer.ts b/src/prisma/client-pg/models/Customer.ts new file mode 100644 index 0000000..68e39ef --- /dev/null +++ b/src/prisma/client-pg/models/Customer.ts @@ -0,0 +1,1491 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file exports the `Customer` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/library" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Customer + * + */ +export type CustomerModel = runtime.Types.Result.DefaultSelection + +export type AggregateCustomer = { + _count: CustomerCountAggregateOutputType | null + _avg: CustomerAvgAggregateOutputType | null + _sum: CustomerSumAggregateOutputType | null + _min: CustomerMinAggregateOutputType | null + _max: CustomerMaxAggregateOutputType | null +} + +export type CustomerAvgAggregateOutputType = { + id: number | null +} + +export type CustomerSumAggregateOutputType = { + id: number | null +} + +export type CustomerMinAggregateOutputType = { + id: number | null + createdAt: Date | null + name: string | null + email: string | null + isActive: boolean | null +} + +export type CustomerMaxAggregateOutputType = { + id: number | null + createdAt: Date | null + name: string | null + email: string | null + isActive: boolean | null +} + +export type CustomerCountAggregateOutputType = { + id: number + createdAt: number + name: number + email: number + isActive: number + _all: number +} + + +export type CustomerAvgAggregateInputType = { + id?: true +} + +export type CustomerSumAggregateInputType = { + id?: true +} + +export type CustomerMinAggregateInputType = { + id?: true + createdAt?: true + name?: true + email?: true + isActive?: true +} + +export type CustomerMaxAggregateInputType = { + id?: true + createdAt?: true + name?: true + email?: true + isActive?: true +} + +export type CustomerCountAggregateInputType = { + id?: true + createdAt?: true + name?: true + email?: true + isActive?: true + _all?: true +} + +export type CustomerAggregateArgs = { + /** + * Filter which Customer to aggregate. + */ + where?: Prisma.CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: Prisma.CustomerOrderByWithRelationInput | Prisma.CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Customers + **/ + _count?: true | CustomerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: CustomerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: CustomerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CustomerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CustomerMaxAggregateInputType +} + +export type GetCustomerAggregateType = { + [P in keyof T & keyof AggregateCustomer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type CustomerGroupByArgs = { + where?: Prisma.CustomerWhereInput + orderBy?: Prisma.CustomerOrderByWithAggregationInput | Prisma.CustomerOrderByWithAggregationInput[] + by: Prisma.CustomerScalarFieldEnum[] | Prisma.CustomerScalarFieldEnum + having?: Prisma.CustomerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CustomerCountAggregateInputType | true + _avg?: CustomerAvgAggregateInputType + _sum?: CustomerSumAggregateInputType + _min?: CustomerMinAggregateInputType + _max?: CustomerMaxAggregateInputType +} + +export type CustomerGroupByOutputType = { + id: number + createdAt: Date + name: string | null + email: string + isActive: boolean + _count: CustomerCountAggregateOutputType | null + _avg: CustomerAvgAggregateOutputType | null + _sum: CustomerSumAggregateOutputType | null + _min: CustomerMinAggregateOutputType | null + _max: CustomerMaxAggregateOutputType | null +} + +type GetCustomerGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof CustomerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type CustomerWhereInput = { + AND?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[] + OR?: Prisma.CustomerWhereInput[] + NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[] + id?: Prisma.IntFilter<"Customer"> | number + createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string + name?: Prisma.StringNullableFilter<"Customer"> | string | null + email?: Prisma.StringFilter<"Customer"> | string + isActive?: Prisma.BoolFilter<"Customer"> | boolean + address?: Prisma.XOR | null + orders?: Prisma.OrderListRelationFilter +} + +export type CustomerOrderByWithRelationInput = { + id?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + name?: Prisma.SortOrderInput | Prisma.SortOrder + email?: Prisma.SortOrder + isActive?: Prisma.SortOrder + address?: Prisma.AddressOrderByWithRelationInput + orders?: Prisma.OrderOrderByRelationAggregateInput +} + +export type CustomerWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[] + OR?: Prisma.CustomerWhereInput[] + NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[] + createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string + name?: Prisma.StringNullableFilter<"Customer"> | string | null + email?: Prisma.StringFilter<"Customer"> | string + isActive?: Prisma.BoolFilter<"Customer"> | boolean + address?: Prisma.XOR | null + orders?: Prisma.OrderListRelationFilter +}, "id"> + +export type CustomerOrderByWithAggregationInput = { + id?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + name?: Prisma.SortOrderInput | Prisma.SortOrder + email?: Prisma.SortOrder + isActive?: Prisma.SortOrder + _count?: Prisma.CustomerCountOrderByAggregateInput + _avg?: Prisma.CustomerAvgOrderByAggregateInput + _max?: Prisma.CustomerMaxOrderByAggregateInput + _min?: Prisma.CustomerMinOrderByAggregateInput + _sum?: Prisma.CustomerSumOrderByAggregateInput +} + +export type CustomerScalarWhereWithAggregatesInput = { + AND?: Prisma.CustomerScalarWhereWithAggregatesInput | Prisma.CustomerScalarWhereWithAggregatesInput[] + OR?: Prisma.CustomerScalarWhereWithAggregatesInput[] + NOT?: Prisma.CustomerScalarWhereWithAggregatesInput | Prisma.CustomerScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Customer"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string + name?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null + email?: Prisma.StringWithAggregatesFilter<"Customer"> | string + isActive?: Prisma.BoolWithAggregatesFilter<"Customer"> | boolean +} + +export type CustomerCreateInput = { + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + address?: Prisma.AddressCreateNestedOneWithoutCustomerInput + orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput +} + +export type CustomerUncheckedCreateInput = { + id?: number + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + address?: Prisma.AddressUncheckedCreateNestedOneWithoutCustomerInput + orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput +} + +export type CustomerUpdateInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + address?: Prisma.AddressUpdateOneWithoutCustomerNestedInput + orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput +} + +export type CustomerUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + address?: Prisma.AddressUncheckedUpdateOneWithoutCustomerNestedInput + orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput +} + +export type CustomerCreateManyInput = { + id?: number + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean +} + +export type CustomerUpdateManyMutationInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + +export type CustomerUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + +export type CustomerCountOrderByAggregateInput = { + id?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + isActive?: Prisma.SortOrder +} + +export type CustomerAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type CustomerMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + isActive?: Prisma.SortOrder +} + +export type CustomerMinOrderByAggregateInput = { + id?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + isActive?: Prisma.SortOrder +} + +export type CustomerSumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type CustomerScalarRelationFilter = { + is?: Prisma.CustomerWhereInput + isNot?: Prisma.CustomerWhereInput +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type CustomerCreateNestedOneWithoutAddressInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutAddressInput + connect?: Prisma.CustomerWhereUniqueInput +} + +export type CustomerUpdateOneRequiredWithoutAddressNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutAddressInput + upsert?: Prisma.CustomerUpsertWithoutAddressInput + connect?: Prisma.CustomerWhereUniqueInput + update?: Prisma.XOR, Prisma.CustomerUncheckedUpdateWithoutAddressInput> +} + +export type CustomerCreateNestedOneWithoutOrdersInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput + connect?: Prisma.CustomerWhereUniqueInput +} + +export type CustomerUpdateOneRequiredWithoutOrdersNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput + upsert?: Prisma.CustomerUpsertWithoutOrdersInput + connect?: Prisma.CustomerWhereUniqueInput + update?: Prisma.XOR, Prisma.CustomerUncheckedUpdateWithoutOrdersInput> +} + +export type CustomerCreateWithoutAddressInput = { + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput +} + +export type CustomerUncheckedCreateWithoutAddressInput = { + id?: number + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput +} + +export type CustomerCreateOrConnectWithoutAddressInput = { + where: Prisma.CustomerWhereUniqueInput + create: Prisma.XOR +} + +export type CustomerUpsertWithoutAddressInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.CustomerWhereInput +} + +export type CustomerUpdateToOneWithWhereWithoutAddressInput = { + where?: Prisma.CustomerWhereInput + data: Prisma.XOR +} + +export type CustomerUpdateWithoutAddressInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput +} + +export type CustomerUncheckedUpdateWithoutAddressInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput +} + +export type CustomerCreateWithoutOrdersInput = { + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + address?: Prisma.AddressCreateNestedOneWithoutCustomerInput +} + +export type CustomerUncheckedCreateWithoutOrdersInput = { + id?: number + createdAt?: Date | string + name?: string | null + email: string + isActive?: boolean + address?: Prisma.AddressUncheckedCreateNestedOneWithoutCustomerInput +} + +export type CustomerCreateOrConnectWithoutOrdersInput = { + where: Prisma.CustomerWhereUniqueInput + create: Prisma.XOR +} + +export type CustomerUpsertWithoutOrdersInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.CustomerWhereInput +} + +export type CustomerUpdateToOneWithWhereWithoutOrdersInput = { + where?: Prisma.CustomerWhereInput + data: Prisma.XOR +} + +export type CustomerUpdateWithoutOrdersInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + address?: Prisma.AddressUpdateOneWithoutCustomerNestedInput +} + +export type CustomerUncheckedUpdateWithoutOrdersInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + email?: Prisma.StringFieldUpdateOperationsInput | string + isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean + address?: Prisma.AddressUncheckedUpdateOneWithoutCustomerNestedInput +} + + +/** + * Count Type CustomerCountOutputType + */ + +export type CustomerCountOutputType = { + orders: number +} + +export type CustomerCountOutputTypeSelect = { + orders?: boolean | CustomerCountOutputTypeCountOrdersArgs +} + +/** + * CustomerCountOutputType without action + */ +export type CustomerCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CustomerCountOutputType + */ + select?: Prisma.CustomerCountOutputTypeSelect | null +} + +/** + * CustomerCountOutputType without action + */ +export type CustomerCountOutputTypeCountOrdersArgs = { + where?: Prisma.OrderWhereInput +} + + +export type CustomerSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + createdAt?: boolean + name?: boolean + email?: boolean + isActive?: boolean + address?: boolean | Prisma.Customer$addressArgs + orders?: boolean | Prisma.Customer$ordersArgs + _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs +}, ExtArgs["result"]["customer"]> + +export type CustomerSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + createdAt?: boolean + name?: boolean + email?: boolean + isActive?: boolean +}, ExtArgs["result"]["customer"]> + +export type CustomerSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + createdAt?: boolean + name?: boolean + email?: boolean + isActive?: boolean +}, ExtArgs["result"]["customer"]> + +export type CustomerSelectScalar = { + id?: boolean + createdAt?: boolean + name?: boolean + email?: boolean + isActive?: boolean +} + +export type CustomerOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "name" | "email" | "isActive", ExtArgs["result"]["customer"]> +export type CustomerInclude = { + address?: boolean | Prisma.Customer$addressArgs + orders?: boolean | Prisma.Customer$ordersArgs + _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs +} +export type CustomerIncludeCreateManyAndReturn = {} +export type CustomerIncludeUpdateManyAndReturn = {} + +export type $CustomerPayload = { + name: "Customer" + objects: { + address: Prisma.$AddressPayload | null + orders: Prisma.$OrderPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + createdAt: Date + name: string | null + email: string + isActive: boolean + }, ExtArgs["result"]["customer"]> + composites: {} +} + +export type CustomerGetPayload = runtime.Types.Result.GetResult + +export type CustomerCountArgs = + Omit & { + select?: CustomerCountAggregateInputType | true + } + +export interface CustomerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Customer'], meta: { name: 'Customer' } } + /** + * Find zero or one Customer that matches the filter. + * @param {CustomerFindUniqueArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Customer that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CustomerFindUniqueOrThrowArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Customer that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFindFirstArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Customer that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFindFirstOrThrowArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Customers that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Customers + * const customers = await prisma.customer.findMany() + * + * // Get first 10 Customers + * const customers = await prisma.customer.findMany({ take: 10 }) + * + * // Only select the `id` + * const customerWithIdOnly = await prisma.customer.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Customer. + * @param {CustomerCreateArgs} args - Arguments to create a Customer. + * @example + * // Create one Customer + * const Customer = await prisma.customer.create({ + * data: { + * // ... data to create a Customer + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Customers. + * @param {CustomerCreateManyArgs} args - Arguments to create many Customers. + * @example + * // Create many Customers + * const customer = await prisma.customer.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Customers and returns the data saved in the database. + * @param {CustomerCreateManyAndReturnArgs} args - Arguments to create many Customers. + * @example + * // Create many Customers + * const customer = await prisma.customer.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Customers and only return the `id` + * const customerWithIdOnly = await prisma.customer.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Customer. + * @param {CustomerDeleteArgs} args - Arguments to delete one Customer. + * @example + * // Delete one Customer + * const Customer = await prisma.customer.delete({ + * where: { + * // ... filter to delete one Customer + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Customer. + * @param {CustomerUpdateArgs} args - Arguments to update one Customer. + * @example + * // Update one Customer + * const customer = await prisma.customer.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Customers. + * @param {CustomerDeleteManyArgs} args - Arguments to filter Customers to delete. + * @example + * // Delete a few Customers + * const { count } = await prisma.customer.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Customers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Customers + * const customer = await prisma.customer.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Customers and returns the data updated in the database. + * @param {CustomerUpdateManyAndReturnArgs} args - Arguments to update many Customers. + * @example + * // Update many Customers + * const customer = await prisma.customer.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Customers and only return the `id` + * const customerWithIdOnly = await prisma.customer.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Customer. + * @param {CustomerUpsertArgs} args - Arguments to update or create a Customer. + * @example + * // Update or create a Customer + * const customer = await prisma.customer.upsert({ + * create: { + * // ... data to create a Customer + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Customer we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Customers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerCountArgs} args - Arguments to filter Customers to count. + * @example + * // Count the number of Customers + * const count = await prisma.customer.count({ + * where: { + * // ... the filter for the Customers we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Customer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Customer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CustomerGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: CustomerGroupByArgs['orderBy'] } + : { orderBy?: CustomerGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetCustomerGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Customer model + */ +readonly fields: CustomerFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Customer. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__CustomerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + address = {}>(args?: Prisma.Subset>): Prisma.Prisma__AddressClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + orders = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Customer model + */ +export interface CustomerFieldRefs { + readonly id: Prisma.FieldRef<"Customer", 'Int'> + readonly createdAt: Prisma.FieldRef<"Customer", 'DateTime'> + readonly name: Prisma.FieldRef<"Customer", 'String'> + readonly email: Prisma.FieldRef<"Customer", 'String'> + readonly isActive: Prisma.FieldRef<"Customer", 'Boolean'> +} + + +// Custom InputTypes +/** + * Customer findUnique + */ +export type CustomerFindUniqueArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where: Prisma.CustomerWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer findUniqueOrThrow + */ +export type CustomerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where: Prisma.CustomerWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer findFirst + */ +export type CustomerFindFirstArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where?: Prisma.CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: Prisma.CustomerOrderByWithRelationInput | Prisma.CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Customers. + */ + cursor?: Prisma.CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Customers. + */ + distinct?: Prisma.CustomerScalarFieldEnum | Prisma.CustomerScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer findFirstOrThrow + */ +export type CustomerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where?: Prisma.CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: Prisma.CustomerOrderByWithRelationInput | Prisma.CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Customers. + */ + cursor?: Prisma.CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Customers. + */ + distinct?: Prisma.CustomerScalarFieldEnum | Prisma.CustomerScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer findMany + */ +export type CustomerFindManyArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter, which Customers to fetch. + */ + where?: Prisma.CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: Prisma.CustomerOrderByWithRelationInput | Prisma.CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Customers. + */ + cursor?: Prisma.CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Customers. + */ + skip?: number + distinct?: Prisma.CustomerScalarFieldEnum | Prisma.CustomerScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer create + */ +export type CustomerCreateArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * The data needed to create a Customer. + */ + data: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer createMany + */ +export type CustomerCreateManyArgs = { + /** + * The data used to create many Customers. + */ + data: Prisma.CustomerCreateManyInput | Prisma.CustomerCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Customer createManyAndReturn + */ +export type CustomerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * The data used to create many Customers. + */ + data: Prisma.CustomerCreateManyInput | Prisma.CustomerCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Customer update + */ +export type CustomerUpdateArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * The data needed to update a Customer. + */ + data: Prisma.XOR + /** + * Choose, which Customer to update. + */ + where: Prisma.CustomerWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer updateMany + */ +export type CustomerUpdateManyArgs = { + /** + * The data used to update Customers. + */ + data: Prisma.XOR + /** + * Filter which Customers to update + */ + where?: Prisma.CustomerWhereInput + /** + * Limit how many Customers to update. + */ + limit?: number +} + +/** + * Customer updateManyAndReturn + */ +export type CustomerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * The data used to update Customers. + */ + data: Prisma.XOR + /** + * Filter which Customers to update + */ + where?: Prisma.CustomerWhereInput + /** + * Limit how many Customers to update. + */ + limit?: number +} + +/** + * Customer upsert + */ +export type CustomerUpsertArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * The filter to search for the Customer to update in case it exists. + */ + where: Prisma.CustomerWhereUniqueInput + /** + * In case the Customer found by the `where` argument doesn't exist, create a new Customer with this data. + */ + create: Prisma.XOR + /** + * In case the Customer was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer delete + */ +export type CustomerDeleteArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null + /** + * Filter which Customer to delete. + */ + where: Prisma.CustomerWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Customer deleteMany + */ +export type CustomerDeleteManyArgs = { + /** + * Filter which Customers to delete + */ + where?: Prisma.CustomerWhereInput + /** + * Limit how many Customers to delete. + */ + limit?: number +} + +/** + * Customer.address + */ +export type Customer$addressArgs = { + /** + * Select specific fields to fetch from the Address + */ + select?: Prisma.AddressSelect | null + /** + * Omit specific fields from the Address + */ + omit?: Prisma.AddressOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AddressInclude | null + where?: Prisma.AddressWhereInput +} + +/** + * Customer.orders + */ +export type Customer$ordersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + where?: Prisma.OrderWhereInput + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + cursor?: Prisma.OrderWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] +} + +/** + * Customer without action + */ +export type CustomerDefaultArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: Prisma.CustomerSelect | null + /** + * Omit specific fields from the Customer + */ + omit?: Prisma.CustomerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CustomerInclude | null +} diff --git a/src/prisma/client-pg/models/Order.ts b/src/prisma/client-pg/models/Order.ts new file mode 100644 index 0000000..5eee32e --- /dev/null +++ b/src/prisma/client-pg/models/Order.ts @@ -0,0 +1,1534 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file exports the `Order` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/library" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Order + * + */ +export type OrderModel = runtime.Types.Result.DefaultSelection + +export type AggregateOrder = { + _count: OrderCountAggregateOutputType | null + _avg: OrderAvgAggregateOutputType | null + _sum: OrderSumAggregateOutputType | null + _min: OrderMinAggregateOutputType | null + _max: OrderMaxAggregateOutputType | null +} + +export type OrderAvgAggregateOutputType = { + id: number | null + totalAmount: number | null + customerId: number | null +} + +export type OrderSumAggregateOutputType = { + id: number | null + totalAmount: number | null + customerId: number | null +} + +export type OrderMinAggregateOutputType = { + id: number | null + date: Date | null + totalAmount: number | null + customerId: number | null +} + +export type OrderMaxAggregateOutputType = { + id: number | null + date: Date | null + totalAmount: number | null + customerId: number | null +} + +export type OrderCountAggregateOutputType = { + id: number + date: number + totalAmount: number + customerId: number + _all: number +} + + +export type OrderAvgAggregateInputType = { + id?: true + totalAmount?: true + customerId?: true +} + +export type OrderSumAggregateInputType = { + id?: true + totalAmount?: true + customerId?: true +} + +export type OrderMinAggregateInputType = { + id?: true + date?: true + totalAmount?: true + customerId?: true +} + +export type OrderMaxAggregateInputType = { + id?: true + date?: true + totalAmount?: true + customerId?: true +} + +export type OrderCountAggregateInputType = { + id?: true + date?: true + totalAmount?: true + customerId?: true + _all?: true +} + +export type OrderAggregateArgs = { + /** + * Filter which Order to aggregate. + */ + where?: Prisma.OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Orders + **/ + _count?: true | OrderCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: OrderAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: OrderSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: OrderMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: OrderMaxAggregateInputType +} + +export type GetOrderAggregateType = { + [P in keyof T & keyof AggregateOrder]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type OrderGroupByArgs = { + where?: Prisma.OrderWhereInput + orderBy?: Prisma.OrderOrderByWithAggregationInput | Prisma.OrderOrderByWithAggregationInput[] + by: Prisma.OrderScalarFieldEnum[] | Prisma.OrderScalarFieldEnum + having?: Prisma.OrderScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: OrderCountAggregateInputType | true + _avg?: OrderAvgAggregateInputType + _sum?: OrderSumAggregateInputType + _min?: OrderMinAggregateInputType + _max?: OrderMaxAggregateInputType +} + +export type OrderGroupByOutputType = { + id: number + date: Date + totalAmount: number + customerId: number + _count: OrderCountAggregateOutputType | null + _avg: OrderAvgAggregateOutputType | null + _sum: OrderSumAggregateOutputType | null + _min: OrderMinAggregateOutputType | null + _max: OrderMaxAggregateOutputType | null +} + +type GetOrderGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof OrderGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type OrderWhereInput = { + AND?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] + OR?: Prisma.OrderWhereInput[] + NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] + id?: Prisma.IntFilter<"Order"> | number + date?: Prisma.DateTimeFilter<"Order"> | Date | string + totalAmount?: Prisma.FloatFilter<"Order"> | number + customerId?: Prisma.IntFilter<"Order"> | number + customer?: Prisma.XOR + products?: Prisma.ProductListRelationFilter +} + +export type OrderOrderByWithRelationInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder + customer?: Prisma.CustomerOrderByWithRelationInput + products?: Prisma.ProductOrderByRelationAggregateInput +} + +export type OrderWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] + OR?: Prisma.OrderWhereInput[] + NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] + date?: Prisma.DateTimeFilter<"Order"> | Date | string + totalAmount?: Prisma.FloatFilter<"Order"> | number + customerId?: Prisma.IntFilter<"Order"> | number + customer?: Prisma.XOR + products?: Prisma.ProductListRelationFilter +}, "id"> + +export type OrderOrderByWithAggregationInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder + _count?: Prisma.OrderCountOrderByAggregateInput + _avg?: Prisma.OrderAvgOrderByAggregateInput + _max?: Prisma.OrderMaxOrderByAggregateInput + _min?: Prisma.OrderMinOrderByAggregateInput + _sum?: Prisma.OrderSumOrderByAggregateInput +} + +export type OrderScalarWhereWithAggregatesInput = { + AND?: Prisma.OrderScalarWhereWithAggregatesInput | Prisma.OrderScalarWhereWithAggregatesInput[] + OR?: Prisma.OrderScalarWhereWithAggregatesInput[] + NOT?: Prisma.OrderScalarWhereWithAggregatesInput | Prisma.OrderScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Order"> | number + date?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string + totalAmount?: Prisma.FloatWithAggregatesFilter<"Order"> | number + customerId?: Prisma.IntWithAggregatesFilter<"Order"> | number +} + +export type OrderCreateInput = { + date: Date | string + totalAmount: number + customer: Prisma.CustomerCreateNestedOneWithoutOrdersInput + products?: Prisma.ProductCreateNestedManyWithoutOrdersInput +} + +export type OrderUncheckedCreateInput = { + id?: number + date: Date | string + totalAmount: number + customerId: number + products?: Prisma.ProductUncheckedCreateNestedManyWithoutOrdersInput +} + +export type OrderUpdateInput = { + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customer?: Prisma.CustomerUpdateOneRequiredWithoutOrdersNestedInput + products?: Prisma.ProductUpdateManyWithoutOrdersNestedInput +} + +export type OrderUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customerId?: Prisma.IntFieldUpdateOperationsInput | number + products?: Prisma.ProductUncheckedUpdateManyWithoutOrdersNestedInput +} + +export type OrderCreateManyInput = { + id?: number + date: Date | string + totalAmount: number + customerId: number +} + +export type OrderUpdateManyMutationInput = { + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number +} + +export type OrderUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customerId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type OrderListRelationFilter = { + every?: Prisma.OrderWhereInput + some?: Prisma.OrderWhereInput + none?: Prisma.OrderWhereInput +} + +export type OrderOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type OrderCountOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type OrderAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type OrderMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type OrderMinOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type OrderSumOrderByAggregateInput = { + id?: Prisma.SortOrder + totalAmount?: Prisma.SortOrder + customerId?: Prisma.SortOrder +} + +export type OrderCreateNestedManyWithoutCustomerInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] + createMany?: Prisma.OrderCreateManyCustomerInputEnvelope + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] +} + +export type OrderUncheckedCreateNestedManyWithoutCustomerInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] + createMany?: Prisma.OrderCreateManyCustomerInputEnvelope + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] +} + +export type OrderUpdateManyWithoutCustomerNestedInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] + upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: Prisma.OrderCreateManyCustomerInputEnvelope + set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + update?: Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: Prisma.OrderUpdateManyWithWhereWithoutCustomerInput | Prisma.OrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] +} + +export type OrderUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] + upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: Prisma.OrderCreateManyCustomerInputEnvelope + set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + update?: Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: Prisma.OrderUpdateManyWithWhereWithoutCustomerInput | Prisma.OrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] +} + +export type FloatFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type OrderCreateNestedManyWithoutProductsInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutProductsInput[] | Prisma.OrderUncheckedCreateWithoutProductsInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutProductsInput | Prisma.OrderCreateOrConnectWithoutProductsInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] +} + +export type OrderUncheckedCreateNestedManyWithoutProductsInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutProductsInput[] | Prisma.OrderUncheckedCreateWithoutProductsInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutProductsInput | Prisma.OrderCreateOrConnectWithoutProductsInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] +} + +export type OrderUpdateManyWithoutProductsNestedInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutProductsInput[] | Prisma.OrderUncheckedCreateWithoutProductsInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutProductsInput | Prisma.OrderCreateOrConnectWithoutProductsInput[] + upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutProductsInput | Prisma.OrderUpsertWithWhereUniqueWithoutProductsInput[] + set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + update?: Prisma.OrderUpdateWithWhereUniqueWithoutProductsInput | Prisma.OrderUpdateWithWhereUniqueWithoutProductsInput[] + updateMany?: Prisma.OrderUpdateManyWithWhereWithoutProductsInput | Prisma.OrderUpdateManyWithWhereWithoutProductsInput[] + deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] +} + +export type OrderUncheckedUpdateManyWithoutProductsNestedInput = { + create?: Prisma.XOR | Prisma.OrderCreateWithoutProductsInput[] | Prisma.OrderUncheckedCreateWithoutProductsInput[] + connectOrCreate?: Prisma.OrderCreateOrConnectWithoutProductsInput | Prisma.OrderCreateOrConnectWithoutProductsInput[] + upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutProductsInput | Prisma.OrderUpsertWithWhereUniqueWithoutProductsInput[] + set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] + update?: Prisma.OrderUpdateWithWhereUniqueWithoutProductsInput | Prisma.OrderUpdateWithWhereUniqueWithoutProductsInput[] + updateMany?: Prisma.OrderUpdateManyWithWhereWithoutProductsInput | Prisma.OrderUpdateManyWithWhereWithoutProductsInput[] + deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] +} + +export type OrderCreateWithoutCustomerInput = { + date: Date | string + totalAmount: number + products?: Prisma.ProductCreateNestedManyWithoutOrdersInput +} + +export type OrderUncheckedCreateWithoutCustomerInput = { + id?: number + date: Date | string + totalAmount: number + products?: Prisma.ProductUncheckedCreateNestedManyWithoutOrdersInput +} + +export type OrderCreateOrConnectWithoutCustomerInput = { + where: Prisma.OrderWhereUniqueInput + create: Prisma.XOR +} + +export type OrderCreateManyCustomerInputEnvelope = { + data: Prisma.OrderCreateManyCustomerInput | Prisma.OrderCreateManyCustomerInput[] + skipDuplicates?: boolean +} + +export type OrderUpsertWithWhereUniqueWithoutCustomerInput = { + where: Prisma.OrderWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type OrderUpdateWithWhereUniqueWithoutCustomerInput = { + where: Prisma.OrderWhereUniqueInput + data: Prisma.XOR +} + +export type OrderUpdateManyWithWhereWithoutCustomerInput = { + where: Prisma.OrderScalarWhereInput + data: Prisma.XOR +} + +export type OrderScalarWhereInput = { + AND?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] + OR?: Prisma.OrderScalarWhereInput[] + NOT?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] + id?: Prisma.IntFilter<"Order"> | number + date?: Prisma.DateTimeFilter<"Order"> | Date | string + totalAmount?: Prisma.FloatFilter<"Order"> | number + customerId?: Prisma.IntFilter<"Order"> | number +} + +export type OrderCreateWithoutProductsInput = { + date: Date | string + totalAmount: number + customer: Prisma.CustomerCreateNestedOneWithoutOrdersInput +} + +export type OrderUncheckedCreateWithoutProductsInput = { + id?: number + date: Date | string + totalAmount: number + customerId: number +} + +export type OrderCreateOrConnectWithoutProductsInput = { + where: Prisma.OrderWhereUniqueInput + create: Prisma.XOR +} + +export type OrderUpsertWithWhereUniqueWithoutProductsInput = { + where: Prisma.OrderWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type OrderUpdateWithWhereUniqueWithoutProductsInput = { + where: Prisma.OrderWhereUniqueInput + data: Prisma.XOR +} + +export type OrderUpdateManyWithWhereWithoutProductsInput = { + where: Prisma.OrderScalarWhereInput + data: Prisma.XOR +} + +export type OrderCreateManyCustomerInput = { + id?: number + date: Date | string + totalAmount: number +} + +export type OrderUpdateWithoutCustomerInput = { + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + products?: Prisma.ProductUpdateManyWithoutOrdersNestedInput +} + +export type OrderUncheckedUpdateWithoutCustomerInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + products?: Prisma.ProductUncheckedUpdateManyWithoutOrdersNestedInput +} + +export type OrderUncheckedUpdateManyWithoutCustomerInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number +} + +export type OrderUpdateWithoutProductsInput = { + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customer?: Prisma.CustomerUpdateOneRequiredWithoutOrdersNestedInput +} + +export type OrderUncheckedUpdateWithoutProductsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customerId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type OrderUncheckedUpdateManyWithoutProductsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number + customerId?: Prisma.IntFieldUpdateOperationsInput | number +} + + +/** + * Count Type OrderCountOutputType + */ + +export type OrderCountOutputType = { + products: number +} + +export type OrderCountOutputTypeSelect = { + products?: boolean | OrderCountOutputTypeCountProductsArgs +} + +/** + * OrderCountOutputType without action + */ +export type OrderCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the OrderCountOutputType + */ + select?: Prisma.OrderCountOutputTypeSelect | null +} + +/** + * OrderCountOutputType without action + */ +export type OrderCountOutputTypeCountProductsArgs = { + where?: Prisma.ProductWhereInput +} + + +export type OrderSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + totalAmount?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs + products?: boolean | Prisma.Order$productsArgs + _count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs +}, ExtArgs["result"]["order"]> + +export type OrderSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + totalAmount?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs +}, ExtArgs["result"]["order"]> + +export type OrderSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + totalAmount?: boolean + customerId?: boolean + customer?: boolean | Prisma.CustomerDefaultArgs +}, ExtArgs["result"]["order"]> + +export type OrderSelectScalar = { + id?: boolean + date?: boolean + totalAmount?: boolean + customerId?: boolean +} + +export type OrderOmit = runtime.Types.Extensions.GetOmit<"id" | "date" | "totalAmount" | "customerId", ExtArgs["result"]["order"]> +export type OrderInclude = { + customer?: boolean | Prisma.CustomerDefaultArgs + products?: boolean | Prisma.Order$productsArgs + _count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs +} +export type OrderIncludeCreateManyAndReturn = { + customer?: boolean | Prisma.CustomerDefaultArgs +} +export type OrderIncludeUpdateManyAndReturn = { + customer?: boolean | Prisma.CustomerDefaultArgs +} + +export type $OrderPayload = { + name: "Order" + objects: { + customer: Prisma.$CustomerPayload + products: Prisma.$ProductPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + date: Date + totalAmount: number + customerId: number + }, ExtArgs["result"]["order"]> + composites: {} +} + +export type OrderGetPayload = runtime.Types.Result.GetResult + +export type OrderCountArgs = + Omit & { + select?: OrderCountAggregateInputType | true + } + +export interface OrderDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Order'], meta: { name: 'Order' } } + /** + * Find zero or one Order that matches the filter. + * @param {OrderFindUniqueArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Order that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {OrderFindUniqueOrThrowArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Order that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderFindFirstArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Order that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderFindFirstOrThrowArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Orders that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Orders + * const orders = await prisma.order.findMany() + * + * // Get first 10 Orders + * const orders = await prisma.order.findMany({ take: 10 }) + * + * // Only select the `id` + * const orderWithIdOnly = await prisma.order.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Order. + * @param {OrderCreateArgs} args - Arguments to create a Order. + * @example + * // Create one Order + * const Order = await prisma.order.create({ + * data: { + * // ... data to create a Order + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Orders. + * @param {OrderCreateManyArgs} args - Arguments to create many Orders. + * @example + * // Create many Orders + * const order = await prisma.order.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Orders and returns the data saved in the database. + * @param {OrderCreateManyAndReturnArgs} args - Arguments to create many Orders. + * @example + * // Create many Orders + * const order = await prisma.order.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Orders and only return the `id` + * const orderWithIdOnly = await prisma.order.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Order. + * @param {OrderDeleteArgs} args - Arguments to delete one Order. + * @example + * // Delete one Order + * const Order = await prisma.order.delete({ + * where: { + * // ... filter to delete one Order + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Order. + * @param {OrderUpdateArgs} args - Arguments to update one Order. + * @example + * // Update one Order + * const order = await prisma.order.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Orders. + * @param {OrderDeleteManyArgs} args - Arguments to filter Orders to delete. + * @example + * // Delete a few Orders + * const { count } = await prisma.order.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Orders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Orders + * const order = await prisma.order.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Orders and returns the data updated in the database. + * @param {OrderUpdateManyAndReturnArgs} args - Arguments to update many Orders. + * @example + * // Update many Orders + * const order = await prisma.order.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Orders and only return the `id` + * const orderWithIdOnly = await prisma.order.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Order. + * @param {OrderUpsertArgs} args - Arguments to update or create a Order. + * @example + * // Update or create a Order + * const order = await prisma.order.upsert({ + * create: { + * // ... data to create a Order + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Order we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Orders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderCountArgs} args - Arguments to filter Orders to count. + * @example + * // Count the number of Orders + * const count = await prisma.order.count({ + * where: { + * // ... the filter for the Orders we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Order. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Order. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends OrderGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: OrderGroupByArgs['orderBy'] } + : { orderBy?: OrderGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetOrderGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Order model + */ +readonly fields: OrderFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Order. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__OrderClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + products = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Order model + */ +export interface OrderFieldRefs { + readonly id: Prisma.FieldRef<"Order", 'Int'> + readonly date: Prisma.FieldRef<"Order", 'DateTime'> + readonly totalAmount: Prisma.FieldRef<"Order", 'Float'> + readonly customerId: Prisma.FieldRef<"Order", 'Int'> +} + + +// Custom InputTypes +/** + * Order findUnique + */ +export type OrderFindUniqueArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where: Prisma.OrderWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order findUniqueOrThrow + */ +export type OrderFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where: Prisma.OrderWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order findFirst + */ +export type OrderFindFirstArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where?: Prisma.OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Orders. + */ + cursor?: Prisma.OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Orders. + */ + distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order findFirstOrThrow + */ +export type OrderFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where?: Prisma.OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Orders. + */ + cursor?: Prisma.OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Orders. + */ + distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order findMany + */ +export type OrderFindManyArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter, which Orders to fetch. + */ + where?: Prisma.OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Orders. + */ + cursor?: Prisma.OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Orders. + */ + skip?: number + distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order create + */ +export type OrderCreateArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * The data needed to create a Order. + */ + data: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order createMany + */ +export type OrderCreateManyArgs = { + /** + * The data used to create many Orders. + */ + data: Prisma.OrderCreateManyInput | Prisma.OrderCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Order createManyAndReturn + */ +export type OrderCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * The data used to create many Orders. + */ + data: Prisma.OrderCreateManyInput | Prisma.OrderCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderIncludeCreateManyAndReturn | null +} + +/** + * Order update + */ +export type OrderUpdateArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * The data needed to update a Order. + */ + data: Prisma.XOR + /** + * Choose, which Order to update. + */ + where: Prisma.OrderWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order updateMany + */ +export type OrderUpdateManyArgs = { + /** + * The data used to update Orders. + */ + data: Prisma.XOR + /** + * Filter which Orders to update + */ + where?: Prisma.OrderWhereInput + /** + * Limit how many Orders to update. + */ + limit?: number +} + +/** + * Order updateManyAndReturn + */ +export type OrderUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * The data used to update Orders. + */ + data: Prisma.XOR + /** + * Filter which Orders to update + */ + where?: Prisma.OrderWhereInput + /** + * Limit how many Orders to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderIncludeUpdateManyAndReturn | null +} + +/** + * Order upsert + */ +export type OrderUpsertArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * The filter to search for the Order to update in case it exists. + */ + where: Prisma.OrderWhereUniqueInput + /** + * In case the Order found by the `where` argument doesn't exist, create a new Order with this data. + */ + create: Prisma.XOR + /** + * In case the Order was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order delete + */ +export type OrderDeleteArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + /** + * Filter which Order to delete. + */ + where: Prisma.OrderWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Order deleteMany + */ +export type OrderDeleteManyArgs = { + /** + * Filter which Orders to delete + */ + where?: Prisma.OrderWhereInput + /** + * Limit how many Orders to delete. + */ + limit?: number +} + +/** + * Order.products + */ +export type Order$productsArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + where?: Prisma.ProductWhereInput + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + cursor?: Prisma.ProductWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] +} + +/** + * Order without action + */ +export type OrderDefaultArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null +} diff --git a/src/prisma/client-pg/models/Product.ts b/src/prisma/client-pg/models/Product.ts new file mode 100644 index 0000000..5fb4878 --- /dev/null +++ b/src/prisma/client-pg/models/Product.ts @@ -0,0 +1,1434 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// @ts-nocheck +/* + * This file exports the `Product` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/library" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Product + * + */ +export type ProductModel = runtime.Types.Result.DefaultSelection + +export type AggregateProduct = { + _count: ProductCountAggregateOutputType | null + _avg: ProductAvgAggregateOutputType | null + _sum: ProductSumAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null +} + +export type ProductAvgAggregateOutputType = { + id: number | null + price: number | null + quantity: number | null +} + +export type ProductSumAggregateOutputType = { + id: number | null + price: number | null + quantity: number | null +} + +export type ProductMinAggregateOutputType = { + id: number | null + name: string | null + price: number | null + quantity: number | null + description: string | null +} + +export type ProductMaxAggregateOutputType = { + id: number | null + name: string | null + price: number | null + quantity: number | null + description: string | null +} + +export type ProductCountAggregateOutputType = { + id: number + name: number + price: number + quantity: number + description: number + _all: number +} + + +export type ProductAvgAggregateInputType = { + id?: true + price?: true + quantity?: true +} + +export type ProductSumAggregateInputType = { + id?: true + price?: true + quantity?: true +} + +export type ProductMinAggregateInputType = { + id?: true + name?: true + price?: true + quantity?: true + description?: true +} + +export type ProductMaxAggregateInputType = { + id?: true + name?: true + price?: true + quantity?: true + description?: true +} + +export type ProductCountAggregateInputType = { + id?: true + name?: true + price?: true + quantity?: true + description?: true + _all?: true +} + +export type ProductAggregateArgs = { + /** + * Filter which Product to aggregate. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Products + **/ + _count?: true | ProductCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ProductAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ProductSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ProductMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ProductMaxAggregateInputType +} + +export type GetProductAggregateType = { + [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ProductGroupByArgs = { + where?: Prisma.ProductWhereInput + orderBy?: Prisma.ProductOrderByWithAggregationInput | Prisma.ProductOrderByWithAggregationInput[] + by: Prisma.ProductScalarFieldEnum[] | Prisma.ProductScalarFieldEnum + having?: Prisma.ProductScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ProductCountAggregateInputType | true + _avg?: ProductAvgAggregateInputType + _sum?: ProductSumAggregateInputType + _min?: ProductMinAggregateInputType + _max?: ProductMaxAggregateInputType +} + +export type ProductGroupByOutputType = { + id: number + name: string + price: number + quantity: number + description: string | null + _count: ProductCountAggregateOutputType | null + _avg: ProductAvgAggregateOutputType | null + _sum: ProductSumAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null +} + +type GetProductGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ProductWhereInput = { + AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + OR?: Prisma.ProductWhereInput[] + NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + id?: Prisma.IntFilter<"Product"> | number + name?: Prisma.StringFilter<"Product"> | string + price?: Prisma.FloatFilter<"Product"> | number + quantity?: Prisma.IntFilter<"Product"> | number + description?: Prisma.StringNullableFilter<"Product"> | string | null + orders?: Prisma.OrderListRelationFilter +} + +export type ProductOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + orders?: Prisma.OrderOrderByRelationAggregateInput +} + +export type ProductWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + OR?: Prisma.ProductWhereInput[] + NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + name?: Prisma.StringFilter<"Product"> | string + price?: Prisma.FloatFilter<"Product"> | number + quantity?: Prisma.IntFilter<"Product"> | number + description?: Prisma.StringNullableFilter<"Product"> | string | null + orders?: Prisma.OrderListRelationFilter +}, "id"> + +export type ProductOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + _count?: Prisma.ProductCountOrderByAggregateInput + _avg?: Prisma.ProductAvgOrderByAggregateInput + _max?: Prisma.ProductMaxOrderByAggregateInput + _min?: Prisma.ProductMinOrderByAggregateInput + _sum?: Prisma.ProductSumOrderByAggregateInput +} + +export type ProductScalarWhereWithAggregatesInput = { + AND?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] + OR?: Prisma.ProductScalarWhereWithAggregatesInput[] + NOT?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Product"> | number + name?: Prisma.StringWithAggregatesFilter<"Product"> | string + price?: Prisma.FloatWithAggregatesFilter<"Product"> | number + quantity?: Prisma.IntWithAggregatesFilter<"Product"> | number + description?: Prisma.StringNullableWithAggregatesFilter<"Product"> | string | null +} + +export type ProductCreateInput = { + name: string + price: number + quantity: number + description?: string | null + orders?: Prisma.OrderCreateNestedManyWithoutProductsInput +} + +export type ProductUncheckedCreateInput = { + id?: number + name: string + price: number + quantity: number + description?: string | null + orders?: Prisma.OrderUncheckedCreateNestedManyWithoutProductsInput +} + +export type ProductUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + orders?: Prisma.OrderUpdateManyWithoutProductsNestedInput +} + +export type ProductUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + orders?: Prisma.OrderUncheckedUpdateManyWithoutProductsNestedInput +} + +export type ProductCreateManyInput = { + id?: number + name: string + price: number + quantity: number + description?: string | null +} + +export type ProductUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type ProductUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type ProductListRelationFilter = { + every?: Prisma.ProductWhereInput + some?: Prisma.ProductWhereInput + none?: Prisma.ProductWhereInput +} + +export type ProductOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type ProductCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder + description?: Prisma.SortOrder +} + +export type ProductAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder +} + +export type ProductMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder + description?: Prisma.SortOrder +} + +export type ProductMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder + description?: Prisma.SortOrder +} + +export type ProductSumOrderByAggregateInput = { + id?: Prisma.SortOrder + price?: Prisma.SortOrder + quantity?: Prisma.SortOrder +} + +export type ProductCreateNestedManyWithoutOrdersInput = { + create?: Prisma.XOR | Prisma.ProductCreateWithoutOrdersInput[] | Prisma.ProductUncheckedCreateWithoutOrdersInput[] + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrdersInput | Prisma.ProductCreateOrConnectWithoutOrdersInput[] + connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] +} + +export type ProductUncheckedCreateNestedManyWithoutOrdersInput = { + create?: Prisma.XOR | Prisma.ProductCreateWithoutOrdersInput[] | Prisma.ProductUncheckedCreateWithoutOrdersInput[] + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrdersInput | Prisma.ProductCreateOrConnectWithoutOrdersInput[] + connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] +} + +export type ProductUpdateManyWithoutOrdersNestedInput = { + create?: Prisma.XOR | Prisma.ProductCreateWithoutOrdersInput[] | Prisma.ProductUncheckedCreateWithoutOrdersInput[] + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrdersInput | Prisma.ProductCreateOrConnectWithoutOrdersInput[] + upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutOrdersInput | Prisma.ProductUpsertWithWhereUniqueWithoutOrdersInput[] + set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + update?: Prisma.ProductUpdateWithWhereUniqueWithoutOrdersInput | Prisma.ProductUpdateWithWhereUniqueWithoutOrdersInput[] + updateMany?: Prisma.ProductUpdateManyWithWhereWithoutOrdersInput | Prisma.ProductUpdateManyWithWhereWithoutOrdersInput[] + deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] +} + +export type ProductUncheckedUpdateManyWithoutOrdersNestedInput = { + create?: Prisma.XOR | Prisma.ProductCreateWithoutOrdersInput[] | Prisma.ProductUncheckedCreateWithoutOrdersInput[] + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrdersInput | Prisma.ProductCreateOrConnectWithoutOrdersInput[] + upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutOrdersInput | Prisma.ProductUpsertWithWhereUniqueWithoutOrdersInput[] + set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] + update?: Prisma.ProductUpdateWithWhereUniqueWithoutOrdersInput | Prisma.ProductUpdateWithWhereUniqueWithoutOrdersInput[] + updateMany?: Prisma.ProductUpdateManyWithWhereWithoutOrdersInput | Prisma.ProductUpdateManyWithWhereWithoutOrdersInput[] + deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] +} + +export type ProductCreateWithoutOrdersInput = { + name: string + price: number + quantity: number + description?: string | null +} + +export type ProductUncheckedCreateWithoutOrdersInput = { + id?: number + name: string + price: number + quantity: number + description?: string | null +} + +export type ProductCreateOrConnectWithoutOrdersInput = { + where: Prisma.ProductWhereUniqueInput + create: Prisma.XOR +} + +export type ProductUpsertWithWhereUniqueWithoutOrdersInput = { + where: Prisma.ProductWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type ProductUpdateWithWhereUniqueWithoutOrdersInput = { + where: Prisma.ProductWhereUniqueInput + data: Prisma.XOR +} + +export type ProductUpdateManyWithWhereWithoutOrdersInput = { + where: Prisma.ProductScalarWhereInput + data: Prisma.XOR +} + +export type ProductScalarWhereInput = { + AND?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] + OR?: Prisma.ProductScalarWhereInput[] + NOT?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] + id?: Prisma.IntFilter<"Product"> | number + name?: Prisma.StringFilter<"Product"> | string + price?: Prisma.FloatFilter<"Product"> | number + quantity?: Prisma.IntFilter<"Product"> | number + description?: Prisma.StringNullableFilter<"Product"> | string | null +} + +export type ProductUpdateWithoutOrdersInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type ProductUncheckedUpdateWithoutOrdersInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type ProductUncheckedUpdateManyWithoutOrdersInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.FloatFieldUpdateOperationsInput | number + quantity?: Prisma.IntFieldUpdateOperationsInput | number + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + + +/** + * Count Type ProductCountOutputType + */ + +export type ProductCountOutputType = { + orders: number +} + +export type ProductCountOutputTypeSelect = { + orders?: boolean | ProductCountOutputTypeCountOrdersArgs +} + +/** + * ProductCountOutputType without action + */ +export type ProductCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ProductCountOutputType + */ + select?: Prisma.ProductCountOutputTypeSelect | null +} + +/** + * ProductCountOutputType without action + */ +export type ProductCountOutputTypeCountOrdersArgs = { + where?: Prisma.OrderWhereInput +} + + +export type ProductSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + price?: boolean + quantity?: boolean + description?: boolean + orders?: boolean | Prisma.Product$ordersArgs + _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs +}, ExtArgs["result"]["product"]> + +export type ProductSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + price?: boolean + quantity?: boolean + description?: boolean +}, ExtArgs["result"]["product"]> + +export type ProductSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + price?: boolean + quantity?: boolean + description?: boolean +}, ExtArgs["result"]["product"]> + +export type ProductSelectScalar = { + id?: boolean + name?: boolean + price?: boolean + quantity?: boolean + description?: boolean +} + +export type ProductOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "price" | "quantity" | "description", ExtArgs["result"]["product"]> +export type ProductInclude = { + orders?: boolean | Prisma.Product$ordersArgs + _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs +} +export type ProductIncludeCreateManyAndReturn = {} +export type ProductIncludeUpdateManyAndReturn = {} + +export type $ProductPayload = { + name: "Product" + objects: { + orders: Prisma.$OrderPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + price: number + quantity: number + description: string | null + }, ExtArgs["result"]["product"]> + composites: {} +} + +export type ProductGetPayload = runtime.Types.Result.GetResult + +export type ProductCountArgs = + Omit & { + select?: ProductCountAggregateInputType | true + } + +export interface ProductDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Product'], meta: { name: 'Product' } } + /** + * Find zero or one Product that matches the filter. + * @param {ProductFindUniqueArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Product that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Product that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindFirstArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Product that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindFirstOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Products that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Products + * const products = await prisma.product.findMany() + * + * // Get first 10 Products + * const products = await prisma.product.findMany({ take: 10 }) + * + * // Only select the `id` + * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Product. + * @param {ProductCreateArgs} args - Arguments to create a Product. + * @example + * // Create one Product + * const Product = await prisma.product.create({ + * data: { + * // ... data to create a Product + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Products. + * @param {ProductCreateManyArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Products and returns the data saved in the database. + * @param {ProductCreateManyAndReturnArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Products and only return the `id` + * const productWithIdOnly = await prisma.product.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Product. + * @param {ProductDeleteArgs} args - Arguments to delete one Product. + * @example + * // Delete one Product + * const Product = await prisma.product.delete({ + * where: { + * // ... filter to delete one Product + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Product. + * @param {ProductUpdateArgs} args - Arguments to update one Product. + * @example + * // Update one Product + * const product = await prisma.product.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Products. + * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete. + * @example + * // Delete a few Products + * const { count } = await prisma.product.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Products + * const product = await prisma.product.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Products and returns the data updated in the database. + * @param {ProductUpdateManyAndReturnArgs} args - Arguments to update many Products. + * @example + * // Update many Products + * const product = await prisma.product.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Products and only return the `id` + * const productWithIdOnly = await prisma.product.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Product. + * @param {ProductUpsertArgs} args - Arguments to update or create a Product. + * @example + * // Update or create a Product + * const product = await prisma.product.upsert({ + * create: { + * // ... data to create a Product + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Product we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductCountArgs} args - Arguments to filter Products to count. + * @example + * // Count the number of Products + * const count = await prisma.product.count({ + * where: { + * // ... the filter for the Products we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ProductGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ProductGroupByArgs['orderBy'] } + : { orderBy?: ProductGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Product model + */ +readonly fields: ProductFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Product. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__ProductClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + orders = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Product model + */ +export interface ProductFieldRefs { + readonly id: Prisma.FieldRef<"Product", 'Int'> + readonly name: Prisma.FieldRef<"Product", 'String'> + readonly price: Prisma.FieldRef<"Product", 'Float'> + readonly quantity: Prisma.FieldRef<"Product", 'Int'> + readonly description: Prisma.FieldRef<"Product", 'String'> +} + + +// Custom InputTypes +/** + * Product findUnique + */ +export type ProductFindUniqueArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: Prisma.ProductWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product findUniqueOrThrow + */ +export type ProductFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: Prisma.ProductWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product findFirst + */ +export type ProductFindFirstArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product findFirstOrThrow + */ +export type ProductFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product findMany + */ +export type ProductFindManyArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Products to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product create + */ +export type ProductCreateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The data needed to create a Product. + */ + data: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product createMany + */ +export type ProductCreateManyArgs = { + /** + * The data used to create many Products. + */ + data: Prisma.ProductCreateManyInput | Prisma.ProductCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Product createManyAndReturn + */ +export type ProductCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * The data used to create many Products. + */ + data: Prisma.ProductCreateManyInput | Prisma.ProductCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Product update + */ +export type ProductUpdateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The data needed to update a Product. + */ + data: Prisma.XOR + /** + * Choose, which Product to update. + */ + where: Prisma.ProductWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product updateMany + */ +export type ProductUpdateManyArgs = { + /** + * The data used to update Products. + */ + data: Prisma.XOR + /** + * Filter which Products to update + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to update. + */ + limit?: number +} + +/** + * Product updateManyAndReturn + */ +export type ProductUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * The data used to update Products. + */ + data: Prisma.XOR + /** + * Filter which Products to update + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to update. + */ + limit?: number +} + +/** + * Product upsert + */ +export type ProductUpsertArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The filter to search for the Product to update in case it exists. + */ + where: Prisma.ProductWhereUniqueInput + /** + * In case the Product found by the `where` argument doesn't exist, create a new Product with this data. + */ + create: Prisma.XOR + /** + * In case the Product was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product delete + */ +export type ProductDeleteArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter which Product to delete. + */ + where: Prisma.ProductWhereUniqueInput + relationLoadStrategy?: Prisma.RelationLoadStrategy +} + +/** + * Product deleteMany + */ +export type ProductDeleteManyArgs = { + /** + * Filter which Products to delete + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to delete. + */ + limit?: number +} + +/** + * Product.orders + */ +export type Product$ordersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: Prisma.OrderSelect | null + /** + * Omit specific fields from the Order + */ + omit?: Prisma.OrderOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.OrderInclude | null + where?: Prisma.OrderWhereInput + orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] + cursor?: Prisma.OrderWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] +} + +/** + * Product without action + */ +export type ProductDefaultArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null +} diff --git a/src/prisma/client-pg/package.json b/src/prisma/client-pg/package.json deleted file mode 100644 index 1fe3ccb..0000000 --- a/src/prisma/client-pg/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "prisma-client-921e7267b8033fe5fbc477269bd4bea957a67bc23bb1b316fd63bf103dd8a52c", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.js", - "default": "./wasm.js" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.js", - "default": "./runtime/library.js" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.js", - "default": "./runtime/binary.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./*": "./*" - }, - "version": "5.15.0", - "sideEffects": false -} \ No newline at end of file diff --git a/src/prisma/client-pg/runtime/edge-esm.js b/src/prisma/client-pg/runtime/edge-esm.js deleted file mode 100644 index 9161ffa..0000000 --- a/src/prisma/client-pg/runtime/edge-esm.js +++ /dev/null @@ -1,28 +0,0 @@ -var ia=Object.create;var rr=Object.defineProperty;var oa=Object.getOwnPropertyDescriptor;var sa=Object.getOwnPropertyNames;var aa=Object.getPrototypeOf,ua=Object.prototype.hasOwnProperty;var Pt=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ee=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nr=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},Qn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sa(t))!ua.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=oa(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?ia(aa(e)):{},Qn(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),Gn=e=>Qn(rr({},"__esModule",{value:!0}),e);var y,c=Ee(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Hn,b,p=Ee(()=>{"use strict";b=(Hn=globalThis.performance)!=null?Hn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=Ee(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ee(()=>{"use strict"});var fi=Ae(rt=>{"use strict";d();c();p();f();m();var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),la=Zn(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var O=k===A?0:4-k%4;return[k,O]}function u(C){var A=a(C),k=A[0],O=A[1];return(k+O)*3/4-O}function l(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),O=k[0],B=k[1],M=new n(l(C,O,B)),I=0,Z=B>0?O-4:O,L;for(L=0;L>16&255,M[I++]=A>>8&255,M[I++]=A&255;return B===2&&(A=r[C.charCodeAt(L)]<<2|r[C.charCodeAt(L+1)]>>4,M[I++]=A&255),B===1&&(A=r[C.charCodeAt(L)]<<10|r[C.charCodeAt(L+1)]<<4|r[C.charCodeAt(L+2)]>>2,M[I++]=A>>8&255,M[I++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function x(C,A,k){for(var O,B=[],M=A;MZ?Z:I+M));return O===1?(A=C[k-1],B.push(t[A>>2]+t[A<<4&63]+"==")):O===2&&(A=(C[k-2]<<8)+C[k-1],B.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),B.join("")}}),ca=Zn(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=u;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=S,h-=8);if(s===0)s=1-g;else{if(s===l)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+x>=1?r+=S/l:r+=S*Math.pow(2,1-x),r*l>=2&&(a++,l/=2),a+x>=h?(u=0,a=h):a+x>=1?(u=(r*l-1)*Math.pow(2,o),a=a+x):(u=r*Math.pow(2,x-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=u&255,C+=A,u/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Qr=la(),et=ca(),Wn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rt.Buffer=T;rt.SlowBuffer=ha;rt.INSPECT_MAX_BYTES=50;var ir=2147483647;rt.kMaxLength=ir;T.TYPED_ARRAY_SUPPORT=pa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function pa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>ir)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Wr(e)}return Xn(e,t,r)}T.poolSize=8192;function Xn(e,t,r){if(typeof e=="string")return ma(e,t);if(ArrayBuffer.isView(e))return da(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return ti(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ga(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return Xn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ei(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function fa(e,t,r){return ei(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return fa(e,t,r)};function Wr(e){return ei(e),be(e<0?0:Kr(e)|0)}T.allocUnsafe=function(e){return Wr(e)};T.allocUnsafeSlow=function(e){return Wr(e)};function ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ri(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Gr(e){let t=e.length<0?0:Kr(e.length)|0,r=be(t);for(let n=0;n=ir)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ir.toString(16)+" bytes");return e|0}function ha(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ri(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Hr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return pi(e).length;default:if(i)return n?-1:Hr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ri;function ya(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ra(this,t,r);case"utf8":case"utf-8":return ii(this,t,r);case"ascii":return Ca(this,t,r);case"latin1":case"binary":return Aa(this,t,r);case"base64":return va(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sa(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Wn&&(T.prototype[Wn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Yr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Kn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Kn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Kn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return wa(this,e,t,r);case"utf8":case"utf-8":return Ea(this,e,t,r);case"ascii":case"latin1":case"binary":return ba(this,e,t,r);case"base64":return xa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function va(e,t,r){return t===0&&r===e.length?Qr.fromByteArray(e):Qr.fromByteArray(e.slice(t,r))}function ii(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ta(n)}var zn=4096;function Ta(e){let t=e.length;if(t<=zn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),et.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),et.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!1,52,8)};function ie(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function oi(e,t,r,n,i){ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function si(e,t,r,n,i){ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return oi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return si(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return oi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return si(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ai(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ui(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,4,34028234663852886e22,-34028234663852886e22),et.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ui(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ui(this,e,t,!1,r)};function li(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,8,17976931348623157e292,-17976931348623157e292),et.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return li(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return li(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Yn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Yn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Yn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ia(e,t,r){tt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&vt(t,e.length-(r+1))}function ci(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Xe.ERR_OUT_OF_RANGE("value",a,e)}Ia(n,i,o)}function tt(e,t){if(typeof e!="number")throw new Xe.ERR_INVALID_ARG_TYPE(t,"number",e)}function vt(e,t,r){throw Math.floor(e)!==e?(tt(e,r),new Xe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Xe.ERR_BUFFER_OUT_OF_BOUNDS:new Xe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Da=/[^+/0-9A-Za-z-_]/g;function ka(e){if(e=e.split("=")[0],e=e.trim().replace(Da,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Hr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Oa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function pi(e){return Qr.toByteArray(ka(e))}function or(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Yr(e){return e!==e}var Na=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?_a:e}function _a(){throw new Error("BigInt not supported")}});var w,d=Ee(()=>{"use strict";w=Ue(fi())});function Fa(){return!1}var La,Ba,wi,Ei=Ee(()=>{"use strict";d();c();p();f();m();La={},Ba={existsSync:Fa,promises:La},wi=Ba});var ki=Ae((df,Di)=>{"use strict";d();c();p();f();m();Di.exports=(en(),Gn(Xr)).format});var Xr={};nr(Xr,{default:()=>Ua,deprecate:()=>Mi,format:()=>_i,inspect:()=>Ni,promisify:()=>Oi});function Oi(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function Mi(e,t){return(...r)=>(console.warn(t),e(...r))}function Ni(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var _i,qa,Ua,en=Ee(()=>{"use strict";d();c();p();f();m();_i=ki(),qa={promisify:Oi,deprecate:Mi,inspect:Ni,format:_i},Ua=qa});function Ga(...e){return e.join("/")}function Ha(...e){return e.join("/")}var ji,Wa,Ka,Ct,Ji=Ee(()=>{"use strict";d();c();p();f();m();ji="/",Wa={sep:ji},Ka={resolve:Ga,posix:Wa,join:Ha,sep:ji},Ct=Ka});var lr,Gi=Ee(()=>{"use strict";d();c();p();f();m();lr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Ae((bm,Hi)=>{"use strict";d();c();p();f();m();Hi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Ae((Om,zi)=>{"use strict";d();c();p();f();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Xi=Ae((Bm,Zi)=>{"use strict";d();c();p();f();m();var tu=Yi();Zi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var ro=Ae((Nh,su)=>{su.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var no=Ae(()=>{"use strict";d();c();p();f();m()});var Fn=Ae((lR,gs)=>{"use strict";d();c();p();f();m();gs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;smi,getExtensionContext:()=>di});d();c();p();f();m();d();c();p();f();m();function mi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function di(e){return e}var yi={};nr(yi,{validator:()=>hi});d();c();p();f();m();d();c();p();f();m();function hi(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Zr,bi,xi,Pi,vi=!0;typeof y!="undefined"&&({FORCE_COLOR:Zr,NODE_DISABLE_COLORS:bi,NO_COLOR:xi,TERM:Pi}=y.env||{},vi=y.stdout&&y.stdout.isTTY);var $a={enabled:!bi&&xi==null&&Pi!=="dumb"&&(Zr!=null&&Zr!=="0"||vi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!$a.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=V(0,0),sr=V(1,22),ar=V(2,22),Qp=V(3,23),Ti=V(4,24),Gp=V(7,27),Hp=V(8,28),Wp=V(9,29),Kp=V(30,39),nt=V(31,39),Ci=V(32,39),Ai=V(33,39),Ri=V(34,39),zp=V(35,39),Si=V(36,39),Yp=V(37,39),Ii=V(90,39),Zp=V(90,39),Xp=V(40,49),ef=V(41,49),tf=V(42,49),rf=V(43,49),nf=V(44,49),of=V(45,49),sf=V(46,49),af=V(47,49);d();c();p();f();m();var Va=100,Fi=["green","yellow","blue","magenta","cyan","red"],ur=[],Li=Date.now(),ja=0,tn=typeof y!="undefined"?y.env:{},Bi,$i;($i=globalThis.DEBUG)!=null||(globalThis.DEBUG=(Bi=tn.DEBUG)!=null?Bi:"");var qi;(qi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=tn.DEBUG_COLORS?tn.DEBUG_COLORS==="true":!0);var Tt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{var o;let[t,r,...n]=e,i;typeof Pt=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{var a;try{let u=(en(),Gn(Xr));y.stderr.write(u.format(...s)+` -`)}catch(u){i=(a=console.warn)!=null?a:console.log}}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function Ja(e){let t={color:Fi[ja++%Fi.length],enabled:Tt.enabled(e),namespace:e,log:Tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Va&&ur.shift(),Tt.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:Qa(g)),l=`+${Date.now()-Li}ms`;Li=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Ui=new Proxy(Ja,{get:(e,t)=>Tt[t],set:(e,t,r)=>Tt[t]=r});function Qa(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){ur.length=0}var re=Ui;d();c();p();f();m();d();c();p();f();m();var Qi="library";function At(e){let t=za();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Qi)}function za(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var Se;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Se||(Se={}));var it={};nr(it,{error:()=>Xa,info:()=>Za,log:()=>Ya,query:()=>eu,should:()=>Ki,tags:()=>Rt,warn:()=>rn});d();c();p();f();m();var Rt={error:nt("prisma:error"),warn:Ai("prisma:warn"),info:Si("prisma:info"),query:Ri("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ya(...e){console.log(...e)}function rn(e,...t){Ki.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Za(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Xa(e,...t){console.error(`${Rt.error} ${e}`,...t)}function eu(e,...t){console.log(`${Rt.query} ${e}`,...t)}d();c();p();f();m();function je(e,t){throw new Error(t)}d();c();p();f();m();function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var on=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),rn(t,...r))};d();c();p();f();m();var z=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(z,"PrismaClientKnownRequestError");var Ie=class extends z{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};_(Ie,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(G,"PrismaClientInitializationError");d();c();p();f();m();var De=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(De,"PrismaClientRustPanicError");d();c();p();f();m();var ae=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(ae,"PrismaClientUnknownRequestError");d();c();p();f();m();var ee=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(ee,"PrismaClientValidationError");d();c();p();f();m();var St=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function ru(e,t){let r=It(()=>nu(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nu(e){return{datamodel:{models:an(e.models),enums:an(e.enums),types:an(e.types)}}}function an(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var pr=Symbol(),un=new WeakMap,xe=class{constructor(t){t===pr?un.set(this,`Prisma.${this._getName()}`):un.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return un.get(this)}},Dt=class extends xe{_getNamespace(){return"NullTypes"}},kt=class extends Dt{};cn(kt,"DbNull");var Ot=class extends Dt{};cn(Ot,"JsonNull");var Mt=class extends Dt{};cn(Mt,"AnyNull");var ln={classes:{DbNull:kt,JsonNull:Ot,AnyNull:Mt},instances:{DbNull:new kt(pr),JsonNull:new Ot(pr),AnyNull:new Mt(pr)}};function cn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function Nt(e){return{ok:!1,error:e,map(){return Nt(e)},flatMap(){return Nt(e)}}}var pn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},fn=e=>{let t=new pn,r=Je(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Je(t,e.queryRaw.bind(e)),executeRaw:Je(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>iu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ou(t,e.getConnectionInfo.bind(e))),n},iu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Je(e,t.queryRaw.bind(t)),executeRaw:Je(e,t.executeRaw.bind(t)),commit:Je(e,t.commit.bind(t)),rollback:Je(e,t.rollback.bind(t))});function Je(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}function ou(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}var na=Ue(ro());var yk=Ue(no());Gi();Ei();Ji();d();c();p();f();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var fr={enumerable:!0,configurable:!0,writable:!0};function mr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var so=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=lu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=ao(Reflect.ownKeys(o),r),a=ao(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.writable)===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...fr,...u==null?void 0:u.getPropertyDescriptor(s)}:fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[so]=function(){let o={...this};return delete o[so],o},i}function lu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ao(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function st(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function dr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();c();p();f();m();d();c();p();f();m();function uo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function ut(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var lt=9e15,Ne=1e9,mn="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",dn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-lt,maxE:lt,crypto:!1},fo,Pe,F=!0,br="[DecimalError] ",Me=br+"Invalid argument: ",mo=br+"Precision limit exceeded",go=br+"crypto unavailable",ho="[object Decimal]",te=Math.floor,H=Math.pow,cu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,pu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,fu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,yo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,N=7,mu=9007199254740991,du=yr.length-1,gn=wr.length-1,R={toStringTag:ho};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)};R.ceil=function(){return D(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=gu(n,Po(n,r)),n.precision=e,n.rounding=t,D(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(F=!1,o=g.s*H(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=H(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(D(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(D(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return F=!0,D(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/N))*N,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return D(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return D(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=ct(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.times(g))));return D(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=ct(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=ct(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}return o.precision=t,o.rounding=r,D(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,F=!1,r=r.times(r).minus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,F=!1,r=r.times(r).plus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?D(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=gn)return s=ce(g,h+4,x).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=gn)return s=ce(g,h+4,x).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/N+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(F=!1,t=Math.ceil(a/N),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(F=!1,a=h+S,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),Ft(u.d,i=h,x))do if(a+=10,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+Y(u.d).slice(i+1,i+15)+1==1e14&&(u=D(u,h+1,0));break}while(Ft(u.d,i+=10,x));return F=!0,D(u,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,x=e.d,a=C.precision,u=C.rounding,!l[0]||!x[0]){if(x[0])e.s=-e.s;else if(l[0])e=new C(S);else return new C(u===3?-0:0);return F?D(e,a,u):e}if(r=te(e.e/N),g=te(S.e/N),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=x.length):(t=x,r=g,s=l.length),n=Math.max(Math.ceil(a/N),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=x.length,h=n0;--n)l[s++]=0;for(n=x.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=xr(l,n),F?D(e,a,u):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=wo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=yu(n,Po(n,r)),n.precision=e,n.rounding=t,D(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(F=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=Y(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=te((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(D(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(D(n,u+1,1),e=!n.times(n).eq(s));break}return F=!0,D(n,u,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,D(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,l,g=this,h=g.constructor,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/N)+te(e.e/N),u=x.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*x[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),F?D(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return wn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Ne),t===void 0?t=n.rounding:oe(t,0,8),D(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(oe(e,0,Ne),t===void 0?t=i.rounding:oe(t,0,8),n=D(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(oe(e,0,Ne),t===void 0?t=o.rounding:oe(t,0,8),n=D(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(l=r=new A(1),n=u=new A(0),t=new A(n),o=t.e=wo(C)-S.e-1,s=o%N,t.d[0]=H(10,s<0?N+s:s),e==null)e=o>0?t:l;else{if(a=new A(e),!a.isInt()||a.lt(l))throw Error(Me+a);e=a.gt(t)?o>0?t:l:a}for(F=!1,a=new A(Y(C)),g=A.precision,A.precision=o=C.length*N*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,x=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],A.precision=g,F=!0,x};R.toHexadecimal=R.toHex=function(e,t){return wn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(F=!1,r=q(r,e,0,t,1).times(e),F=!0,D(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return wn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return D(a,n,o);if(t=te(e.e/N),t>=e.d.length-1&&(r=l<0?-l:l)<=mu)return i=Eo(u,a,r,n),e.s<0?new u(1).div(i):D(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(F=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=hn(e.times(Oe(a,n+r)),n),i.d&&(i=D(i,n+5,1),Ft(i.d,n,o)&&(t=n+10,i=D(hn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=D(i,n+1,0)))),i.s=s,F=!0,u.rounding=o,D(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Ne),t===void 0?t=i.rounding:oe(t,0,8),n=D(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Ne),t===void 0?t=n.rounding:oe(t,0,8)),D(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return D(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Me+e)}function Ft(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=N,i=0):(i=Math.ceil((t+1)/N),t%=N),o=H(10,N-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==H(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==H(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function gu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=ct(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,u){var l,g,h,x,S,C,A,k,O,B,M,I,Z,L,Ye,Be,fe,$e,Q,Ce,qe=n.constructor,Ze=n.s==i.s?1:-1,X=n.d,U=i.d;if(!X||!X[0]||!U||!U[0])return new qe(!n.s||!i.s||(X?U&&X[0]==U[0]:!U)?NaN:X&&X[0]==0||!U?Ze*0:Ze/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=N,g=te(n.e/S)-te(i.e/S)),Q=U.length,fe=X.length,O=new qe(Ze),B=O.d=[],h=0;U[h]==(X[h]||0);h++);if(U[h]>(X[h]||0)&&g--,o==null?(L=o=qe.precision,s=qe.rounding):a?L=o+(n.e-i.e)+1:L=o,L<0)B.push(1),C=!0;else{if(L=L/S+2|0,h=0,Q==1){for(x=0,U=U[0],L++;(h1&&(U=e(U,x,u),X=e(X,x,u),Q=U.length,fe=X.length),Be=Q,M=X.slice(0,Q),I=M.length;I=u/2&&++$e;do x=0,l=t(U,M,Q,I),l<0?(Z=M[0],Q!=I&&(Z=Z*u+(M[1]||0)),x=Z/$e|0,x>1?(x>=u&&(x=u-1),A=e(U,x,u),k=A.length,I=M.length,l=t(A,M,k,I),l==1&&(x--,r(A,Q=10;x/=10)h++;O.e=h+g*S-1,D(O,a?o+O.e+1:o,s,C)}return O}}();function D(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=N,s=t,g=h[x=0],u=g/H(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/N),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=u=0,i=1,o%=N,s=o-N+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=N,s=o-N+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[x+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[x-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(N-t%N)%N),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=H(10,N-o),h[x]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(x==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[x]+=a,h[x]!=pe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return F&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function xr(e,t){var r=e[0];for(t*=N;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>du)throw F=!0,r&&(e.precision=r),Error(mo);return D(new e(yr),t,1,!0)}function ce(e,t,r){if(t>gn)throw Error(mo);return D(new e(wr),t,r,!0)}function wo(e){var t=e.length-1,r=t*N+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ke(e){for(var t="";e--;)t+="0";return t}function Eo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/N+4);for(F=!1;;){if(r%2&&(o=o.times(t),co(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),co(t.d,s)}return F=!0,o}function lo(e){return e.d[e.d.length-1]&1}function bo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(F=!1,u=C):u=t,a=new x(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new x(1),x.precision=u;;){if(o=D(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),Y(a.d).slice(0,u)===Y(s.d).slice(0,u)){for(i=h;i--;)s=D(s.times(s),u,1);if(t==null)if(l<3&&Ft(s.d,u-n,S,l))x.precision=u+=10,r=o=a=new x(1),g=0,l++;else return D(s,x.precision=C,S,F=!0);else return x.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,x,S=1,C=10,A=e,k=A.d,O=A.constructor,B=O.rounding,M=O.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new O(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(F=!1,g=M):g=t,O.precision=g+=C,r=Y(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Y(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return l=Er(O,g+2,M).times(o+""),A=Oe(new O(n+"."+r.slice(1)),g-C).plus(l),O.precision=M,t==null?D(A,M,B,F=!0):A;for(h=A,u=s=A=q(A.minus(1),A.plus(1),g,1),x=D(A.times(A),g,1),i=3;;){if(s=D(s.times(x),g,1),l=u.plus(q(s,new O(i),g,1)),Y(l.d).slice(0,g)===Y(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(Er(O,g+2,M).times(o+""))),u=q(u,new O(S),g,1),t==null)if(Ft(u.d,g-C,B,a))O.precision=g+=C,l=s=A=q(h.minus(1),h.plus(1),g,1),x=D(A.times(A),g,1),i=a=1;else return D(u,O.precision=M,B,F=!0);else return O.precision=M,u;u=l,i+=2}}function xo(e){return String(e.s*e.s/0)}function yn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%N,r<0&&(n+=N),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),yo.test(t))return yn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(pu.test(t))r=16,t=t.toLowerCase();else if(cu.test(t))r=2;else if(fu.test(t))r=8;else throw Error(Me+t);for(o=t.search(/p/i),o>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Eo(n,new n(r),o,o*2)),l=hr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=xr(l,g),e.d=l,F=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):Ge.pow(2,u))),F=!0,e)}function yu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:ct(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=ct(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function ct(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/N);for(F=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,l++}return F=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function Po(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=lo(r)?n?2:3:n?4:1,t;Pe=lo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function wn(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,Ne),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=xo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),x=new S(1),x.e=g.length-s,x.d=hr(he(x),10,i),x.e=x.d.length),h=hr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,x,r,n,0,i),h=e.d,o=e.e,l=fo),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=hr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function wu(e){return new this(e).abs()}function Eu(e){return new this(e).acos()}function bu(e){return new this(e).acosh()}function xu(e,t){return new this(e).plus(t)}function Pu(e){return new this(e).asin()}function vu(e){return new this(e).asinh()}function Tu(e){return new this(e).atan()}function Cu(e){return new this(e).atanh()}function Au(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Ru(e){return new this(e).cbrt()}function Su(e){return D(e=new this(e),e.e+1,2)}function Iu(e,t,r){return new this(e).clamp(t,r)}function Du(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ne,"rounding",0,8,"toExpNeg",-lt,0,"toExpPos",0,lt,"maxE",0,lt,"minE",-lt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=dn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(go);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function ku(e){return new this(e).cos()}function Ou(e){return new this(e).cosh()}function vo(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,po(o)){l.s=o.s,F?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;F?s>i.maxE?(l.e=NaN,l.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(go);else for(;o=10;i/=10)n++;n`}};function ft(e){return e instanceof Lt}d();c();p();f();m();d();c();p();f();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},To={bold:sr,red:nt,green:Ci,dim:ar,enabled:!0},mt={write(e){e.writeLine(",")}};d();c();p();f();m();var ye=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();c();p();f();m();var _e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var dt=class extends _e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ye("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(mt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};d();c();p();f();m();var Co=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Co.length}write(t){let r=new ye(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Co).write(this.value)}};d();c();p();f();m();var Rr=class e extends _e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof dt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){var i,o;let r=(i=this.getField("select"))==null?void 0:i.value.asObject();if(r)return{kind:"select",value:r};let n=(o=this.getField("include"))==null?void 0:o.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ye("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(mt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var K=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ye(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var En=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Sr(e){return new En(Ao(e))}function Ao(e){let t=new Rr;for(let[r,n]of Object.entries(e)){let i=new Ar(r,Ro(n));t.addField(i)}return t}function Ro(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(pt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof xe?new K(`Prisma.${e._getName()}`):ft(e)?new K(`prisma.${uo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?il(e):typeof e=="object"?Ao(e):new K(Object.prototype.toString.call(e))}function il(e){let t=new dt;for(let r of e)t.addItem(Ro(r));return t}function So(e){if(e===void 0)return"";let t=Sr(e);return new at(0,{colors:Cr}).write(t).toString()}d();c();p();f();m();var ol="P2037";function Bt({error:e,user_facing_error:t},r,n){return t.error_code?new z(sl(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function sl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ol&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var bn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new bn}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Io={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function gt(e={}){let t=ul(e);return Object.entries(t).reduce((n,[i,o])=>(Io[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ul(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Do(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:gt})(e)}d();c();p();f();m();function ll(e={}){let{select:t,...r}=e;return typeof t=="object"?gt({...r,_count:t}):gt({...r,_count:{_all:!0}})}function cl(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function ko(e,t){return t({action:"count",unpacker:cl(e),argsMapper:ll})(e)}d();c();p();f();m();function pl(e={}){let t=gt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function fl(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Oo(e,t){return t({action:"groupBy",unpacker:fl(e),argsMapper:pl})(e)}function Mo(e,t,r){if(t==="aggregate")return n=>Do(n,r);if(t==="count")return n=>ko(n,r);if(t==="groupBy")return n=>Oo(n,r)}d();c();p();f();m();function No(e,t){let r=t.fields.filter(i=>!i.relationName),n=on(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Lt(e,o,s.type,s.isList,s.kind==="enum")},...mr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var _o=e=>Array.isArray(e)?e:e.split("."),xn=(e,t)=>_o(t).reduce((r,n)=>r&&r[n],e),Fo=(e,t,r)=>_o(t).reduceRight((n,i,o,s)=>Object.assign({},xn(e,s.slice(0,o)),{[i]:n}),r);function ml(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function dl(e,t,r){return t===void 0?e!=null?e:{}:Fo(t,r,e||!0)}function Pn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=ml(n,i),h=dl(u,o,g),x=r({dataPath:g,callsite:l})(h),S=gl(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let O=[a[A].type,r,A],B=[g,h];return Pn(e,...O,...B)},...mr([...S,...Object.getOwnPropertyNames(x)])})}}function gl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var hl=Ue(Wi());var yl={red:nt,gray:Ii,dim:ar,bold:sr,underline:Ti,highlightSource:e=>e.highlight()},wl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function El({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function bl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(xl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function xl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ht(e){let t=e.showColors?yl:wl,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=El(e),bl(r,t)}function Lo(e,t,r,n){return e===Se.ModelAction.findFirstOrThrow||e===Se.ModelAction.findUniqueOrThrow?Pl(t,r,n):n}function Pl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ht({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new ee(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof z&&o.code==="P2025"?new Ie(`No ${e} found`,t):o})}}d();c();p();f();m();function we(e){return e.replace(/^./,t=>t.toLowerCase())}var vl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Tl=["aggregate","count","groupBy"];function vn(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Cl(e,t),Rl(e,t),_t(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Cl(e,t){let r=we(t),n=Object.keys(Se.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=Lo(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...u})})};return vl.includes(o)?Pn(e,t,a):Al(i)?Mo(e,i,a):a({})}}}function Al(e){return Tl.includes(e)}function Rl(e,t){return Qe(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return No(t,r)}))}d();c();p();f();m();function Bo(e){return e.replace(/^./,t=>t.toUpperCase())}var Tn=Symbol();function $t(e){let t=[Sl(e),ne(Tn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(_t(r)),ge(e,t)}function Sl(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(we),n=[...new Set(t.concat(r))];return Qe({getKeys(){return n},getPropertyValue(i){let o=Bo(i);if(e._runtimeDataModel.models[o]!==void 0)return vn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return vn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function $o(e){return e[Tn]?e[Tn]:e}function qo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return $t(t)}d();c();p();f();m();d();c();p();f();m();function Uo({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let l=u.needs.filter(g=>n[g]);l.length>0&&a.push(st(l))}else if(r){if(!r[u.name])continue;let l=u.needs.filter(g=>!r[g]);l.length>0&&a.push(st(l))}Il(e,u.needs)&&s.push(Dl(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function Il(e,t){return t.every(r=>nn(e,r))}function Dl(e,t){return Qe(ne(e.name,()=>e.compute(t)))}d();c();p();f();m();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function jo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>Uo({result:s,modelName:we(a),select:u.select,omit:u.omit,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Jo(e){if(e instanceof ue)return kl(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Jo((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=zo(o,g),l.args=u,Go(e,l,r,n+1)}})})}function Ho(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",o);return Go(e,t,s)}function Wo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ko(r,n,0,e):e(r)}}function Ko(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=zo(i,u),Ko(a,t,r+1,n)}})}var Qo=e=>e;function zo(e=Qo,t=Qo){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function Zo(e,t,r){let n=we(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ol({...e,...Yo(t.name,e,t.result.$allModels),...Yo(t.name,e,t.result[n])})}function Ol(e){let t=new de,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Yo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ml(t,o,i)})):{}}function Ml(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function Xo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function es(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=It(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=It(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Zo((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=we(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var ts=re("prisma:client"),rs={Vercel:"vercel","Netlify CI":"netlify"};function ns({postinstall:e,ciName:t,clientVersion:r}){if(ts("checkPlatformCaching:postinstall",e),ts("checkPlatformCaching:ciName",t),e===!0&&t&&t in rs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${rs[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function is(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Nl="Cloudflare-Workers",_l="node";function os(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Nl?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===_l?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Fl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Cn(){let e=os();return{id:e,prettyName:Fl[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Cn().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Mr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Mr{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var wt=class extends se{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(wt,"ForcedRetryError");d();c();p();f();m();var He=class extends se{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(He,"InvalidDatasourceError");d();c();p();f();m();var We=class extends se{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(We,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ke=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(Ke,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var An="This request could not be understood by the server",Ut=class extends j{constructor(r,n,i){super(n||An,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Ut,"BadRequestError");d();c();p();f();m();var Vt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Vt,"HealthcheckTimeoutError");d();c();p();f();m();var jt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(jt,"EngineStartupError");d();c();p();f();m();var Jt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Jt,"EngineVersionNotSupportedError");d();c();p();f();m();var Rn="Request timed out",Qt=class extends j{constructor(r,n=Rn){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Qt,"GatewayTimeoutError");d();c();p();f();m();var Ll="Interactive transaction error",Gt=class extends j{constructor(r,n=Ll){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Gt,"InteractiveTransactionError");d();c();p();f();m();var Bl="Request parameters are invalid",Ht=class extends j{constructor(r,n=Bl){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Ht,"InvalidRequestError");d();c();p();f();m();var Sn="Requested resource does not exist",Wt=class extends j{constructor(r,n=Sn){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Wt,"NotFoundError");d();c();p();f();m();var In="Unknown server error",Et=class extends j{constructor(r,n,i){super(n||In,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(Et,"ServerError");d();c();p();f();m();var Dn="Unauthorized, check your connection string",Kt=class extends j{constructor(r,n=Dn){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Kt,"UnauthorizedError");d();c();p();f();m();var kn="Usage exceeded, retry again later",zt=class extends j{constructor(r,n=kn){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(zt,"UsageExceededError");async function $l(e){let t;try{t=await e.text()}catch(r){return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Yt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await $l(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Et(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ke(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Jt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Vt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Gt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Kt(r,bt(Dn,n));if(e.status===404)return new Wt(r,bt(Sn,n));if(e.status===429)throw new zt(r,bt(kn,n));if(e.status===504)throw new Qt(r,bt(Rn,n));if(e.status>=500)throw new Et(r,bt(In,n));if(e.status>=400)throw new Ut(r,bt(An,n))}function bt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();m();function ss(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();c();p();f();m();var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function as(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Te[s]+Te[a]+Te[u]+Te[l];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Te[s]+Te[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,u=(g&15)<<2,r+=Te[s]+Te[a]+Te[u]+"="),r}d();c();p();f();m();function us(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();c();p();f();m();function ql(e){return e[0]*1e3+e[1]/1e6}function ls(e){return new Date(ql(e))}d();c();p();f();m();var cs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var Zt=class extends se{constructor(r,n){super(`Cannot fetch data from service: -${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};_(Zt,"RequestError");async function ze(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(On)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new Zt(s,{clientVersion:n})}}function Vl(e){return{...e.headers,"Content-Type":"application/json"}}function jl(e){return{method:e.method,headers:Vl(e)}}function Jl(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Mn(t.headers)}}async function On(e,t={}){let r=Ql("https"),n=jl(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:x}}=g;h>=301&&h<=399&&x&&(x.startsWith("http")===!1?s(On(`${o}${x}`,t)):s(On(x,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(Jl(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Ql=typeof Pt!="undefined"?Pt:()=>{},Mn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Gl=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ps=re("prisma:client:dataproxyEngine");async function Hl(e,t){var s,a,u;let r=cs["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Gl.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,x]=l.split("."),S=Wl(`<=${g}.${h}.${x}`),C=await ze(S,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let A=await C.text();ps("length of body fetched from unpkg.com",A.length);let k;try{k=JSON.parse(A)}catch(O){throw console.error("JSON.parse error: body fetched from unpkg.com: ",A),O}return k.version}throw new We("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function fs(e,t){let r=await Hl(e,t);return ps("version",r),r}function Wl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var ms=3,Nn=re("prisma:client:dataproxyEngine"),_n=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Xt=class{constructor(t){this.name="DataProxyEngine";us(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=as(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new _n({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await fs(t,this.config),Nn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:ls(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ze(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Nn("schema response status",r.status);let n=await Yt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=(n==null?void 0:n.kind)==="itx"?n.options:void 0,s=dr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?Bt(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Nn("graphql response status",a.status),await this.handleError(await Yt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?Bt(u.errors[0],this.config.clientVersion,this.config.activeProvider):new ae(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let u=await ze(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Yt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,x=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:x}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Yt(a,this.clientVersion));let l=(await a.json()).extensions;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=yt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new He(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new We("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof se)||!o.isRetryable)throw o;if(n>=ms)throw o instanceof wt?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${ms} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await ss(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ke)throw await this.uploadSchema(),new wt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function ds({copyEngine:e=!0},t){let r;try{r=yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&cr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=At(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new ee(u.join(` -`),{clientVersion:t.clientVersion})}if(i)return new Xt(t);throw new ee("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function Nr({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var bs=Ue(Fn());d();c();p();f();m();function ws(e,t){let r=Es(e),n=Kl(r),i=Yl(n);i?_r(i,t):t.addErrorMessage(()=>"Unknown error")}function Es(e){return e.errors.flatMap(t=>t.kind==="Union"?Es(t):[t])}function Kl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:zl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function zl(e,t){return[...new Set(e.concat(t))]}function Yl(e){return sn(e,(t,r)=>{let n=hs(t),i=hs(r);return n!==i?n-i:ys(t)-ys(r)})}function hs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ys(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();c();p();f();m();var Fr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(mt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function _r(e,t){switch(e.kind){case"MutuallyExclusiveFields":Zl(e,t);break;case"IncludeOnScalar":Xl(e,t);break;case"EmptySelection":ec(e,t);break;case"UnknownSelectionField":nc(e,t);break;case"UnknownArgument":ic(e,t);break;case"UnknownInputField":oc(e,t);break;case"RequiredArgumentMissing":sc(e,t);break;case"InvalidArgumentType":ac(e,t);break;case"InvalidArgumentValue":uc(e,t);break;case"ValueTooLarge":lc(e,t);break;case"SomeFieldsMissing":cc(e,t);break;case"TooManyFieldsGiven":pc(e,t);break;case"Union":ws(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function Zl(e,t){var n,i,o;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();r&&((i=r.getField(e.firstField))==null||i.markAsError(),(o=r.getField(e.secondField))==null||o.markAsError()),t.addErrorMessage(s=>`Please ${s.bold("either")} use ${s.green(`\`${e.firstField}\``)} or ${s.green(`\`${e.secondField}\``)}, but ${s.red("not both")} at the same time.`)}function Xl(e,t){var s,a;let[r,n]=Lr(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new le(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${er(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function ec(e,t){var n,i;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();if(r){let o=(i=r.getField("omit"))==null?void 0:i.value.asObject();if(o){tc(e,t,o);return}}rc(e,t)}function tc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function rc(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),vs(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${er(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function nc(e,t){var s,a,u,l,g,h,x;let[r,n]=Lr(e.selectionPath),i=(s=t.arguments.getDeepSubSelectionValue(r))==null?void 0:s.asObject(),o;if(i){let S=(a=i.getFieldValue("select"))==null?void 0:a.asObject(),C=(u=i.getFieldValue("include"))==null?void 0:u.asObject(),A=(l=i.getFieldValue("omit"))==null?void 0:l.asObject();S!=null&&S.hasField(n)?(o="select",(g=S.getField(n))==null||g.markAsError(),vs(S,e.outputType)):C!=null&&C.hasField(n)?(o="include",(h=C.getField(n))==null||h.markAsError(),fc(C,e.outputType)):A!=null&&A.hasField(n)&&(o="omit",(x=A.getField(n))==null||x.markAsError(),mc(A,e.outputType))}t.addErrorMessage(S=>{let C=[`Unknown field ${S.red(`\`${n}\``)}`];return o&&C.push(`for ${S.bold(o)} statement`),C.push(`on model ${S.bold(`\`${e.outputType.name}\``)}.`),C.push(er(S)),C.join(" ")})}function ic(e,t){var i,o;let r=e.argumentPath[0],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getField(r))==null||o.markAsError(),dc(n,e.arguments)),t.addErrorMessage(s=>xs(s,r,e.arguments.map(a=>a.name)))}function oc(e,t){var o,s,a;let[r,n]=Lr(e.argumentPath),i=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject();if(i){(s=i.getDeepField(e.argumentPath))==null||s.markAsError();let u=(a=i.getDeepFieldValue(r))==null?void 0:a.asObject();u&&Ts(u,e.inputType)}t.addErrorMessage(u=>xs(u,n,e.inputType.fields.map(l=>l.name)))}function xs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=hc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(er(e)),n.join(" ")}function sc(e,t){var u,l;let r;t.addErrorMessage(g=>(r==null?void 0:r.value)instanceof K&&r.value.text==="null"?`Argument \`${g.green(o)}\` must not be ${g.red("null")}.`:`Argument \`${g.green(o)}\` is missing.`);let n=(u=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:u.asObject();if(!n)return;let[i,o]=Lr(e.argumentPath),s=new Fr,a=(l=n.getDeepFieldValue(i))==null?void 0:l.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let g of e.inputTypes[0].fields)s.addField(g.name,g.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let g=e.inputTypes.map(Ps).join(" | ");a.addSuggestion(new le(o,g).makeRequired())}}function Ps(e){return e.kind==="list"?`${Ps(e.elementType)}[]`:e.name}function ac(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=Br("or",e.argument.typeNames.map(u=>s.green(u)));return`Argument \`${s.bold(r)}\`: Invalid value provided. Expected ${a}, provided ${s.red(e.inferredType)}.`})}function uc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=[`Invalid value for argument \`${s.bold(r)}\``];if(e.underlyingError&&a.push(`: ${e.underlyingError}`),a.push("."),e.argument.typeNames.length>0){let u=Br("or",e.argument.typeNames.map(l=>s.green(l)));a.push(` Expected ${u}.`)}return a.join("")})}function lc(e,t){var o;let r=e.argument.name,n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath),a=s==null?void 0:s.value;a==null||a.markAsError(),a instanceof K&&(i=a.text)}t.addErrorMessage(s=>{let a=["Unable to fit value"];return i&&a.push(s.red(i)),a.push(`into a 64-bit signed integer for field \`${s.bold(r)}\``),a.join(" ")})}function cc(e,t){var i,o;let r=e.argumentPath[e.argumentPath.length-1],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();if(n){let s=(o=n.getDeepFieldValue(e.argumentPath))==null?void 0:o.asObject();s&&Ts(s,e.inputType)}t.addErrorMessage(s=>{let a=[`Argument \`${s.bold(r)}\` of type ${s.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?a.push(`${s.green("at least one of")} ${Br("or",e.constraints.requiredFields.map(u=>`\`${s.bold(u)}\``))} arguments.`):a.push(`${s.green("at least one")} argument.`):a.push(`${s.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),a.push(er(s)),a.join(" ")})}function pc(e,t){var o,s;let r=e.argumentPath[e.argumentPath.length-1],n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i=[];if(n){let a=(s=n.getDeepFieldValue(e.argumentPath))==null?void 0:s.asObject();a&&(a.markAsError(),i=Object.keys(a.getFields()))}t.addErrorMessage(a=>{let u=[`Argument \`${a.bold(r)}\` of type ${a.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?u.push(`${a.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?u.push(`${a.green("at most one")} argument,`):u.push(`${a.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),u.push(`but you provided ${Br("and",i.map(l=>a.red(l)))}. Please choose`),e.constraints.maxFieldCount===1?u.push("one."):u.push(`${e.constraints.maxFieldCount}.`),u.join(" ")})}function vs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function fc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function mc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function dc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ts(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Lr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function er({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Br(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var gc=3;function hc(e,t){let r=1/0,n;for(let i of t){let o=(0,bs.default)(e,i);o>gc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Ss=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var Is=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function tr(e){try{return Ds(e,"fast")}catch(t){return Ds(e,"slow")}}function Ds(e,t){return JSON.stringify(e.map(r=>Ac(r,t)))}function Ac(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ut(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Rc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Os(e):e}function Rc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Os(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Os(e)}var Sc=/^(\s*alter\s)/i,Ms=re("prisma:client");function $n(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Sc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Is(r),i={values:tr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Ms(`prisma.${e}(${n}, ${i.values})`):Ms(`prisma.${e}(${n})`),{query:n,parameters:i}},Ns={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},_s={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Un(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=Fs(r(o)):Fs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Fs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var Ls={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Vn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Ls}};function Bs(e){return e.includes("tracing")?new Vn:Ls}d();c();p();f();m();function $s(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var Ic=["$connect","$disconnect","$on","$transaction","$use","$extends"],qs=Ic;d();c();p();f();m();function Us(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();c();p();f();m();var qr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();c();p();f();m();var js=Ue(Xi());d();c();p();f();m();function Ur(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function Vr(e){return e===null?e:Array.isArray(e)?e.map(Vr):typeof e=="object"?Dc(e)?kc(e):ot(e,Vr):e}function Dc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function kc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:je(t,"Unknown tagged value")}}d();c();p();f();m();function Vs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(jn(e.query.arguments)),t.push(jn(e.query.selection)),t.join("")}function jn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${jn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Oc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Jn(e){return Oc[e]}d();c();p();f();m();var jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Jn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Nc(o),containsWrite:l,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?Js(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:Vs(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(Mc(t),_c(t,i)||t instanceof Ie)throw t;if(t instanceof z&&Fc(t)){let u=Qs(t.meta);$r({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=ht({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new z(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new De(a,this.client._clientVersion);if(t instanceof ae)throw new ae(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof De)throw new De(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,js.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=Vr(xn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Nc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Js(e)};je(e,"Unknown transaction kind")}}function Js(e){return{id:e.id,payload:e.payload}}function _c(e,t){return Ur(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function Fc(e){return e.code==="P2009"||e.code==="P2012"}function Qs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Gs="5.15.0";var Hs=Gs;d();c();p();f();m();function Ws(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ks(t[n]);return r})}function Ks({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ve(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ks);default:return t}}d();c();p();f();m();var Xs=Ue(Fn());d();c();p();f();m();var J=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_(J,"PrismaClientConstructorValidationError");var zs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Ys=["pretty","colorless","minimal"],Zs=["info","query","warn","error"],Bc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new J(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nr(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(At()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ys.includes(e)){let t=xt(e,Ys);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Zs.includes(r)){let n=xt(r,Zs);throw new J(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new J(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new J(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new J(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ea(e,t){for(let[r,n]of Object.entries(e)){if(!zs.includes(r)){let i=xt(r,zs);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Bc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=$c(e,t);return r?` Did you mean "${r}"?`:""}function $c(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Xs.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Ur(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Le=re("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Uc=Symbol.for("prisma.client.transaction.id"),Vc={id:0,nextId(){return++this.id}};function jc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new qr;this._createPrismaPromise=Un();this.$extends=qo;var u,l,g,h,x,S,C,A,k,O,B,M,I,Z;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,ns(e),n&&ea(n,e);let i=n!=null&&n.adapter?fn(n.adapter):void 0,o=new lr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=Nr(e),this._clientVersion=(h=e.clientVersion)!=null?h:Hs,this._activeProvider=e.activeProvider,this._tracingHelper=Bs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(x=e.injectableEdgeEnv)==null?void 0:x.call(e);try{let L=n!=null?n:{},Ye=(S=L.__internal)!=null?S:{},Be=Ye.debug===!0;Be&&re.enable("prisma:client");let fe=Ct.resolve(e.dirname,e.relativePath);wi.existsSync(fe)||(fe=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",fe);let $e=Ye.engine||{};if(L.errorFormat?this._errorFormat=L.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:fe,dirname:e.dirname,enableDebugLogs:Be,allowTriggerPanic:$e.allowTriggerPanic,datamodelPath:Ct.join(e.dirname,(C=e.filename)!=null?C:"schema.prisma"),prismaPath:(A=$e.binaryPath)!=null?A:void 0,engineEndpoint:$e.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:L.log&&Us(L.log),logQueries:L.log&&!!(typeof L.log=="string"?L.log==="query":L.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(k=a==null?void 0:a.parsed)!=null?k:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:is(L,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(O=L.transactionOptions)==null?void 0:O.maxWait)!=null?B:2e3,timeout:(I=(M=L.transactionOptions)==null?void 0:M.timeout)!=null?I:5e3,isolationLevel:(Z=L.transactionOptions)==null?void 0:Z.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:yt,getBatchRequestPayload:dr,prismaGraphQLToJSError:Bt,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:G,PrismaClientKnownRequestError:z,debug:re("prisma:client:accelerateEngine"),engineVersion:na.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=ds(e,this._engineConfig),this._requestHandler=new Jr(this,o),L.log)for(let Q of L.log){let Ce=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Ce&&this.$on(Ce,qe=>{var Ze;it.log(`${(Ze=it.tags[Ce])!=null?Ze:""}`,qe.message||qe.query)})}this._metrics=new St(this._engine)}catch(L){throw L.clientVersion=this._clientVersion,L}return this._appliedParent=$t(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ra(n,i);return $n(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>($n(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ss,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Ws)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ra(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Vc.nextId(),s=$s(n.length),a=n.map((u,l)=>{var x,S,C;if((u==null?void 0:u[Symbol.toStringTag])!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=(x=i==null?void 0:i.isolationLevel)!=null?x:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(C=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?C:u});return ta(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let x={kind:"itx",...a};u=await n(this._createItxClient(x)),await this._engine.transaction("commit",o,a)}catch(x){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),x}return u}_createItxClient(n){return $t(ge($o(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Un(n)),ne(Uc,()=>n.id),st(qs)]))}$transaction(n,i){var a;let o;typeof n=="function"?((a=this._engineConfig.adapter)==null?void 0:a.adapterName)==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:qc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,O=>h(g,B=>(O==null||O.end(),u(B))));let{runInTransaction:x,args:S,...C}=g,A={...n,...C};S&&(A.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&x===!1&&delete A.transaction;let k=await Ho(this,A);return A.model?jo({result:k,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:x,customDataProxyFetch:S}){try{n=l?l(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Cs({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return re.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${So(n)})`),Le("Generated request:"),Le(JSON.stringify(A,null,2)+` -`)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:x,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ra(e,t){return Jc(e)?[new ue(e,t),Ns]:[e,_s]}function Jc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var Qc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Gc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();var export_warnEnvConflicts=void 0;export{Ui as Debug,ve as Decimal,gi as Extensions,St as MetricsClient,Ie as NotFoundError,G as PrismaClientInitializationError,z as PrismaClientKnownRequestError,De as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,yi as Public,ue as Sql,ru as defineDmmfProperty,uu as empty,jc as getPrismaClient,Cn as getRuntime,au as join,Gc as makeStrictEnum,ln as objectEnumValues,io as raw,oo as sqltag,export_warnEnvConflicts as warnEnvConflicts,cr as warnOnce}; -//# sourceMappingURL=edge-esm.js.map diff --git a/src/prisma/client-pg/runtime/edge.js b/src/prisma/client-pg/runtime/edge.js deleted file mode 100644 index 15685dd..0000000 --- a/src/prisma/client-pg/runtime/edge.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict";var la=Object.create;var nr=Object.defineProperty;var ca=Object.getOwnPropertyDescriptor;var pa=Object.getOwnPropertyNames;var fa=Object.getPrototypeOf,ma=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)nr(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pa(t))!ma.call(e,i)&&i!==r&&nr(e,i,{get:()=>t[i],enumerable:!(n=ca(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?la(fa(e)):{},zn(t||!e||!e.__esModule?nr(r,"default",{value:e,enumerable:!0}):r,e)),Gr=e=>zn(nr({},"__esModule",{value:!0}),e);var y,c=be(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Yn,b,p=be(()=>{"use strict";b=(Yn=globalThis.performance)!=null?Yn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=be(()=>{"use strict";E=()=>{};E.prototype=E});var m=be(()=>{"use strict"});var hi=Se(rt=>{"use strict";d();c();p();f();m();var ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),da=ri(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var O=k===A?0:4-k%4;return[k,O]}function u(C){var A=a(C),k=A[0],O=A[1];return(k+O)*3/4-O}function l(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),O=k[0],B=k[1],M=new n(l(C,O,B)),I=0,X=B>0?O-4:O,L;for(L=0;L>16&255,M[I++]=A>>8&255,M[I++]=A&255;return B===2&&(A=r[C.charCodeAt(L)]<<2|r[C.charCodeAt(L+1)]>>4,M[I++]=A&255),B===1&&(A=r[C.charCodeAt(L)]<<10|r[C.charCodeAt(L+1)]<<4|r[C.charCodeAt(L+2)]>>2,M[I++]=A>>8&255,M[I++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function x(C,A,k){for(var O,B=[],M=A;MX?X:I+M));return O===1?(A=C[k-1],B.push(t[A>>2]+t[A<<4&63]+"==")):O===2&&(A=(C[k-2]<<8)+C[k-1],B.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),B.join("")}}),ga=ri(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=u;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=S,h-=8);if(s===0)s=1-g;else{if(s===l)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+x>=1?r+=S/l:r+=S*Math.pow(2,1-x),r*l>=2&&(a++,l/=2),a+x>=h?(u=0,a=h):a+x>=1?(u=(r*l-1)*Math.pow(2,o),a=a+x):(u=r*Math.pow(2,x-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=u&255,C+=A,u/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Hr=da(),et=ga(),Zn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rt.Buffer=T;rt.SlowBuffer=xa;rt.INSPECT_MAX_BYTES=50;var ir=2147483647;rt.kMaxLength=ir;T.TYPED_ARRAY_SUPPORT=ha();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ha(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ir)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return zr(e)}return ni(e,t,r)}T.poolSize=8192;function ni(e,t,r){if(typeof e=="string")return wa(e,t);if(ArrayBuffer.isView(e))return Ea(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return oi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ba(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ni(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ii(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ya(e,t,r){return ii(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return ya(e,t,r)};function zr(e){return ii(e),xe(e<0?0:Yr(e)|0)}T.allocUnsafe=function(e){return zr(e)};T.allocUnsafeSlow=function(e){return zr(e)};function wa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=si(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:Yr(e.length)|0,r=xe(t);for(let n=0;n=ir)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ir.toString(16)+" bytes");return e|0}function xa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function si(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return gi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=si;function Pa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return ui(this,t,r);case"ascii":return Da(this,t,r);case"latin1":case"binary":return ka(this,t,r);case"base64":return Sa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Zn&&(T.prototype[Zn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Xr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Xn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Xn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Xn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return va(this,e,t,r);case"utf8":case"utf-8":return Ta(this,e,t,r);case"ascii":case"latin1":case"binary":return Ca(this,e,t,r);case"base64":return Aa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ra(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Sa(e,t,r){return t===0&&r===e.length?Hr.fromByteArray(e):Hr.fromByteArray(e.slice(t,r))}function ui(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ia(n)}var ei=4096;function Ia(e){let t=e.length;if(t<=ei)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),et.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),et.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!1,52,8)};function ie(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function li(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function ci(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ie(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ie(function(e,t=0){return ci(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ie(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ie(function(e,t=0){return ci(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function fi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,4,34028234663852886e22,-34028234663852886e22),et.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return fi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return fi(this,e,t,!1,r)};function mi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,8,17976931348623157e292,-17976931348623157e292),et.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return mi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return mi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ti(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ti(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ti(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Na(e,t,r){tt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function di(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Xe.ERR_OUT_OF_RANGE("value",a,e)}Na(n,i,o)}function tt(e,t){if(typeof e!="number")throw new Xe.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(tt(e,r),new Xe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Xe.ERR_BUFFER_OUT_OF_BOUNDS:new Xe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _a=/[^+/0-9A-Za-z-_]/g;function Fa(e){if(e=e.split("=")[0],e=e.trim().replace(_a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function La(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function gi(e){return Hr.toByteArray(Fa(e))}function or(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Xr(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,d=be(()=>{"use strict";w=Ue(hi())});function Ua(){return!1}var Va,ja,bi,xi=be(()=>{"use strict";d();c();p();f();m();Va={},ja={existsSync:Ua,promises:Va},bi=ja});var Mi=Se((df,Oi)=>{"use strict";d();c();p();f();m();Oi.exports=(on(),Gr(nn)).format});var nn={};vt(nn,{default:()=>Ga,deprecate:()=>_i,format:()=>Li,inspect:()=>Fi,promisify:()=>Ni});function Ni(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function _i(e,t){return(...r)=>(console.warn(t),e(...r))}function Fi(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Li,Qa,Ga,on=be(()=>{"use strict";d();c();p();f();m();Li=Mi(),Qa={promisify:Ni,deprecate:_i,inspect:Fi,format:Li},Ga=Qa});function Ya(...e){return e.join("/")}function Za(...e){return e.join("/")}var Ji,Xa,eu,At,Qi=be(()=>{"use strict";d();c();p();f();m();Ji="/",Xa={sep:Ji},eu={resolve:Ya,posix:Xa,join:Za,sep:Ji},At=eu});var lr,Hi=be(()=>{"use strict";d();c();p();f();m();lr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ki=Se((Em,Wi)=>{"use strict";d();c();p();f();m();Wi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Zi=Se((km,Yi)=>{"use strict";d();c();p();f();m();Yi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var eo=Se((Lm,Xi)=>{"use strict";d();c();p();f();m();var su=Zi();Xi.exports=e=>typeof e=="string"?e.replace(su(),""):e});var io=Se((Mh,cu)=>{cu.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var oo=Se(()=>{"use strict";d();c();p();f();m()});var Un=Se((aR,ys)=>{"use strict";d();c();p();f();m();ys.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;san,Decimal:()=>ye,Extensions:()=>en,MetricsClient:()=>st,NotFoundError:()=>Pe,PrismaClientInitializationError:()=>G,PrismaClientKnownRequestError:()=>K,PrismaClientRustPanicError:()=>ve,PrismaClientUnknownRequestError:()=>oe,PrismaClientValidationError:()=>Y,Public:()=>tn,Sql:()=>se,defineDmmfProperty:()=>no,empty:()=>ao,getPrismaClient:()=>sa,getRuntime:()=>Mr,join:()=>so,makeStrictEnum:()=>aa,objectEnumValues:()=>pr,raw:()=>yn,sqltag:()=>wn,warnEnvConflicts:()=>void 0,warnOnce:()=>It});module.exports=Gr(Hc);d();c();p();f();m();var en={};vt(en,{defineExtension:()=>yi,getExtensionContext:()=>wi});d();c();p();f();m();d();c();p();f();m();function yi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function wi(e){return e}var tn={};vt(tn,{validator:()=>Ei});d();c();p();f();m();d();c();p();f();m();function Ei(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var rn,Pi,vi,Ti,Ci=!0;typeof y!="undefined"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:Pi,NO_COLOR:vi,TERM:Ti}=y.env||{},Ci=y.stdout&&y.stdout.isTTY);var Ja={enabled:!Pi&&vi==null&&Ti!=="dumb"&&(rn!=null&&rn!=="0"||Ci)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=V(0,0),sr=V(1,22),ar=V(2,22),Qp=V(3,23),Ai=V(4,24),Gp=V(7,27),Hp=V(8,28),Wp=V(9,29),Kp=V(30,39),nt=V(31,39),Ri=V(32,39),Si=V(33,39),Ii=V(34,39),zp=V(35,39),Di=V(36,39),Yp=V(37,39),ki=V(90,39),Zp=V(90,39),Xp=V(40,49),ef=V(41,49),tf=V(42,49),rf=V(43,49),nf=V(44,49),of=V(45,49),sf=V(46,49),af=V(47,49);d();c();p();f();m();var Ha=100,Bi=["green","yellow","blue","magenta","cyan","red"],ur=[],$i=Date.now(),Wa=0,sn=typeof y!="undefined"?y.env:{},qi,Ui;(Ui=globalThis.DEBUG)!=null||(globalThis.DEBUG=(qi=sn.DEBUG)!=null?qi:"");var Vi;(Vi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=sn.DEBUG_COLORS?sn.DEBUG_COLORS==="true":!0);var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{var o;let[t,r,...n]=e,i;typeof require=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{var a;try{let u=(on(),Gr(nn));y.stderr.write(u.format(...s)+` -`)}catch(u){i=(a=console.warn)!=null?a:console.log}}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function Ka(e){let t={color:Bi[Wa++%Bi.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Ha&&ur.shift(),Ct.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:za(g)),l=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var an=new Proxy(Ka,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ji(){ur.length=0}var re=an;d();c();p();f();m();d();c();p();f();m();var Gi="library";function Rt(e){let t=tu();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Gi)}function tu(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var De;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(De||(De={}));var it={};vt(it,{error:()=>iu,info:()=>nu,log:()=>ru,query:()=>ou,should:()=>zi,tags:()=>St,warn:()=>un});d();c();p();f();m();var St={error:nt("prisma:error"),warn:Si("prisma:warn"),info:Di("prisma:info"),query:Ii("prisma:query")},zi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ru(...e){console.log(...e)}function un(e,...t){zi.warn()&&console.warn(`${St.warn} ${e}`,...t)}function nu(e,...t){console.info(`${St.info} ${e}`,...t)}function iu(e,...t){console.error(`${St.error} ${e}`,...t)}function ou(e,...t){console.log(`${St.query} ${e}`,...t)}d();c();p();f();m();function je(e,t){throw new Error(t)}d();c();p();f();m();function ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var cn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function pn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{to.has(e)||(to.add(e),un(t,...r))};d();c();p();f();m();var K=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(K,"PrismaClientKnownRequestError");var Pe=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};_(Pe,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(G,"PrismaClientInitializationError");d();c();p();f();m();var ve=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(ve,"PrismaClientRustPanicError");d();c();p();f();m();var oe=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(oe,"PrismaClientUnknownRequestError");d();c();p();f();m();var Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(Y,"PrismaClientValidationError");d();c();p();f();m();var st=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function Dt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function no(e,t){let r=Dt(()=>au(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function au(e){return{datamodel:{models:fn(e.models),enums:fn(e.enums),types:fn(e.types)}}}function fn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var cr=Symbol(),mn=new WeakMap,Te=class{constructor(t){t===cr?mn.set(this,`Prisma.${this._getName()}`):mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return mn.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Ot=class extends kt{};dn(Ot,"DbNull");var Mt=class extends kt{};dn(Mt,"JsonNull");var Nt=class extends kt{};dn(Nt,"AnyNull");var pr={classes:{DbNull:Ot,JsonNull:Mt,AnyNull:Nt},instances:{DbNull:new Ot(cr),JsonNull:new Mt(cr),AnyNull:new Nt(cr)}};function dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function _t(e){return{ok:!1,error:e,map(){return _t(e)},flatMap(){return _t(e)}}}var gn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},hn=e=>{let t=new gn,r=Je(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Je(t,e.queryRaw.bind(e)),executeRaw:Je(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>uu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=lu(t,e.getConnectionInfo.bind(e))),n},uu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Je(e,t.queryRaw.bind(t)),executeRaw:Je(e,t.executeRaw.bind(t)),commit:Je(e,t.commit.bind(t)),rollback:Je(e,t.rollback.bind(t))});function Je(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}function lu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}var oa=Ue(io());var gk=Ue(oo());Hi();xi();Qi();d();c();p();f();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var fr={enumerable:!0,configurable:!0,writable:!0};function mr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var uo=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=pu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=lo(Reflect.ownKeys(o),r),a=lo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.writable)===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...fr,...u==null?void 0:u.getPropertyDescriptor(s)}:fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[uo]=function(){let o={...this};return delete o[uo],o},i}function pu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function lo(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function at(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function dr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var ut=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();c();p();f();m();d();c();p();f();m();function co(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function lt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var ct=9e15,Ne=1e9,En="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",bn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ct,maxE:ct,crypto:!1},go,Ce,F=!0,br="[DecimalError] ",Me=br+"Invalid argument: ",ho=br+"Precision limit exceeded",yo=br+"crypto unavailable",wo="[object Decimal]",te=Math.floor,H=Math.pow,fu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,mu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,du=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,N=7,gu=9007199254740991,hu=yr.length-1,xn=wr.length-1,R={toStringTag:wo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)};R.ceil=function(){return D(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=yu(n,To(n,r)),n.precision=e,n.rounding=t,D(Ce==2||Ce==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(F=!1,o=g.s*H(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=H(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(D(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(D(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return F=!0,D(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/N))*N,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return D(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return D(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=pt(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.times(g))));return D(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=pt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=pt(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}return o.precision=t,o.rounding=r,D(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,F=!1,r=r.times(r).minus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,F=!1,r=r.times(r).plus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?D(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=xn)return s=ce(g,h+4,x).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=xn)return s=ce(g,h+4,x).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/N+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(F=!1,t=Math.ceil(a/N),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(F=!1,a=h+S,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),Lt(u.d,i=h,x))do if(a+=10,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+Z(u.d).slice(i+1,i+15)+1==1e14&&(u=D(u,h+1,0));break}while(Lt(u.d,i+=10,x));return F=!0,D(u,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,x=e.d,a=C.precision,u=C.rounding,!l[0]||!x[0]){if(x[0])e.s=-e.s;else if(l[0])e=new C(S);else return new C(u===3?-0:0);return F?D(e,a,u):e}if(r=te(e.e/N),g=te(S.e/N),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=x.length):(t=x,r=g,s=l.length),n=Math.max(Math.ceil(a/N),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=x.length,h=n0;--n)l[s++]=0;for(n=x.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=xr(l,n),F?D(e,a,u):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=bo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=Eu(n,To(n,r)),n.precision=e,n.rounding=t,D(Ce>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(F=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=Z(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=te((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(D(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(D(n,u+1,1),e=!n.times(n).eq(s));break}return F=!0,D(n,u,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,D(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,l,g=this,h=g.constructor,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/N)+te(e.e/N),u=x.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*x[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),F?D(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Tn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Ne),t===void 0?t=n.rounding:ae(t,0,8),D(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(ae(e,0,Ne),t===void 0?t=i.rounding:ae(t,0,8),n=D(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(ae(e,0,Ne),t===void 0?t=o.rounding:ae(t,0,8),n=D(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(l=r=new A(1),n=u=new A(0),t=new A(n),o=t.e=bo(C)-S.e-1,s=o%N,t.d[0]=H(10,s<0?N+s:s),e==null)e=o>0?t:l;else{if(a=new A(e),!a.isInt()||a.lt(l))throw Error(Me+a);e=a.gt(t)?o>0?t:l:a}for(F=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*N*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,x=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],A.precision=g,F=!0,x};R.toHexadecimal=R.toHex=function(e,t){return Tn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(F=!1,r=q(r,e,0,t,1).times(e),F=!0,D(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Tn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return D(a,n,o);if(t=te(e.e/N),t>=e.d.length-1&&(r=l<0?-l:l)<=gu)return i=xo(u,a,r,n),e.s<0?new u(1).div(i):D(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(F=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Pn(e.times(Oe(a,n+r)),n),i.d&&(i=D(i,n+5,1),Lt(i.d,n,o)&&(t=n+10,i=D(Pn(e.times(Oe(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=D(i,n+1,0)))),i.s=s,F=!0,u.rounding=o,D(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Ne),t===void 0?t=i.rounding:ae(t,0,8),n=D(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Ne),t===void 0?t=n.rounding:ae(t,0,8)),D(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return D(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Me+e)}function Lt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=N,i=0):(i=Math.ceil((t+1)/N),t%=N),o=H(10,N-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==H(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==H(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function yu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=pt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,u){var l,g,h,x,S,C,A,k,O,B,M,I,X,L,Ye,Be,fe,$e,Q,Re,qe=n.constructor,Ze=n.s==i.s?1:-1,ee=n.d,U=i.d;if(!ee||!ee[0]||!U||!U[0])return new qe(!n.s||!i.s||(ee?U&&ee[0]==U[0]:!U)?NaN:ee&&ee[0]==0||!U?Ze*0:Ze/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=N,g=te(n.e/S)-te(i.e/S)),Q=U.length,fe=ee.length,O=new qe(Ze),B=O.d=[],h=0;U[h]==(ee[h]||0);h++);if(U[h]>(ee[h]||0)&&g--,o==null?(L=o=qe.precision,s=qe.rounding):a?L=o+(n.e-i.e)+1:L=o,L<0)B.push(1),C=!0;else{if(L=L/S+2|0,h=0,Q==1){for(x=0,U=U[0],L++;(h1&&(U=e(U,x,u),ee=e(ee,x,u),Q=U.length,fe=ee.length),Be=Q,M=ee.slice(0,Q),I=M.length;I=u/2&&++$e;do x=0,l=t(U,M,Q,I),l<0?(X=M[0],Q!=I&&(X=X*u+(M[1]||0)),x=X/$e|0,x>1?(x>=u&&(x=u-1),A=e(U,x,u),k=A.length,I=M.length,l=t(A,M,k,I),l==1&&(x--,r(A,Q=10;x/=10)h++;O.e=h+g*S-1,D(O,a?o+O.e+1:o,s,C)}return O}}();function D(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=N,s=t,g=h[x=0],u=g/H(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/N),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=u=0,i=1,o%=N,s=o-N+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=N,s=o-N+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[x+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[x-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(N-t%N)%N),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=H(10,N-o),h[x]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(x==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[x]+=a,h[x]!=pe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return F&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function xr(e,t){var r=e[0];for(t*=N;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>hu)throw F=!0,r&&(e.precision=r),Error(ho);return D(new e(yr),t,1,!0)}function ce(e,t,r){if(t>xn)throw Error(ho);return D(new e(wr),t,r,!0)}function bo(e){var t=e.length-1,r=t*N+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ke(e){for(var t="";e--;)t+="0";return t}function xo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/N+4);for(F=!1;;){if(r%2&&(o=o.times(t),fo(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),fo(t.d,s)}return F=!0,o}function po(e){return e.d[e.d.length-1]&1}function Po(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(F=!1,u=C):u=t,a=new x(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new x(1),x.precision=u;;){if(o=D(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),Z(a.d).slice(0,u)===Z(s.d).slice(0,u)){for(i=h;i--;)s=D(s.times(s),u,1);if(t==null)if(l<3&&Lt(s.d,u-n,S,l))x.precision=u+=10,r=o=a=new x(1),g=0,l++;else return D(s,x.precision=C,S,F=!0);else return x.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,x,S=1,C=10,A=e,k=A.d,O=A.constructor,B=O.rounding,M=O.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new O(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(F=!1,g=M):g=t,O.precision=g+=C,r=Z(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return l=Er(O,g+2,M).times(o+""),A=Oe(new O(n+"."+r.slice(1)),g-C).plus(l),O.precision=M,t==null?D(A,M,B,F=!0):A;for(h=A,u=s=A=q(A.minus(1),A.plus(1),g,1),x=D(A.times(A),g,1),i=3;;){if(s=D(s.times(x),g,1),l=u.plus(q(s,new O(i),g,1)),Z(l.d).slice(0,g)===Z(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(Er(O,g+2,M).times(o+""))),u=q(u,new O(S),g,1),t==null)if(Lt(u.d,g-C,B,a))O.precision=g+=C,l=s=A=q(h.minus(1),h.plus(1),g,1),x=D(A.times(A),g,1),i=a=1;else return D(u,O.precision=M,B,F=!0);else return O.precision=M,u;u=l,i+=2}}function vo(e){return String(e.s*e.s/0)}function vn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%N,r<0&&(n+=N),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(mu.test(t))r=16,t=t.toLowerCase();else if(fu.test(t))r=2;else if(du.test(t))r=8;else throw Error(Me+t);for(o=t.search(/p/i),o>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=xo(n,new n(r),o,o*2)),l=hr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=xr(l,g),e.d=l,F=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):Ge.pow(2,u))),F=!0,e)}function Eu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:pt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=pt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function pt(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/N);for(F=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,l++}return F=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ce=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ce=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ce=po(r)?n?2:3:n?4:1,t;Ce=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Tn(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor,C=r!==void 0;if(C?(ae(r,1,Ne),n===void 0?n=S.rounding:ae(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=vo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),x=new S(1),x.e=g.length-s,x.d=hr(he(x),10,i),x.e=x.d.length),h=hr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,x,r,n,0,i),h=e.d,o=e.e,l=go),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=hr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function bu(e){return new this(e).abs()}function xu(e){return new this(e).acos()}function Pu(e){return new this(e).acosh()}function vu(e,t){return new this(e).plus(t)}function Tu(e){return new this(e).asin()}function Cu(e){return new this(e).asinh()}function Au(e){return new this(e).atan()}function Ru(e){return new this(e).atanh()}function Su(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Iu(e){return new this(e).cbrt()}function Du(e){return D(e=new this(e),e.e+1,2)}function ku(e,t,r){return new this(e).clamp(t,r)}function Ou(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ne,"rounding",0,8,"toExpNeg",-ct,0,"toExpPos",0,ct,"maxE",0,ct,"minE",-ct,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=bn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(yo);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function Mu(e){return new this(e).cos()}function Nu(e){return new this(e).cosh()}function Co(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,mo(o)){l.s=o.s,F?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;F?s>i.maxE?(l.e=NaN,l.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(yo);else for(;o=10;i/=10)n++;n`}};function mt(e){return e instanceof Bt}d();c();p();f();m();d();c();p();f();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},Ao={bold:sr,red:nt,green:Ri,dim:ar,enabled:!0},dt={write(e){e.writeLine(",")}};d();c();p();f();m();var we=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();c();p();f();m();var _e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var gt=class extends _e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new we("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(dt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};d();c();p();f();m();var Ro=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ro.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ro).write(this.value)}};d();c();p();f();m();var Rr=class e extends _e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof gt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){var i,o;let r=(i=this.getField("select"))==null?void 0:i.value.asObject();if(r)return{kind:"select",value:r};let n=(o=this.getField("include"))==null?void 0:o.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new we("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(dt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var z=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Cn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Sr(e){return new Cn(So(e))}function So(e){let t=new Rr;for(let[r,n]of Object.entries(e)){let i=new Ar(r,Io(n));t.addField(i)}return t}function Io(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ft(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Te?new z(`Prisma.${e._getName()}`):mt(e)?new z(`prisma.${co(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?sl(e):typeof e=="object"?So(e):new z(Object.prototype.toString.call(e))}function sl(e){let t=new gt;for(let r of e)t.addItem(Io(r));return t}function Do(e){if(e===void 0)return"";let t=Sr(e);return new ut(0,{colors:Cr}).write(t).toString()}d();c();p();f();m();var al="P2037";function $t({error:e,user_facing_error:t},r,n){return t.error_code?new K(ul(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new oe(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ul(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===al&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var An=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new An}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var ko={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=cl(e);return Object.entries(t).reduce((n,[i,o])=>(ko[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function cl(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Oo(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}d();c();p();f();m();function pl(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function fl(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function Mo(e,t){return t({action:"count",unpacker:fl(e),argsMapper:pl})(e)}d();c();p();f();m();function ml(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function dl(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function No(e,t){return t({action:"groupBy",unpacker:dl(e),argsMapper:ml})(e)}function _o(e,t,r){if(t==="aggregate")return n=>Oo(n,r);if(t==="count")return n=>Mo(n,r);if(t==="groupBy")return n=>No(n,r)}d();c();p();f();m();function Fo(e,t){let r=t.fields.filter(i=>!i.relationName),n=cn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Bt(e,o,s.type,s.isList,s.kind==="enum")},...mr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var Lo=e=>Array.isArray(e)?e:e.split("."),Rn=(e,t)=>Lo(t).reduce((r,n)=>r&&r[n],e),Bo=(e,t,r)=>Lo(t).reduceRight((n,i,o,s)=>Object.assign({},Rn(e,s.slice(0,o)),{[i]:n}),r);function gl(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hl(e,t,r){return t===void 0?e!=null?e:{}:Bo(t,r,e||!0)}function Sn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=gl(n,i),h=hl(u,o,g),x=r({dataPath:g,callsite:l})(h),S=yl(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let O=[a[A].type,r,A],B=[g,h];return Sn(e,...O,...B)},...mr([...S,...Object.getOwnPropertyNames(x)])})}}function yl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var wl=Ue(Ki());var El={red:nt,gray:ki,dim:ar,bold:sr,underline:Ai,highlightSource:e=>e.highlight()},bl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function xl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function Pl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(vl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function vl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function yt(e){let t=e.showColors?El:bl,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=xl(e),Pl(r,t)}function $o(e,t,r,n){return e===De.ModelAction.findFirstOrThrow||e===De.ModelAction.findUniqueOrThrow?Tl(t,r,n):n}function Tl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=yt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof K&&o.code==="P2025"?new Pe(`No ${e} found`,t):o})}}d();c();p();f();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}var Cl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Al=["aggregate","count","groupBy"];function In(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Rl(e,t),Il(e,t),Ft(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Rl(e,t){let r=Ee(t),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=$o(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...u})})};return Cl.includes(o)?Sn(e,t,a):Sl(i)?_o(e,i,a):a({})}}}function Sl(e){return Al.includes(e)}function Il(e,t){return Qe(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return Fo(t,r)}))}d();c();p();f();m();function qo(e){return e.replace(/^./,t=>t.toUpperCase())}var Dn=Symbol();function qt(e){let t=[Dl(e),ne(Dn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ft(r)),ge(e,t)}function Dl(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Qe({getKeys(){return n},getPropertyValue(i){let o=qo(i);if(e._runtimeDataModel.models[o]!==void 0)return In(e,o);if(e._runtimeDataModel.models[i]!==void 0)return In(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Uo(e){return e[Dn]?e[Dn]:e}function Vo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return qt(t)}d();c();p();f();m();d();c();p();f();m();function jo({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let l=u.needs.filter(g=>n[g]);l.length>0&&a.push(at(l))}else if(r){if(!r[u.name])continue;let l=u.needs.filter(g=>!r[g]);l.length>0&&a.push(at(l))}kl(e,u.needs)&&s.push(Ol(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function kl(e,t){return t.every(r=>ln(e,r))}function Ol(e,t){return Qe(ne(e.name,()=>e.compute(t)))}d();c();p();f();m();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function Qo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>jo({result:s,modelName:Ee(a),select:u.select,omit:u.omit,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Go(e){if(e instanceof se)return Ml(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Go((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=Zo(o,g),l.args=u,Wo(e,l,r,n+1)}})})}function Ko(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",o);return Wo(e,t,s)}function zo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Yo(r,n,0,e):e(r)}}function Yo(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Zo(i,u),Yo(a,t,r+1,n)}})}var Ho=e=>e;function Zo(e=Ho,t=Ho){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function es(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Nl({...e,...Xo(t.name,e,t.result.$allModels),...Xo(t.name,e,t.result[n])})}function Nl(e){let t=new de,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Xo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:_l(t,o,i)})):{}}function _l(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function ts(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function rs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Dt(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=Dt(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return es((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var ns=re("prisma:client"),is={Vercel:"vercel","Netlify CI":"netlify"};function os({postinstall:e,ciName:t,clientVersion:r}){if(ns("checkPlatformCaching:postinstall",e),ns("checkPlatformCaching:ciName",t),e===!0&&t&&t in is){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${is[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function ss(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Fl="Cloudflare-Workers",Ll="node";function as(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Fl?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Ll?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Bl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Mr(){let e=as();return{id:e,prettyName:Bl[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function wt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Mr().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Nr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ue=class extends Nr{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var Et=class extends ue{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(Et,"ForcedRetryError");d();c();p();f();m();var He=class extends ue{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(He,"InvalidDatasourceError");d();c();p();f();m();var We=class extends ue{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(We,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends ue{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ke=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(Ke,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var kn="This request could not be understood by the server",Vt=class extends j{constructor(r,n,i){super(n||kn,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Vt,"BadRequestError");d();c();p();f();m();var jt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(jt,"HealthcheckTimeoutError");d();c();p();f();m();var Jt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Jt,"EngineStartupError");d();c();p();f();m();var Qt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Qt,"EngineVersionNotSupportedError");d();c();p();f();m();var On="Request timed out",Gt=class extends j{constructor(r,n=On){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Gt,"GatewayTimeoutError");d();c();p();f();m();var $l="Interactive transaction error",Ht=class extends j{constructor(r,n=$l){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Ht,"InteractiveTransactionError");d();c();p();f();m();var ql="Request parameters are invalid",Wt=class extends j{constructor(r,n=ql){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Wt,"InvalidRequestError");d();c();p();f();m();var Mn="Requested resource does not exist",Kt=class extends j{constructor(r,n=Mn){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Kt,"NotFoundError");d();c();p();f();m();var Nn="Unknown server error",bt=class extends j{constructor(r,n,i){super(n||Nn,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(bt,"ServerError");d();c();p();f();m();var _n="Unauthorized, check your connection string",zt=class extends j{constructor(r,n=_n){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(zt,"UnauthorizedError");d();c();p();f();m();var Fn="Usage exceeded, retry again later",Yt=class extends j{constructor(r,n=Fn){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Yt,"UsageExceededError");async function Ul(e){let t;try{t=await e.text()}catch(r){return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Zt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Ul(e);if(n.type==="QueryEngineError")throw new K(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new bt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ke(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new jt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Wt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new zt(r,xt(_n,n));if(e.status===404)return new Kt(r,xt(Mn,n));if(e.status===429)throw new Yt(r,xt(Fn,n));if(e.status===504)throw new Gt(r,xt(On,n));if(e.status>=500)throw new bt(r,xt(Nn,n));if(e.status>=400)throw new Vt(r,xt(kn,n))}function xt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();m();function us(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();c();p();f();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ls(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Ae[s]+Ae[a]+Ae[u]+Ae[l];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,u=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[u]+"="),r}d();c();p();f();m();function cs(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();c();p();f();m();function Vl(e){return e[0]*1e3+e[1]/1e6}function ps(e){return new Date(Vl(e))}d();c();p();f();m();var fs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var Xt=class extends ue{constructor(r,n){super(`Cannot fetch data from service: -${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};_(Xt,"RequestError");async function ze(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Ln)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new Xt(s,{clientVersion:n})}}function Jl(e){return{...e.headers,"Content-Type":"application/json"}}function Ql(e){return{method:e.method,headers:Jl(e)}}function Gl(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Bn(t.headers)}}async function Ln(e,t={}){let r=Hl("https"),n=Ql(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:x}}=g;h>=301&&h<=399&&x&&(x.startsWith("http")===!1?s(Ln(`${o}${x}`,t)):s(Ln(x,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(Gl(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Hl=typeof require!="undefined"?require:()=>{},Bn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Wl=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ms=re("prisma:client:dataproxyEngine");async function Kl(e,t){var s,a,u;let r=fs["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Wl.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,x]=l.split("."),S=zl(`<=${g}.${h}.${x}`),C=await ze(S,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let A=await C.text();ms("length of body fetched from unpkg.com",A.length);let k;try{k=JSON.parse(A)}catch(O){throw console.error("JSON.parse error: body fetched from unpkg.com: ",A),O}return k.version}throw new We("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ds(e,t){let r=await Kl(e,t);return ms("version",r),r}function zl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var gs=3,$n=re("prisma:client:dataproxyEngine"),qn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},er=class{constructor(t){this.name="DataProxyEngine";cs(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=ls(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new qn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ds(t,this.config),$n("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:ps(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ze(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$n("schema response status",r.status);let n=await Zt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=(n==null?void 0:n.kind)==="itx"?n.options:void 0,s=dr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?$t(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Zt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?$t(u.errors[0],this.config.clientVersion,this.config.activeProvider):new oe(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let u=await ze(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Zt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,x=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:x}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Zt(a,this.clientVersion));let l=(await a.json()).extensions;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=wt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new He(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new We("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof ue)||!o.isRetryable)throw o;if(n>=gs)throw o instanceof Et?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${gs} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await us(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ke)throw await this.uploadSchema(),new Et({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function hs({copyEngine:e=!0},t){let r;try{r=wt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&It("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Rt(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new Y(u.join(` -`),{clientVersion:t.clientVersion})}if(i)return new er(t);throw new Y("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function _r({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Ps=Ue(Un());d();c();p();f();m();function bs(e,t){let r=xs(e),n=Yl(r),i=Xl(n);i?Fr(i,t):t.addErrorMessage(()=>"Unknown error")}function xs(e){return e.errors.flatMap(t=>t.kind==="Union"?xs(t):[t])}function Yl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Zl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Zl(e,t){return[...new Set(e.concat(t))]}function Xl(e){return pn(e,(t,r)=>{let n=ws(t),i=ws(r);return n!==i?n-i:Es(t)-Es(r)})}function ws(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Es(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();c();p();f();m();var Lr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(dt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Fr(e,t){switch(e.kind){case"MutuallyExclusiveFields":ec(e,t);break;case"IncludeOnScalar":tc(e,t);break;case"EmptySelection":rc(e,t);break;case"UnknownSelectionField":oc(e,t);break;case"UnknownArgument":sc(e,t);break;case"UnknownInputField":ac(e,t);break;case"RequiredArgumentMissing":uc(e,t);break;case"InvalidArgumentType":lc(e,t);break;case"InvalidArgumentValue":cc(e,t);break;case"ValueTooLarge":pc(e,t);break;case"SomeFieldsMissing":fc(e,t);break;case"TooManyFieldsGiven":mc(e,t);break;case"Union":bs(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function ec(e,t){var n,i,o;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();r&&((i=r.getField(e.firstField))==null||i.markAsError(),(o=r.getField(e.secondField))==null||o.markAsError()),t.addErrorMessage(s=>`Please ${s.bold("either")} use ${s.green(`\`${e.firstField}\``)} or ${s.green(`\`${e.secondField}\``)}, but ${s.red("not both")} at the same time.`)}function tc(e,t){var s,a;let[r,n]=Br(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new le(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${tr(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function rc(e,t){var n,i;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();if(r){let o=(i=r.getField("omit"))==null?void 0:i.value.asObject();if(o){nc(e,t,o);return}}ic(e,t)}function nc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function ic(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),Cs(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${tr(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function oc(e,t){var s,a,u,l,g,h,x;let[r,n]=Br(e.selectionPath),i=(s=t.arguments.getDeepSubSelectionValue(r))==null?void 0:s.asObject(),o;if(i){let S=(a=i.getFieldValue("select"))==null?void 0:a.asObject(),C=(u=i.getFieldValue("include"))==null?void 0:u.asObject(),A=(l=i.getFieldValue("omit"))==null?void 0:l.asObject();S!=null&&S.hasField(n)?(o="select",(g=S.getField(n))==null||g.markAsError(),Cs(S,e.outputType)):C!=null&&C.hasField(n)?(o="include",(h=C.getField(n))==null||h.markAsError(),dc(C,e.outputType)):A!=null&&A.hasField(n)&&(o="omit",(x=A.getField(n))==null||x.markAsError(),gc(A,e.outputType))}t.addErrorMessage(S=>{let C=[`Unknown field ${S.red(`\`${n}\``)}`];return o&&C.push(`for ${S.bold(o)} statement`),C.push(`on model ${S.bold(`\`${e.outputType.name}\``)}.`),C.push(tr(S)),C.join(" ")})}function sc(e,t){var i,o;let r=e.argumentPath[0],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getField(r))==null||o.markAsError(),hc(n,e.arguments)),t.addErrorMessage(s=>vs(s,r,e.arguments.map(a=>a.name)))}function ac(e,t){var o,s,a;let[r,n]=Br(e.argumentPath),i=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject();if(i){(s=i.getDeepField(e.argumentPath))==null||s.markAsError();let u=(a=i.getDeepFieldValue(r))==null?void 0:a.asObject();u&&As(u,e.inputType)}t.addErrorMessage(u=>vs(u,n,e.inputType.fields.map(l=>l.name)))}function vs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=wc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(tr(e)),n.join(" ")}function uc(e,t){var u,l;let r;t.addErrorMessage(g=>(r==null?void 0:r.value)instanceof z&&r.value.text==="null"?`Argument \`${g.green(o)}\` must not be ${g.red("null")}.`:`Argument \`${g.green(o)}\` is missing.`);let n=(u=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:u.asObject();if(!n)return;let[i,o]=Br(e.argumentPath),s=new Lr,a=(l=n.getDeepFieldValue(i))==null?void 0:l.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let g of e.inputTypes[0].fields)s.addField(g.name,g.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let g=e.inputTypes.map(Ts).join(" | ");a.addSuggestion(new le(o,g).makeRequired())}}function Ts(e){return e.kind==="list"?`${Ts(e.elementType)}[]`:e.name}function lc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=$r("or",e.argument.typeNames.map(u=>s.green(u)));return`Argument \`${s.bold(r)}\`: Invalid value provided. Expected ${a}, provided ${s.red(e.inferredType)}.`})}function cc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=[`Invalid value for argument \`${s.bold(r)}\``];if(e.underlyingError&&a.push(`: ${e.underlyingError}`),a.push("."),e.argument.typeNames.length>0){let u=$r("or",e.argument.typeNames.map(l=>s.green(l)));a.push(` Expected ${u}.`)}return a.join("")})}function pc(e,t){var o;let r=e.argument.name,n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath),a=s==null?void 0:s.value;a==null||a.markAsError(),a instanceof z&&(i=a.text)}t.addErrorMessage(s=>{let a=["Unable to fit value"];return i&&a.push(s.red(i)),a.push(`into a 64-bit signed integer for field \`${s.bold(r)}\``),a.join(" ")})}function fc(e,t){var i,o;let r=e.argumentPath[e.argumentPath.length-1],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();if(n){let s=(o=n.getDeepFieldValue(e.argumentPath))==null?void 0:o.asObject();s&&As(s,e.inputType)}t.addErrorMessage(s=>{let a=[`Argument \`${s.bold(r)}\` of type ${s.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?a.push(`${s.green("at least one of")} ${$r("or",e.constraints.requiredFields.map(u=>`\`${s.bold(u)}\``))} arguments.`):a.push(`${s.green("at least one")} argument.`):a.push(`${s.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),a.push(tr(s)),a.join(" ")})}function mc(e,t){var o,s;let r=e.argumentPath[e.argumentPath.length-1],n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i=[];if(n){let a=(s=n.getDeepFieldValue(e.argumentPath))==null?void 0:s.asObject();a&&(a.markAsError(),i=Object.keys(a.getFields()))}t.addErrorMessage(a=>{let u=[`Argument \`${a.bold(r)}\` of type ${a.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?u.push(`${a.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?u.push(`${a.green("at most one")} argument,`):u.push(`${a.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),u.push(`but you provided ${$r("and",i.map(l=>a.red(l)))}. Please choose`),e.constraints.maxFieldCount===1?u.push("one."):u.push(`${e.constraints.maxFieldCount}.`),u.join(" ")})}function Cs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function dc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function gc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function hc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function As(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Br(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function tr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function $r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var yc=3;function wc(e,t){let r=1/0,n;for(let i of t){let o=(0,Ps.default)(e,i);o>yc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Ds=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var ks=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function rr(e){try{return Os(e,"fast")}catch(t){return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Sc(r,t)))}function Sc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:lt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ye.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ic(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ns(e):e}function Ic(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ns(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ms);let t={};for(let r of Object.keys(e))t[r]=Ms(e[r]);return t}function Ms(e){return typeof e=="bigint"?e.toString():Ns(e)}var Dc=/^(\s*alter\s)/i,_s=re("prisma:client");function Jn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Dc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ks(r),i={values:rr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Fs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Ls={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Gn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=Bs(r(o)):Bs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Bs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var $s={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Hn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:$s}};function qs(e){return e.includes("tracing")?new Hn:$s}d();c();p();f();m();function Us(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var kc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Vs=kc;d();c();p();f();m();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();c();p();f();m();var Ur=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();c();p();f();m();var Qs=Ue(eo());d();c();p();f();m();function Vr(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function jr(e){return e===null?e:Array.isArray(e)?e.map(jr):typeof e=="object"?Oc(e)?Mc(e):ot(e,jr):e}function Oc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Mc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ye(t);case"Json":return JSON.parse(t);default:je(t,"Unknown tagged value")}}d();c();p();f();m();function Js(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wn(e.query.arguments)),t.push(Wn(e.query.selection)),t.join("")}function Wn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Nc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Kn(e){return Nc[e]}d();c();p();f();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Kn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Fc(o),containsWrite:l,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?Gs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:Js(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(_c(t),Lc(t,i)||t instanceof Pe)throw t;if(t instanceof K&&Bc(t)){let u=Hs(t.meta);qr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=yt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new K(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ve(a,this.client._clientVersion);if(t instanceof oe)throw new oe(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof ve)throw new ve(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=jr(Rn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Fc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Gs(e)};je(e,"Unknown transaction kind")}}function Gs(e){return{id:e.id,payload:e.payload}}function Lc(e,t){return Vr(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function Bc(e){return e.code==="P2009"||e.code==="P2012"}function Hs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Ws="5.15.0";var Ks=Ws;d();c();p();f();m();function zs(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ys(t[n]);return r})}function Ys({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ye(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ys);default:return t}}d();c();p();f();m();var ta=Ue(Un());d();c();p();f();m();var J=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_(J,"PrismaClientConstructorValidationError");var Zs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Xs=["pretty","colorless","minimal"],ea=["info","query","warn","error"],qc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new J(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!_r(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Rt()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Xs.includes(e)){let t=Pt(e,Xs);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ea.includes(r)){let n=Pt(r,ea);throw new J(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new J(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new J(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new J(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Zs.includes(r)){let i=Pt(r,Zs);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}qc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Uc(e,t);return r?` Did you mean "${r}"?`:""}function Uc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Vr(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Le=re("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jc=Symbol.for("prisma.client.transaction.id"),Jc={id:0,nextId(){return++this.id}};function sa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ur;this._createPrismaPromise=Gn();this.$extends=Vo;var u,l,g,h,x,S,C,A,k,O,B,M,I,X;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,os(e),n&&ra(n,e);let i=n!=null&&n.adapter?hn(n.adapter):void 0,o=new lr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=_r(e),this._clientVersion=(h=e.clientVersion)!=null?h:Ks,this._activeProvider=e.activeProvider,this._tracingHelper=qs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(x=e.injectableEdgeEnv)==null?void 0:x.call(e);try{let L=n!=null?n:{},Ye=(S=L.__internal)!=null?S:{},Be=Ye.debug===!0;Be&&re.enable("prisma:client");let fe=At.resolve(e.dirname,e.relativePath);bi.existsSync(fe)||(fe=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",fe);let $e=Ye.engine||{};if(L.errorFormat?this._errorFormat=L.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:fe,dirname:e.dirname,enableDebugLogs:Be,allowTriggerPanic:$e.allowTriggerPanic,datamodelPath:At.join(e.dirname,(C=e.filename)!=null?C:"schema.prisma"),prismaPath:(A=$e.binaryPath)!=null?A:void 0,engineEndpoint:$e.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:L.log&&js(L.log),logQueries:L.log&&!!(typeof L.log=="string"?L.log==="query":L.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(k=a==null?void 0:a.parsed)!=null?k:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ss(L,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(O=L.transactionOptions)==null?void 0:O.maxWait)!=null?B:2e3,timeout:(I=(M=L.transactionOptions)==null?void 0:M.timeout)!=null?I:5e3,isolationLevel:(X=L.transactionOptions)==null?void 0:X.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:wt,getBatchRequestPayload:dr,prismaGraphQLToJSError:$t,PrismaClientUnknownRequestError:oe,PrismaClientInitializationError:G,PrismaClientKnownRequestError:K,debug:re("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=hs(e,this._engineConfig),this._requestHandler=new Qr(this,o),L.log)for(let Q of L.log){let Re=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Re&&this.$on(Re,qe=>{var Ze;it.log(`${(Ze=it.tags[Re])!=null?Ze:""}`,qe.message||qe.query)})}this._metrics=new st(this._engine)}catch(L){throw L.clientVersion=this._clientVersion,L}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ji()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Jn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Jn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ds,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(zs)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new Y("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Jc.nextId(),s=Us(n.length),a=n.map((u,l)=>{var x,S,C;if((u==null?void 0:u[Symbol.toStringTag])!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=(x=i==null?void 0:i.isolationLevel)!=null?x:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(C=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?C:u});return na(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let x={kind:"itx",...a};u=await n(this._createItxClient(x)),await this._engine.transaction("commit",o,a)}catch(x){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),x}return u}_createItxClient(n){return qt(ge(Uo(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Gn(n)),ne(jc,()=>n.id),at(Vs)]))}$transaction(n,i){var a;let o;typeof n=="function"?((a=this._engineConfig.adapter)==null?void 0:a.adapterName)==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:Vc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,O=>h(g,B=>(O==null||O.end(),u(B))));let{runInTransaction:x,args:S,...C}=g,A={...n,...C};S&&(A.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&x===!1&&delete A.transaction;let k=await Ko(this,A);return A.model?Qo({result:k,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:x,customDataProxyFetch:S}){try{n=l?l(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Rs({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return re.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${Do(n)})`),Le("Generated request:"),Le(JSON.stringify(A,null,2)+` -`)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:x,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Qc(e)?[new se(e,t),Fs]:[e,Ls]}function Qc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var Gc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function aa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Gc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=edge.js.map diff --git a/src/prisma/client-pg/runtime/index-browser.d.ts b/src/prisma/client-pg/runtime/index-browser.d.ts deleted file mode 100644 index f033b86..0000000 --- a/src/prisma/client-pg/runtime/index-browser.d.ts +++ /dev/null @@ -1,365 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export { } diff --git a/src/prisma/client-pg/runtime/index-browser.js b/src/prisma/client-pg/runtime/index-browser.js deleted file mode 100644 index 4f82417..0000000 --- a/src/prisma/client-pg/runtime/index-browser.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";var de=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Je(n))!je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=Ge(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Ce(Xn,{Decimal:()=>We,Public:()=>he,getRuntime:()=>Ae,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Ce(he,{validator:()=>Me});function Me(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},J=class extends ge{_getNamespace(){return"NullTypes"}},j=class extends J{};me(j,"DbNull");var X=class extends J{};me(X,"JsonNull");var K=class extends J{};me(K,"AnyNull");var Oe={classes:{DbNull:j,JsonNull:X,AnyNull:K},instances:{DbNull:new j(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var Qe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!Qe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Ye="Cloudflare-Workers",xe="node";function be(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Ye?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===xe?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Ae(){let e=be();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,V=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",$=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",A=Math.floor,M=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*M(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=M(i,1/3),e=A((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-A(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=W(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=W(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=W(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),Q(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(Q(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=A(e.e/m),c=A(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=A((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=A(c.e/m)+A(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(R(e,0,V),n===void 0?n=t.rounding:R(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(R(e,0,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(R(e,0,V),n===void 0?n=s.rounding:R(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=M(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:R(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(M(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=A(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(R(e,1,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(R(e,1,V),n===void 0?n=t.rounding:R(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=M(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==M(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==M(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=W(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,_,C,q,E,P,x,I,le,z,G,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,b=t.d,k=r.d;if(!b||!b[0]||!k||!k[0])return new ee(!t.s||!r.s||(b?k&&b[0]==k[0]:!k)?NaN:b&&b[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=A(t.e/g)-A(r.e/g)),T=k.length,G=b.length,C=new ee(ae),q=C.d=[],a=0;k[a]==(b[a]||0);a++);if(k[a]>(b[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),b=e(b,d,l),T=k.length,G=b.length),z=T,E=b.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(x=E[0],T!=P&&(x=x*l+(E[1]||0)),d=x/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),_=N.length,P=E.length,f=n(N,E,_,P),f==1&&(d--,i(N,T<_?y:k,_,l))):(d==0&&(f=d=1),N=k.slice()),_=N.length,_=10;d/=10)a++;C.e=a+c*g-1,p(C,u?s+C.e+1:s,o,v)}return C}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/M(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/M(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%M(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/M(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=M(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=M(10,m-s),a[d]=o>0?(c/M(10,r-o)%M(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),Re(s.d,o)&&(r=!0)),i=A(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),Re(n.d,o)}return w=!0,s}function _e(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(M(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&Q(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,_=N.d,C=N.constructor,q=C.rounding,E=C.precision;if(N.s<0||!_||!_[0]||!N.e&&_[0]==1&&_.length==1)return new C(_&&!_[0]?-1/0:N.s!=1?NaN:_?0:N);if(n==null?(w=!1,c=E):c=n,C.precision=c+=v,i=O(_),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new C("0."+i),s++):N=new C(t+"."+i.slice(1))}else return f=se(C,c+2,E).times(s+""),N=B(new C(t+"."+i.slice(1)),c-v).plus(f),C.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new C(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(C,c+2,E).times(s+""))),l=S(l,new C(g),c,1),n==null)if(Q(l.d,c-v,q,u))C.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,C.precision=E,q,w=!0);else return C.precision=E,l;l=f,r+=2}}function $e(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?M(2,l):Y.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:W(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=W(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function W(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function Ve(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=_e(i)?t?2:3:t?4:1,n;Z=_e(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(R(i,1,V),t===void 0?t=g.rounding:R(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=$e(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,V,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error($+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/src/prisma/client-pg/runtime/library.d.ts b/src/prisma/client-pg/runtime/library.d.ts deleted file mode 100644 index c5aef50..0000000 --- a/src/prisma/client-pg/runtime/library.d.ts +++ /dev/null @@ -1,3194 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: EngineConfig['accelerateUtils']; -}; - -export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} ? { - [P in K]: Record; -} : {}; - -declare class AnyNull extends NullTypesEnumValue { -} - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -export declare type Args_3 = Args; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = string | number | boolean | Array | Array | Array; - -export declare type BaseDMMF = Pick; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResult | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -export declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -export declare type ComputeDeep = T extends Function ? T : { - [K in keyof T]: ComputeDeep; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; -}; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} ? C & T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -} : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -}; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection

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

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

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

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

= A extends { - omit: infer Omission; -} ? Compute, TrueKeys>> : GetSelectIncludeResult; - -export declare type GetGroupByResult

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

= { - findUnique: GetFindResult | null; - findUniqueOrThrow: GetFindResult; - findFirst: GetFindResult | null; - findFirstOrThrow: GetFindResult; - findMany: GetFindResult[]; - create: GetFindResult; - createMany: GetBatchResult; - createManyAndReturn: GetFindResult[]; - update: GetFindResult; - updateMany: GetBatchResult; - upsert: GetFindResult; - delete: GetFindResult; - deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; - $queryRaw: unknown; - $executeRaw: number; - $queryRawUnsafe: unknown; - $executeRawUnsafe: number; - $runCommandRaw: JsonObject; - findRaw: JsonObject; - aggregateRaw: JsonObject; -}[O]; - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { - [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; -}; - -export declare type GetSelectIncludeResult

= Equals extends 1 ? DefaultSelection

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

: unknown) : DefaultSelection

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

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

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

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

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

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - JsonObject, - JsonArray, - JsonValue, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise - } -} - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -declare type WasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => { - __wbg_set_wasm(exports: unknown): any; - QueryEngine: QueryEngineConstructor; - }; - /** - * Loads the raw wasm module for the wasm query engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by LibraryEngine.ts - */ - getQueryEngineWasmModule: () => Promise; -}; - -export { } diff --git a/src/prisma/client-pg/runtime/library.js b/src/prisma/client-pg/runtime/library.js deleted file mode 100644 index edb73d2..0000000 --- a/src/prisma/client-pg/runtime/library.js +++ /dev/null @@ -1,140 +0,0 @@ -"use strict";var Ml=Object.create;var Ct=Object.defineProperty;var $l=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var jl=Object.getPrototypeOf,Vl=Object.prototype.hasOwnProperty;var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Fr=(e,r)=>{for(var t in r)Ct(e,t,{get:r[t],enumerable:!0})},no=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ql(r))!Vl.call(e,i)&&i!==t&&Ct(e,i,{get:()=>r[i],enumerable:!(n=$l(r,i))||n.enumerable});return e};var k=(e,r,t)=>(t=e!=null?Ml(jl(e)):{},no(r||!e||!e.__esModule?Ct(t,"default",{value:e,enumerable:!0}):t,e)),Bl=e=>no(Ct({},"__esModule",{value:!0}),e);var Ao=Z((Bm,Un)=>{"use strict";var v=Un.exports;Un.exports.default=v;var D="\x1B[",jr="\x1B]",dr="\x07",Ft=";",Ro=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?D+(e+1)+"G":D+(r+1)+";"+(e+1)+"H"};v.cursorMove=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=D+-e+"D":e>0&&(t+=D+e+"C"),r<0?t+=D+-r+"A":r>0&&(t+=D+r+"B"),t};v.cursorUp=(e=1)=>D+e+"A";v.cursorDown=(e=1)=>D+e+"B";v.cursorForward=(e=1)=>D+e+"C";v.cursorBackward=(e=1)=>D+e+"D";v.cursorLeft=D+"G";v.cursorSavePosition=Ro?"\x1B7":D+"s";v.cursorRestorePosition=Ro?"\x1B8":D+"u";v.cursorGetPosition=D+"6n";v.cursorNextLine=D+"E";v.cursorPrevLine=D+"F";v.cursorHide=D+"?25l";v.cursorShow=D+"?25h";v.eraseLines=e=>{let r="";for(let t=0;t[jr,"8",Ft,Ft,r,dr,e,jr,"8",Ft,Ft,dr].join("");v.image=(e,r={})=>{let t=`${jr}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+e.toString("base64")+dr};v.iTerm={setCwd:(e=process.cwd())=>`${jr}50;CurrentDir=${e}${dr}`,annotation:(e,r={})=>{let t=`${jr}1337;`,n=typeof r.x<"u",i=typeof r.y<"u";if((n||i)&&!(n&&i&&typeof r.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+dr}}});var Qn=Z((Um,Io)=>{"use strict";Io.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Ru=require("os"),_o=require("tty"),pe=Qn(),{env:G}=process,Ve;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?Ve=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(Ve=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Ve=1:G.FORCE_COLOR==="false"?Ve=0:Ve=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function Gn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Jn(e,r){if(Ve===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&Ve===void 0)return 0;let t=Ve||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Ru.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function Au(e){let r=Jn(e,e&&e.isTTY);return Gn(r)}ko.exports={supportsColor:Au,stdout:Gn(Jn(!0,_o.isatty(1))),stderr:Gn(Jn(!0,_o.isatty(2)))}});var Fo=Z((Gm,Lo)=>{"use strict";var Iu=Do(),mr=Qn();function Oo(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 Wn(e){let{env:r}=process;if("FORCE_HYPERLINK"in r)return!(r.FORCE_HYPERLINK.length>0&&parseInt(r.FORCE_HYPERLINK,10)===0);if(mr("no-hyperlink")||mr("no-hyperlinks")||mr("hyperlink=false")||mr("hyperlink=never"))return!1;if(mr("hyperlink=true")||mr("hyperlink=always")||"NETLIFY"in r)return!0;if(!Iu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in r||"TEAMCITY_VERSION"in r)return!1;if("TERM_PROGRAM"in r){let t=Oo(r.TERM_PROGRAM_VERSION);switch(r.TERM_PROGRAM){case"iTerm.app":return t.major===3?t.minor>=1:t.major>3;case"WezTerm":return t.major>=20200620;case"vscode":return t.major>1||t.major===1&&t.minor>=72}}if("VTE_VERSION"in r){if(r.VTE_VERSION==="0.50.0")return!1;let t=Oo(r.VTE_VERSION);return t.major>0||t.minor>=50}return!1}Lo.exports={supportsHyperlink:Wn,stdout:Wn(process.stdout),stderr:Wn(process.stderr)}});var Mo=Z((Jm,Vr)=>{"use strict";var _u=Ao(),Hn=Fo(),No=(e,r,{target:t="stdout",...n}={})=>Hn[t]?_u.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`;Vr.exports=(e,r,t={})=>No(e,r,t);Vr.exports.stderr=(e,r,t={})=>No(e,r,{target:"stderr",...t});Vr.exports.isSupported=Hn.stdout;Vr.exports.stderr.isSupported=Hn.stderr});var Yn=Z((tf,ku)=>{ku.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zn=Z(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.enginesVersion=void 0;Nt.enginesVersion=Yn().prisma.enginesVersion});var Vo=Z((Pf,Lu)=>{Lu.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var Uo=Z((vf,$t)=>{"use strict";var Fu=require("fs"),Bo=require("path"),Nu=require("os"),Mu=Vo(),$u=Mu.version,qu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ju(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` -`);let n;for(;(n=qu.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function ri(e){console.log(`[dotenv@${$u}][DEBUG] ${e}`)}function Vu(e){return e[0]==="~"?Bo.join(Nu.homedir(),e.slice(1)):e}function Bu(e){let r=Bo.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(r=Vu(e.path)),e.encoding!=null&&(t=e.encoding));try{let o=Mt.parse(Fu.readFileSync(r,{encoding:t}));return Object.keys(o).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(i===!0&&(process.env[s]=o[s]),n&&ri(i===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=o[s]}),{parsed:o}}catch(o){return n&&ri(`Failed to load ${r} ${o.message}`),{error:o}}}var Mt={config:Bu,parse:ju};$t.exports.config=Mt.config;$t.exports.parse=Mt.parse;$t.exports=Mt});var Ko=Z((_f,Ho)=>{"use strict";Ho.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var zo=Z((kf,Yo)=>{"use strict";var Ju=Ko();Yo.exports=e=>{let r=Ju(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}});var oi=Z((Mf,Zo)=>{"use strict";Zo.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var ts=Z((jf,rs)=>{"use strict";rs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var ui=Z((Vf,ns)=>{"use strict";var ec=ts();ns.exports=e=>typeof e=="string"?e.replace(ec(),""):e});var is=Z((Qf,Vt)=>{"use strict";Vt.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()};Vt.exports.default=Vt.exports});var Hi=Z((DP,Ba)=>{"use strict";Ba.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;sFn,Decimal:()=>Te,Extensions:()=>kn,MetricsClient:()=>hr,NotFoundError:()=>Oe,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>H,Public:()=>Dn,Sql:()=>ie,defineDmmfProperty:()=>ss,empty:()=>ls,getPrismaClient:()=>Ll,getRuntime:()=>fn,join:()=>as,makeStrictEnum:()=>Fl,objectEnumValues:()=>Qt,raw:()=>Ei,sqltag:()=>bi,warnEnvConflicts:()=>Nl,warnOnce:()=>Wr});module.exports=Bl(fm);var kn={};Fr(kn,{defineExtension:()=>io,getExtensionContext:()=>oo});function io(e){return typeof e=="function"?e:r=>r.$extends(e)}function oo(e){return e}var Dn={};Fr(Dn,{validator:()=>so});function so(...e){return r=>r}var St={};Fr(St,{$:()=>po,bgBlack:()=>Zl,bgBlue:()=>tu,bgCyan:()=>iu,bgGreen:()=>eu,bgMagenta:()=>nu,bgRed:()=>Xl,bgWhite:()=>ou,bgYellow:()=>ru,black:()=>Hl,blue:()=>ze,bold:()=>W,cyan:()=>_e,dim:()=>Ie,gray:()=>Nr,green:()=>Me,grey:()=>zl,hidden:()=>Jl,inverse:()=>Gl,italic:()=>Ql,magenta:()=>Kl,red:()=>ue,reset:()=>Ul,strikethrough:()=>Wl,underline:()=>X,white:()=>Yl,yellow:()=>fe});var On,ao,lo,uo,co=!0;typeof process<"u"&&({FORCE_COLOR:On,NODE_DISABLE_COLORS:ao,NO_COLOR:lo,TERM:uo}=process.env||{},co=process.stdout&&process.stdout.isTTY);var po={enabled:!ao&&lo==null&&uo!=="dumb"&&(On!=null&&On!=="0"||co)};function N(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!po.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Ul=N(0,0),W=N(1,22),Ie=N(2,22),Ql=N(3,23),X=N(4,24),Gl=N(7,27),Jl=N(8,28),Wl=N(9,29),Hl=N(30,39),ue=N(31,39),Me=N(32,39),fe=N(33,39),ze=N(34,39),Kl=N(35,39),_e=N(36,39),Yl=N(37,39),Nr=N(90,39),zl=N(90,39),Zl=N(40,49),Xl=N(41,49),eu=N(42,49),ru=N(43,49),tu=N(44,49),nu=N(45,49),iu=N(46,49),ou=N(47,49);var su=100,mo=["green","yellow","blue","magenta","cyan","red"],Mr=[],fo=Date.now(),au=0,Ln=typeof process<"u"?process.env:{};globalThis.DEBUG??(globalThis.DEBUG=Ln.DEBUG??"");globalThis.DEBUG_COLORS??(globalThis.DEBUG_COLORS=Ln.DEBUG_COLORS?Ln.DEBUG_COLORS==="true":!0);var $r={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e,i;typeof require=="function"&&typeof process<"u"&&typeof process.stderr<"u"&&typeof process.stderr.write=="function"?i=(...o)=>{try{let s=require("util");process.stderr.write(s.format(...o)+` -`)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${r} ${t}`,...n)},formatters:{}};function lu(e){let r={color:mo[au++%mo.length],enabled:$r.enabled(e),namespace:e,log:$r.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Mr.push([o,...n]),Mr.length>su&&Mr.shift(),$r.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:uu(c)),u=`+${Date.now()-fo}ms`;fo=Date.now(),globalThis.DEBUG_COLORS?a(St[s](W(o)),...l,St[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var Fn=new Proxy(lu,{get:(e,r)=>$r[r],set:(e,r,t)=>$r[r]=t});function uu(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function go(e=7500){let r=Mr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return r.length!!(e&&typeof e=="object"),It=e=>e&&!!e[ke],we=(e,r,t)=>{if(It(e)){let n=e[ke](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if($n(e)){if(!$n(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];It(a)&&a[cu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthwe(u,s[c],t))&&i.every((u,c)=>we(u,a[c],t))&&(o.length===0||we(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>we(s,r[a],t))}return Object.keys(e).every(n=>{let i=e[n];return(n in r||It(o=i)&&o[ke]().matcherType==="optional")&&we(i,r[n],t);var o})}return Object.is(r,e)},je=e=>{var r,t,n;return $n(e)?It(e)?(r=(t=(n=e[ke]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?qr(e,je):qr(Object.values(e),je):[]},qr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function ce(e){return Object.assign(e,{optional:()=>pu(e),and:r=>j(e,r),or:r=>du(e,r),select:r=>r===void 0?Eo(e):Eo(r,e)})}function pu(e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(je(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:we(e,r,n),selections:t}},getSelectionKeys:()=>je(e),matcherType:"optional"})})}function j(...e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,je),matcherType:"and"})})}function du(...e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return qr(e,je).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,je),matcherType:"or"})})}function _(e){return{[ke]:()=>({match:r=>({matched:!!e(r)})})}}function Eo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[ke]:()=>({match:n=>{let i={[r??_t]:n};return{matched:t===void 0||we(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??_t].concat(t===void 0?[]:je(t))})})}function Ee(e){return typeof e=="number"}function Ze(e){return typeof e=="string"}function $e(e){return typeof e=="bigint"}var Rm=ce(_(function(e){return!0}));var Xe=e=>Object.assign(ce(e),{startsWith:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.endsWith(t)))));var t},minLength:r=>Xe(j(e,(t=>_(n=>Ze(n)&&n.length>=t))(r))),maxLength:r=>Xe(j(e,(t=>_(n=>Ze(n)&&n.length<=t))(r))),includes:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.includes(t)))));var t},regex:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&!!n.match(t)))));var t}}),Am=Xe(_(Ze)),be=e=>Object.assign(ce(e),{between:(r,t)=>be(j(e,((n,i)=>_(o=>Ee(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(j(e,(t=>_(n=>Ee(n)&&nbe(j(e,(t=>_(n=>Ee(n)&&n>t))(r))),lte:r=>be(j(e,(t=>_(n=>Ee(n)&&n<=t))(r))),gte:r=>be(j(e,(t=>_(n=>Ee(n)&&n>=t))(r))),int:()=>be(j(e,_(r=>Ee(r)&&Number.isInteger(r)))),finite:()=>be(j(e,_(r=>Ee(r)&&Number.isFinite(r)))),positive:()=>be(j(e,_(r=>Ee(r)&&r>0))),negative:()=>be(j(e,_(r=>Ee(r)&&r<0)))}),Im=be(_(Ee)),qe=e=>Object.assign(ce(e),{between:(r,t)=>qe(j(e,((n,i)=>_(o=>$e(o)&&n<=o&&i>=o))(r,t))),lt:r=>qe(j(e,(t=>_(n=>$e(n)&&nqe(j(e,(t=>_(n=>$e(n)&&n>t))(r))),lte:r=>qe(j(e,(t=>_(n=>$e(n)&&n<=t))(r))),gte:r=>qe(j(e,(t=>_(n=>$e(n)&&n>=t))(r))),positive:()=>qe(j(e,_(r=>$e(r)&&r>0))),negative:()=>qe(j(e,_(r=>$e(r)&&r<0)))}),_m=qe(_($e)),km=ce(_(function(e){return typeof e=="boolean"})),Dm=ce(_(function(e){return typeof e=="symbol"})),Om=ce(_(function(e){return e==null})),Lm=ce(_(function(e){return e!=null}));var qn={matched:!1,value:void 0};function pr(e){return new jn(e,qn)}var jn=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>we(u,this.input,a))||i&&!i(this.input)?qn:{matched:!0,value:t(o?_t in s?s[_t]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:qn)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let r;try{r=JSON.stringify(this.input)}catch{r=this.input}throw new Error(`Pattern matching error: no pattern matches value ${r}`)}run(){return this.exhaustive()}returnType(){return this}};var Po=require("util");var mu={warn:fe("prisma:warn")},fu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function kt(e,...r){fu.warn()&&console.warn(`${mu.warn} ${e}`,...r)}var gu=(0,Po.promisify)(xo.default.exec),re=L("prisma:get-platform"),hu=["1.0.x","1.1.x","3.0.x"];async function vo(){let e=Ot.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Lt("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 Eu(),n=await Su(),i=wu({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await xu(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function yu(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=pr({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 re(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Eu(){let e="/etc/os-release";try{let r=await Vn.default.readFile(e,{encoding:"utf-8"});return yu(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function bu(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return To(t)}}function bo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return To(t)}}function To(e){let r=(()=>{if(So(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(hu.includes(r))return r}function wu(e){return pr(e).with({familyDistro:"musl"},()=>(re('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(re('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(re('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(re(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function xu(e){let r='grep -v "libssl.so.0"',t=await wo(e);if(t){re(`Found libssl.so file using platform-specific paths: ${t}`);let o=bo(t);if(re(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}re('Falling back to "ldconfig" and other generic paths');let n=await Lt(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await wo(["/lib64","/usr/lib64","/lib"])),n){re(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=bo(n);if(re(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Lt("openssl version -v");if(i){re(`Found openssl binary with version: ${i}`);let o=bu(i);if(re(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return re("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function wo(e){for(let r of e){let t=await Pu(r);if(t)return t}}async function Pu(e){try{return(await Vn.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function er(){let{binaryTarget:e}=await Co();return e}function vu(e){return e.binaryTarget!==void 0}async function Bn(){let{memoized:e,...r}=await Co();return r}var Dt={};async function Co(){if(vu(Dt))return Promise.resolve({...Dt,memoized:!0});let e=await vo(),r=Tu(e);return Dt={...e,binaryTarget:r},{...Dt,memoized:!1}}function Tu(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&kt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=pr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");kt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(r==="linux"&&o===void 0&&re(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||So(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&kt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Cu(e){try{return await e()}catch{return}}function Lt(e){return Cu(async()=>{let r=await gu(e);return re(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function Su(){return typeof Ot.default.machine=="function"?Ot.default.machine():(await Lt("uname -m"))?.trim()}function So(e){return e.startsWith("1.")}var $o=k(Mo());function Kn(e){return(0,$o.default)(e,e,{fallback:X})}var Du=k(zn());var M=k(require("path")),Ou=k(zn()),mf=L("prisma:engines");function qo(){return M.default.join(__dirname,"../")}var ff="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Zn=k(require("fs")),jo=L("chmodPlusX");function Xn(e){if(process.platform==="win32")return;let r=Zn.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){jo(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);jo(`Have to call chmodPlusX on ${e}`),Zn.default.chmodSync(e,n)}function ei(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${Kn("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ie(e.id)}\`).`,s=pr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} -${s} - -Details: ${r.message}`}var ni=k(Uo()),qt=k(require("fs"));var fr=k(require("path"));function Qo(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var ti=L("prisma:tryLoadEnv");function Br({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Go(e);t.conflictCheck!=="none"&&Uu(n,r,t.conflictCheck);let i=null;return Jo(n?.path,r)||(i=Go(r)),!n&&!i&&ti("No Environment variables loaded"),i?.dotenvResult.error?console.error(ue(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Uu(e,r,t){let n=e?.dotenvResult.parsed,i=!Jo(e?.path,r);if(n&&r&&i&&qt.default.existsSync(r)){let o=ni.default.parse(qt.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=fr.default.relative(process.cwd(),e.path),l=fr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} -Conflicting env vars: -${s.map(c=>` ${W(c)}`).join(` -`)} - -We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. -`;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${X(a)} and ${X(l)} -Env vars from ${X(l)} overwrite the ones from ${X(a)} - `;console.warn(`${fe("warn(prisma)")} ${u}`)}}}}function Go(e){if(Qu(e)){ti(`Environment variables loaded from ${e}`);let r=ni.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Qo(r),message:Ie(`Environment variables loaded from ${fr.default.relative(process.cwd(),e)}`),path:e}}else ti(`Environment variables not found at ${e}`);return null}function Jo(e,r){return e&&r&&fr.default.resolve(e)===fr.default.resolve(r)}function Qu(e){return!!(e&&qt.default.existsSync(e))}var Wo="library";function Ur(e){let r=Gu();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Wo)}function Gu(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var De;(r=>{let e;(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw"))(e=r.ModelAction||(r.ModelAction={}))})(De||(De={}));var Qr=k(require("path"));function ii(e){return Qr.default.sep===Qr.default.posix.sep?e:e.split(Qr.default.sep).join(Qr.default.posix.sep)}var Xo=k(oi());function ai(e){return String(new si(e))}var si=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Wu(r.binaryTargets)}));return`generator ${r.name} { -${(0,Xo.default)(Hu(n),2)} -}`}};function Wu(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Hu(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${Ku(n)}`).join(` -`)}function Ku(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var Jr={};Fr(Jr,{error:()=>Zu,info:()=>zu,log:()=>Yu,query:()=>Xu,should:()=>es,tags:()=>Gr,warn:()=>li});var Gr={error:ue("prisma:error"),warn:fe("prisma:warn"),info:_e("prisma:info"),query:ze("prisma:query")},es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Yu(...e){console.log(...e)}function li(e,...r){es.warn()&&console.warn(`${Gr.warn} ${e}`,...r)}function zu(e,...r){console.info(`${Gr.info} ${e}`,...r)}function Zu(e,...r){console.error(`${Gr.error} ${e}`,...r)}function Xu(e,...r){console.log(`${Gr.query} ${e}`,...r)}function jt(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function rr(e,r){throw new Error(r)}function ci(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var pi=(e,r)=>e.reduce((t,n)=>(t[r(n)]=n,t),{});function gr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function di(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{os.has(e)||(os.add(e),li(r,...t))};var V=class extends Error{constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(V,"PrismaClientKnownRequestError");var Oe=class extends V{constructor(r,t){super(r,{code:"P2025",clientVersion:t}),this.name="NotFoundError"}};w(Oe,"NotFoundError");var R=class e extends Error{constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(R,"PrismaClientInitializationError");var le=class extends Error{constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(le,"PrismaClientRustPanicError");var B=class extends Error{constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var H=class extends Error{constructor(t,{clientVersion:n}){super(t);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(H,"PrismaClientValidationError");var hr=class{constructor(r){this._engine=r}prometheus(r){return this._engine.metrics({format:"prometheus",...r})}json(r){return this._engine.metrics({format:"json",...r})}};function Hr(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function ss(e,r){let t=Hr(()=>rc(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function rc(e){return{datamodel:{models:mi(e.models),enums:mi(e.enums),types:mi(e.types)}}}function mi(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var Ut=Symbol(),fi=new WeakMap,Le=class{constructor(r){r===Ut?fi.set(this,`Prisma.${this._getName()}`):fi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return fi.get(this)}},Kr=class extends Le{_getNamespace(){return"NullTypes"}},Yr=class extends Kr{};gi(Yr,"DbNull");var zr=class extends Kr{};gi(zr,"JsonNull");var Zr=class extends Kr{};gi(Zr,"AnyNull");var Qt={classes:{DbNull:Yr,JsonNull:zr,AnyNull:Zr},instances:{DbNull:new Yr(Ut),JsonNull:new zr(Ut),AnyNull:new Zr(Ut)}};function gi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}function Xr(e){return{ok:!1,error:e,map(){return Xr(e)},flatMap(){return Xr(e)}}}var hi=class{constructor(){this.registeredErrors=[]}consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}},yi=e=>{let r=new hi,t=tr(r,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:r,queryRaw:tr(r,e.queryRaw.bind(e)),executeRaw:tr(r,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await t(...i)).map(s=>tc(r,s))};return e.getConnectionInfo&&(n.getConnectionInfo=nc(r,e.getConnectionInfo.bind(e))),n},tc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:tr(e,r.queryRaw.bind(r)),executeRaw:tr(e,r.executeRaw.bind(r)),commit:tr(e,r.commit.bind(r)),rollback:tr(e,r.rollback.bind(r))});function tr(e,r){return async(...t)=>{try{return await r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}function nc(e,r){return(...t)=>{try{return r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}var _l=k(Yn());var kl=require("async_hooks"),Dl=require("events"),Ol=k(require("fs")),vt=k(require("path"));var ie=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Gt={enumerable:!0,configurable:!0,writable:!0};function Jt(e){let r=new Set(e);return{getOwnPropertyDescriptor:()=>Gt,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var us=Symbol.for("nodejs.util.inspect.custom");function Pe(e,r){let t=ic(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=cs(Reflect.ownKeys(o),t),a=cs(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...Gt,...l?.getPropertyDescriptor(s)}:Gt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[us]=function(){let o={...this};return delete o[us],o},i}function ic(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function cs(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function yr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Er(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}var br=class{constructor(r=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=r}write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t){let n=t.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};function ps(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function wr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Wt(e){return e.toString()!=="Invalid Date"}var xr=9e15,Ge=1e9,wi="0123456789abcdef",Kt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Yt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xr,maxE:xr,crypto:!1},gs,Fe,x=!0,Zt="[DecimalError] ",Qe=Zt+"Invalid argument: ",hs=Zt+"Precision limit exceeded",ys=Zt+"crypto unavailable",Es="[object Decimal]",ee=Math.floor,Q=Math.pow,oc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,sc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ac=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,bs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,E=7,lc=9007199254740991,uc=Kt.length-1,Pi=Yt.length-1,m={toStringTag:Es};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(Qe+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=cc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Fe==2||Fe==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(x=!1,o=c.s*Q(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=K(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=Q(t,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=F(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(t=K(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return x=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-ee(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return F(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(F(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/en(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Pr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Pr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/en(5,e)),i=Pr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,F(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),i=t.precision,o=t.rounding;return n!==-1?n===0?r.isNeg()?ge(t,i,o):new t(0):new t(NaN):r.isZero()?ge(t,i+4,o).times(.5):(t.precision=i+6,t.rounding=1,r=r.asin(),e=ge(t,i+4,o).times(.5),t.precision=i,t.rounding=o,e.minus(r))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,x=!1,t=t.times(t).minus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,x=!1,t=t.times(t).plus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=F(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=ge(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Pi)return s=ge(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Pi)return s=ge(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(x=!1,a=p+f,s=Ue(u,a),n=r?zt(c,a+10):Ue(e,a),l=F(s,n,a,1),rt(l.d,i=p,d))do if(a+=10,s=Ue(u,a),n=r?zt(c,a+10):Ue(e,a),l=F(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rt(l.d,i+=10,d));return x=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(t=ee(e.e/E),c=ee(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/he|0,u[i]%=he;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=Xt(u,n),x?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Qe+e);return t.d?(r=ws(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=dc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Fe>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=K(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=ee((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(F(s,o,t+2,1)).times(.5),K(o.d).slice(0,t)===(r=K(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return x=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=F(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Fe==2||Fe==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=ee(c.e/E)+ee(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%he|0,r=a/he|0;o[i]=(o[i]+r)%he|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=Xt(o,t),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ci(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(oe(e,0,Ge),r===void 0?r=n.rounding:oe(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,!0):(oe(e,0,Ge),r===void 0?r=i.rounding:oe(r,0,8),n=y(new i(n),e+1,r),t=ve(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=ve(i):(oe(e,0,Ge),r===void 0?r=o.rounding:oe(r,0,8),n=y(new o(i),e+i.e+1,r),t=ve(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=t=new h(1),n=l=new h(0),r=new h(n),o=r.e=ws(g)-f.e-1,s=o%E,r.d[0]=Q(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Qe+a);e=a.gt(r)?o>0?r:u:a}for(x=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*E*2;p=F(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=F(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=F(u,n,o,1).minus(f).abs().cmp(F(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],h.precision=c,x=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ci(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:oe(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(x=!1,t=F(t,e,0,r,1).times(e),x=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ci(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=ee(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=lc)return i=xs(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(x=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=vi(e.times(Ue(a,n+t)),n),i.d&&(i=y(i,n+5,1),rt(i.d,n,o)&&(r=n+10,i=y(vi(e.times(Ue(a,r+t)),r),r+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Ge),r===void 0?r=i.rounding:oe(r,0,8),n=y(new i(n),e,r),t=ve(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(oe(e,1,Ge),r===void 0?r=n.rounding:oe(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function K(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(Qe+e)}function rt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=Q(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,r-3)-1,s}function Ht(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function cc(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/en(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Pr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var F=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,I,T,S,C,b,me,ae,Lr,U,ne,Ae,Y,cr,Tt=n.constructor,_n=n.s==i.s?1:-1,z=n.d,O=i.d;if(!z||!z[0]||!O||!O[0])return new Tt(!n.s||!i.s||(z?O&&z[0]==O[0]:!O)?NaN:z&&z[0]==0||!O?_n*0:_n/0);for(l?(f=1,c=n.e-i.e):(l=he,f=E,c=ee(n.e/f)-ee(i.e/f)),Y=O.length,ne=z.length,T=new Tt(_n),S=T.d=[],p=0;O[p]==(z[p]||0);p++);if(O[p]>(z[p]||0)&&c--,o==null?(ae=o=Tt.precision,s=Tt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),g=!0;else{if(ae=ae/f+2|0,p=0,Y==1){for(d=0,O=O[0],ae++;(p1&&(O=e(O,d,l),z=e(z,d,l),Y=O.length,ne=z.length),U=Y,C=z.slice(0,Y),b=C.length;b=l/2&&++Ae;do d=0,u=r(O,C,Y,b),u<0?(me=C[0],Y!=b&&(me=me*l+(C[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),h=e(O,d,l),I=h.length,b=C.length,u=r(h,C,I,b),u==1&&(d--,t(h,Y=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,g)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/Q(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/Q(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%Q(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/Q(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=Q(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=Q(10,E-o),p[d]=s>0?(c/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==he&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=he)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return x&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Be(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Be(-i-1)+o,t&&(n=t-s)>0&&(o+=Be(n))):i>=s?(o+=Be(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Be(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Be(n))),o}function Xt(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function zt(e,r,t){if(r>uc)throw x=!0,t&&(e.precision=t),Error(hs);return y(new e(Kt),r,1,!0)}function ge(e,r,t){if(r>Pi)throw Error(hs);return y(new e(Yt),r,t,!0)}function ws(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Be(e){for(var r="";e--;)r+="0";return r}function xs(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(x=!1;;){if(t%2&&(o=o.times(r),ms(o.d,s)&&(i=!0)),t=ee(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),ms(r.d,s)}return x=!0,o}function ds(e){return e.d[e.d.length-1]&1}function Ps(e,r,t){for(var n,i=new e(r[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(x=!1,l=g):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(Q(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(F(o,t,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&&rt(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,x=!0);else return d.precision=g,s}s=a}}function Ue(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,I=h.d,T=h.constructor,S=T.rounding,C=T.precision;if(h.s<0||!I||!I[0]||!h.e&&I[0]==1&&I.length==1)return new T(I&&!I[0]?-1/0:h.s!=1?NaN:I?0:h);if(r==null?(x=!1,c=C):c=r,T.precision=c+=g,t=K(I),n=t.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)h=h.times(e),t=K(h.d),n=t.charAt(0),f++;o=h.e,n>1?(h=new T("0."+t),o++):h=new T(n+"."+t.slice(1))}else return u=zt(T,c+2,C).times(o+""),h=Ue(new T(n+"."+t.slice(1)),c-g).plus(u),T.precision=C,r==null?y(h,C,S,x=!0):h;for(p=h,l=s=h=F(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(F(s,new T(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(zt(T,c+2,C).times(o+""))),l=F(l,new T(f),c,1),r==null)if(rt(l.d,c-g,S,a))T.precision=c+=g,u=s=h=F(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,T.precision=C,S,x=!0);else return T.precision=C,l;l=u,i+=2}}function vs(e){return String(e.s*e.s/0)}function Ti(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),bs.test(r))return Ti(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(sc.test(r))t=16,r=r.toLowerCase();else if(oc.test(r))t=2;else if(ac.test(r))t=8;else throw Error(Qe+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=xs(n,new n(t),o,o*2)),u=Ht(r,t,he),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=Xt(u,c),e.d=u,x=!1,s&&(e=F(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):ir.pow(2,l))),x=!0,e)}function dc(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Pr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/en(5,t)),r=Pr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Pr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(x=!1,l=t.times(t),a=new e(n);;){if(s=F(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=F(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return x=!0,s.d.length=p+1,s}function en(e,r){for(var t=e;--r;)t*=e;return t}function Ts(e,r){var t,n=r.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Fe=n?4:1,r;if(t=r.divToInt(i),t.isZero())Fe=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Fe=ds(t)?n?2:3:n?4:1,r;Fe=ds(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ci(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=t!==void 0;if(g?(oe(t,1,Ge),n===void 0?n=f.rounding:oe(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=vs(e);else{for(c=ve(e),s=c.indexOf("."),g?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=Ht(ve(d),10,i),d.e=d.d.length),p=Ht(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=F(e,d,t,n,0,i),p=e.d,o=e.e,u=gs),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=Ht(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function mc(e){return new this(e).abs()}function fc(e){return new this(e).acos()}function gc(e){return new this(e).acosh()}function hc(e,r){return new this(e).plus(r)}function yc(e){return new this(e).asin()}function Ec(e){return new this(e).asinh()}function bc(e){return new this(e).atan()}function wc(e){return new this(e).atanh()}function xc(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=ge(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?ge(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=ge(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(F(e,r,o,1)),r=ge(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(F(e,r,o,1)),t}function Pc(e){return new this(e).cbrt()}function vc(e){return y(e=new this(e),e.e+1,2)}function Tc(e,r,t){return new this(e).clamp(r,t)}function Cc(e){if(!e||typeof e!="object")throw Error(Zt+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ge,"rounding",0,8,"toExpNeg",-xr,0,"toExpPos",0,xr,"maxE",0,xr,"minE",-xr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(Qe+t+": "+n);if(t="crypto",i&&(this[t]=xi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(ys);else this[t]=!1;else throw Error(Qe+t+": "+n);return this}function Sc(e){return new this(e).cos()}function Rc(e){return new this(e).cosh()}function Cs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,fs(o)){u.s=o.s,x?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;x?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ys);else for(;o=10;i/=10)n++;n`}};function Tr(e){return e instanceof tt}var rn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var tn=e=>e,nn={bold:tn,red:tn,green:tn,dim:tn,enabled:!1},Ss={bold:W,red:ue,green:Me,dim:Ie,enabled:!0},Cr={write(e){e.writeLine(",")}};var Ce=class{constructor(r){this.contents=r;this.isUnderlined=!1;this.color=r=>r}underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Sr=class extends Je{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new rn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let n=new Ce("[]");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithItems(t){let{colors:n}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Cr,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Rs=": ",on=class{constructor(r,t){this.name=r;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Rs.length}write(r){let t=new Ce(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(Rs).write(this.value)}};var sn=class e extends Je{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[n,...i]=t,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof Sr&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let n=this;for(let i of t){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(t){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of t){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(i=>i.getPrintWidth()))+2}write(t){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,n)}asObject(){return this}writeEmpty(t){let n=new Ce("{}");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithContents(t,n){t.writeLine("{").withIndent(()=>{t.writeJoined(Cr,[...n,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var J=class extends Je{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Ce(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var Si=class{constructor(r){this.errorMessages=[];this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` -`)}};function an(e){return new Si(As(e))}function As(e){let r=new sn;for(let[t,n]of Object.entries(e)){let i=new on(t,Is(n));r.addField(i)}return r}function Is(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(vr(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=Wt(e)?e.toISOString():"Invalid Date";return new J(`new Date("${r}")`)}return e instanceof Le?new J(`Prisma.${e._getName()}`):Tr(e)?new J(`prisma.${ps(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xc(e):typeof e=="object"?As(e):new J(Object.prototype.toString.call(e))}function Xc(e){let r=new Sr;for(let t of e)r.addItem(Is(t));return r}function _s(e){if(e===void 0)return"";let r=an(e);return new br(0,{colors:nn}).write(r).toString()}var ep="P2037";function or({error:e,user_facing_error:r},t,n){return r.error_code?new V(rp(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new B(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function rp(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===ep&&(t+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var nt="";function ks(e){var r=e.split(` -`);return r.reduce(function(t,n){var i=ip(n)||sp(n)||up(n)||mp(n)||pp(n);return i&&t.push(i),t},[])}var tp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,np=/\((\S*)(?::(\d+))(?::(\d+))\)/;function ip(e){var r=tp.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=np.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]||nt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var op=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function sp(e){var r=op.exec(e);return r?{file:r[2],methodName:r[1]||nt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var ap=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,lp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function up(e){var r=ap.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=lp.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||nt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var cp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function pp(e){var r=cp.exec(e);return r?{file:r[3],methodName:r[1]||nt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var dp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function mp(e){var r=dp.exec(e);return r?{file:r[2],methodName:r[1]||nt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Ri=class{getLocation(){return null}},Ai=class{constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=ks(r).find(i=>{if(!i.file)return!1;let o=ii(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function We(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ri:new Ai}var Ds={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Rr(e={}){let r=gp(e);return Object.entries(r).reduce((n,[i,o])=>(Ds[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function gp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function ln(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Os(e,r){let t=ln(e);return r({action:"aggregate",unpacker:t,argsMapper:Rr})(e)}function hp(e={}){let{select:r,...t}=e;return typeof r=="object"?Rr({...t,_count:r}):Rr({...t,_count:{_all:!0}})}function yp(e={}){return typeof e.select=="object"?r=>ln(e)(r)._count:r=>ln(e)(r)._count._all}function Ls(e,r){return r({action:"count",unpacker:yp(e),argsMapper:hp})(e)}function Ep(e={}){let r=Rr(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 bp(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Fs(e,r){return r({action:"groupBy",unpacker:bp(e),argsMapper:Ep})(e)}function Ns(e,r,t){if(r==="aggregate")return n=>Os(n,t);if(r==="count")return n=>Ls(n,t);if(r==="groupBy")return n=>Fs(n,t)}function Ms(e,r){let t=r.fields.filter(i=>!i.relationName),n=pi(t,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new tt(e,o,s.type,s.isList,s.kind==="enum")},...Jt(Object.keys(n))})}var $s=e=>Array.isArray(e)?e:e.split("."),Ii=(e,r)=>$s(r).reduce((t,n)=>t&&t[n],e),qs=(e,r,t)=>$s(r).reduceRight((n,i,o,s)=>Object.assign({},Ii(e,s.slice(0,o)),{[i]:n}),t);function wp(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function xp(e,r,t){return r===void 0?e??{}:qs(r,t,e||!0)}function _i(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=We(e._errorFormat),c=wp(n,i),p=xp(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Pp(e,r);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let T=[a[h].type,t,h],S=[c,p];return _i(e,...T,...S)},...Jt([...f,...Object.getOwnPropertyNames(d)])})}}function Pp(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Gs=k(oi());var Qs=k(require("fs"));var js={keyword:_e,entity:_e,value:e=>W(ze(e)),punctuation:ze,directive:_e,function:_e,variable:e=>W(ze(e)),string:e=>W(Me(e)),boolean:fe,number:_e,comment:Nr};var vp=e=>e,un={},Tp=0,P={manual:un.Prism&&un.Prism.manual,disableWorkerMessageHandler:un.Prism&&un.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let r=e;return new ye(r.type,P.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ye)continue;if(me&&U!=r.length-1){S.lastIndex=ne;var p=S.exec(e);if(!p)break;var c=p.index+(b?p[1].length:0),d=p.index+p[0].length,a=U,l=ne;for(let O=r.length;a=l&&(++U,ne=l);if(r[U]instanceof ye)continue;u=a-U,Ae=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}b&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ae.slice(0,c),g=Ae.slice(d);let Y=[U,u];f&&(++U,ne+=f.length,Y.push(f));let cr=new ye(h,C?P.tokenize(p,C):p,Lr,p,me);if(Y.push(cr),g&&Y.push(g),Array.prototype.splice.apply(r,Y),u!=1&&P.matchGrammar(e,r,t,U,ne,!0,h),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return P.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=P.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=P.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ye};P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});P.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;P.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});P.languages.markup&&P.languages.markup.tag.addInlined("script","javascript");P.languages.js=P.languages.javascript;P.languages.typescript=P.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});P.languages.ts=P.languages.typescript;function ye(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ye.stringify(t,r)}).join(""):Cp(e.type)(e.content)};function Cp(e){return js[e]||vp}function Vs(e){return Sp(e,P.languages.javascript)}function Sp(e,r){return P.tokenize(e,r).map(n=>ye.stringify(n)).join("")}var Bs=k(zo());function Us(e){return(0,Bs.default)(e)}var cn=class e{static read(r){let t;try{t=Qs.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` -`);return new e(r,Us(n).split(` -`))}highlight(){let r=Vs(this.toString());return new e(this.firstLineNumber,r.split(` -`))}toString(){return this.lines.join(` -`)}};var Rp={red:ue,gray:Nr,dim:Ie,bold:W,underline:X,highlightSource:e=>e.highlight()},Ap={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ip({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function _p({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Ip({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=cn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Dp(c),d=kp(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,Gs.default)(i,g).slice(g)}}return s}function kp(e){let r=Object.keys(De.ModelAction).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Dp(e){let r=0;for(let t=0;t{if("rejectOnNotFound"in n.args){let o=Ar({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new H(o,{clientVersion:r})}return await t(n).catch(o=>{throw o instanceof V&&o.code==="P2025"?new Oe(`No ${e} found`,r):o})}}function Se(e){return e.replace(/^./,r=>r.toLowerCase())}var Np=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Mp=["aggregate","count","groupBy"];function ki(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[$p(e,r),jp(e,r),et(t),te("name",()=>r),te("$name",()=>r),te("$parent",()=>e._appliedParent)];return Pe({},n)}function $p(e,r){let t=Se(r),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Js(o,r,e._clientVersion,s);let a=l=>u=>{let c=We(e._errorFormat);return e._createPrismaPromise(p=>{let d={args:u,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:p,callsite:c};return s({...d,...l})})};return Np.includes(o)?_i(e,r,a):qp(i)?Ns(e,i,a):a({})}}}function qp(e){return Mp.includes(e)}function jp(e,r){return nr(te("fields",()=>{let t=e._runtimeDataModel.models[r];return Ms(r,t)}))}function Ws(e){return e.replace(/^./,r=>r.toUpperCase())}var Di=Symbol();function it(e){let r=[Vp(e),te(Di,()=>e),te("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(et(t)),Pe(e,r)}function Vp(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Se),n=[...new Set(r.concat(t))];return nr({getKeys(){return n},getPropertyValue(i){let o=Ws(i);if(e._runtimeDataModel.models[o]!==void 0)return ki(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ki(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Hs(e){return e[Di]?e[Di]:e}function Ks(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return it(r)}function Ys({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(yr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(yr(u))}Bp(e,l.needs)&&s.push(Up(l,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function Bp(e,r){return r.every(t=>ci(e,t))}function Up(e,r){return nr(te(e.name,()=>e.compute(r)))}function pn({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=pn({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Zs({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:pn({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(s,a,l)=>Ys({result:s,modelName:Se(a),select:l.select,omit:l.omit,extensions:n})})}function Xs(e){if(e instanceof ie)return Qp(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:Xs(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=oa(o,l),a.args=s,ra(e,a,t,n+1)}})})}function ta(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return ra(e,r,s)}function na(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?ia(t,n,0,e):e(t)}}function ia(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=oa(i,l),ia(a,r,t+1,n)}})}var ea=e=>e;function oa(e=ea,r=ea){return t=>e(r(t))}function aa(e,r,t){let n=Se(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Gp({...e,...sa(r.name,e,r.result.$allModels),...sa(r.name,e,r.result[n])})}function Gp(e){let r=new xe,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return gr(e,n=>({...n,needs:t(n.name,new Set)}))}function sa(e,r,t){return t?gr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Jp(r,o,i)})):{}}function Jp(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function la(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function ua(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 dn=class{constructor(r,t){this.extension=r;this.previous=t;this.computedFieldsCache=new xe;this.modelExtensionsCache=new xe;this.queryCallbacksCache=new xe;this.clientExtensions=Hr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Hr(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r})}getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>aa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Se(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()}},mn=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new dn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new dn(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 ca=L("prisma:client"),pa={Vercel:"vercel","Netlify CI":"netlify"};function da({postinstall:e,ciName:r,clientVersion:t}){if(ca("checkPlatformCaching:postinstall",e),ca("checkPlatformCaching:ciName",r),e===!0&&r&&r in pa){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${pa[r]}-build`;throw console.error(n),new R(n,t)}}function ma(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Wp="Cloudflare-Workers",Hp="node";function fa(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Wp?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hp?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Kp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function fn(){let e=fa();return{id:e,prettyName:Kp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var ba=k(require("fs")),st=k(require("path"));function gn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${Yp(e)}`}function Yp(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ai({...r,binaryTargets:o})}function He(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function Ke(e){let{searchedLocations:r}=e;return`The following locations have been searched: -${[...new Set(r)].map(i=>` ${i}`).join(` -`)}`}function ga(e){let{runtimeBinaryTarget:r}=e;return`${He(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". -${gn(e)} - -${Ke(e)}`}function hn(e){return`We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`}function yn(e){let{errorStack:r}=e;return r?.match(/\/\.next|\/next@|\/next\//)?` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function ha(e){let{queryEngineName:r}=e;return`${He(e)}${yn(e)} - -This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. -Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". - -${hn("engine-not-found-bundler-investigation")} - -${Ke(e)}`}function ya(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${He(e)} - -This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". -${gn(e)} - -${Ke(e)}`}function Ea(e){let{queryEngineName:r}=e;return`${He(e)}${yn(e)} - -This is likely caused by tooling that has not copied "${r}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". - -${hn("engine-not-found-tooling-investigation")} - -${Ke(e)}`}var zp=L("prisma:client:engines:resolveEnginePath"),Zp=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function wa(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await Xp(e,r);if(zp("enginePath",n),n!==void 0&&e==="binary"&&Xn(n),n!==void 0)return r.prismaPath=n;let o=await er(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Zp())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:xa(e,o),expectedLocation:st.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=ya(c):l?p=ga(c):u?p=ha(c):p=Ea(c),new R(p,r.clientVersion)}async function Xp(engineType,config){let binaryTarget=await er(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,st.default.resolve(dirname,".."),config.generator?.output?.value??dirname,st.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(qo());for(let e of searchLocations){let r=xa(engineType,binaryTarget),t=st.default.join(e,r);if(searchedLocations.push(e),ba.default.existsSync(t))return{enginePath:t,searchedLocations}}return{enginePath:void 0,searchedLocations}}function xa(e,r){return e==="library"?At(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var Oi=k(ui());function Pa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function va(e){return e.split(` -`).map(r=>r.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var Ta=k(is());function Ca({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,Ta.default)({user:r,repo:t,template:n,title:e,body:i})}function Sa({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=go(6e3-(s?.length??0)),l=va((0,Oi.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",c=(0,Oi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${r?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?Pa(s):""} -\`\`\` -`),p=Ca({title:t,body:c});return`${t} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${X(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}function Ir({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new R(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new R("error: Missing URL environment variable, value, or override.",n);return i}var En=class extends Error{constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends En{constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function A(e,r){return{...e,isRetryable:r}}var _r=class extends se{constructor(t){super("This request must be retried",A(t,!0));this.name="ForcedRetryError";this.code="P5001"}};w(_r,"ForcedRetryError");var sr=class extends se{constructor(t,n){super(t,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(sr,"InvalidDatasourceError");var ar=class extends se{constructor(t,n){super(t,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(ar,"NotImplementedYetError");var $=class extends se{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 lr=class extends ${constructor(t){super("Schema needs to be uploaded",A(t,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lr,"SchemaMissingError");var Li="This request could not be understood by the server",at=class extends ${constructor(t,n,i){super(n||Li,A(t,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(at,"BadRequestError");var lt=class extends ${constructor(t,n){super("Engine not started: healthcheck timeout",A(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(lt,"HealthcheckTimeoutError");var ut=class extends ${constructor(t,n,i){super(n,A(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(ut,"EngineStartupError");var ct=class extends ${constructor(t){super("Engine version is not supported",A(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(ct,"EngineVersionNotSupportedError");var Fi="Request timed out",pt=class extends ${constructor(t,n=Fi){super(n,A(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(pt,"GatewayTimeoutError");var ed="Interactive transaction error",dt=class extends ${constructor(t,n=ed){super(n,A(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(dt,"InteractiveTransactionError");var rd="Request parameters are invalid",mt=class extends ${constructor(t,n=rd){super(n,A(t,!1));this.name="InvalidRequestError";this.code="P5011"}};w(mt,"InvalidRequestError");var Ni="Requested resource does not exist",ft=class extends ${constructor(t,n=Ni){super(n,A(t,!1));this.name="NotFoundError";this.code="P5003"}};w(ft,"NotFoundError");var Mi="Unknown server error",kr=class extends ${constructor(t,n,i){super(n||Mi,A(t,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(kr,"ServerError");var $i="Unauthorized, check your connection string",gt=class extends ${constructor(t,n=$i){super(n,A(t,!1));this.name="UnauthorizedError";this.code="P5007"}};w(gt,"UnauthorizedError");var qi="Usage exceeded, retry again later",ht=class extends ${constructor(t,n=qi){super(n,A(t,!0));this.name="UsageExceededError";this.code="P5008"}};w(ht,"UsageExceededError");async function td(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 yt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await td(e);if(n.type==="QueryEngineError")throw new V(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new kr(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new ct(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new ut(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new R(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new lt(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new mt(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new gt(t,Dr($i,n));if(e.status===404)return new ft(t,Dr(Ni,n));if(e.status===429)throw new ht(t,Dr(qi,n));if(e.status===504)throw new pt(t,Dr(Fi,n));if(e.status>=500)throw new kr(t,Dr(Mi,n));if(e.status>=400)throw new at(t,Dr(Li,n))}function Dr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Ra(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Aa(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=Ne[s]+Ne[a]+Ne[l]+Ne[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=Ne[s]+Ne[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=Ne[s]+Ne[a]+Ne[l]+"="),t}function Ia(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new R("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function nd(e){return e[0]*1e3+e[1]/1e6}function _a(e){return new Date(nd(e))}var ka={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Et=class extends se{constructor(t,n){super(`Cannot fetch data from service: -${t}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(Et,"RequestError");async function ur(e,r,t=n=>n){let n=r.clientVersion;try{return typeof fetch=="function"?await t(fetch)(e,r):await t(ji)(e,r)}catch(i){let o=i.message??"Unknown error";throw new Et(o,{clientVersion:n})}}function od(e){return{...e.headers,"Content-Type":"application/json"}}function sd(e){return{method:e.method,headers:od(e)}}function ad(e,r){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:r.statusCode>=200&&r.statusCode<=299,status:r.statusCode,url:r.url,headers:new Vi(r.headers)}}async function ji(e,r={}){let t=ld("https"),n=sd(r),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=t.request(e,n,u=>{let{statusCode:c,headers:{location:p}}=u;c>=301&&c<=399&&p&&(p.startsWith("http")===!1?s(ji(`${o}${p}`,r)):s(ji(p,r))),u.on("data",d=>i.push(d)),u.on("end",()=>s(ad(i,u))),u.on("error",a)});l.on("error",a),l.end(r.body??"")})}var ld=typeof require<"u"?require:()=>{},Vi=class{constructor(r={}){this.headers=new Map;for(let[t,n]of Object.entries(r))if(typeof n=="string")this.headers.set(t,n);else if(Array.isArray(n))for(let i of n)this.headers.set(t,i)}append(r,t){this.headers.set(r,t)}delete(r){this.headers.delete(r)}get(r){return this.headers.get(r)??null}has(r){return this.headers.has(r)}set(r,t){this.headers.set(r,t)}forEach(r,t){for(let[n,i]of this.headers)r.call(t,i,n,this)}};var ud=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Da=L("prisma:client:dataproxyEngine");async function cd(e,r){let t=ka["@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&&ud.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=pd(`<=${a}.${l}.${u}`),p=await ur(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Da("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 ar("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Oa(e,r){let t=await cd(e,r);return Da("version",t),t}function pd(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var La=3,Bi=L("prisma:client:dataproxyEngine"),Ui=class{constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,interactiveTransaction:t}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-transaction-id"]=t.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}},bt=class{constructor(r){this.name="DataProxyEngine";Ia(r),this.config=r,this.env={...r.env,...typeof process<"u"?process.env:{}},this.inlineSchema=Aa(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,t]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new Ui({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Oa(r,this.config),Bi("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:_a(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),r?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await ur(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Bi("schema response status",t.status);let n=await yt(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Er(r,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t});return a.map(u=>"errors"in u&&u.errors.length>0?or(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ur(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||Bi("graphql response status",a.status),await this.handleError(await yt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?or(l.errors[0],this.config.clientVersion,this.config.activeProvider):new B(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ur(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await yt(l,this.clientVersion));let u=await l.json(),c=u.extensions;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 ur(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await yt(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],n=Ir({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new sr(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new sr(`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 sr(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);return[s,l]}metrics(){throw new ar("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 se)||!i.isRetryable)throw i;if(t>=La)throw i instanceof _r?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${La} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ra(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof lr)throw await this.uploadSchema(),new _r({clientVersion:this.clientVersion,cause:r});if(r)throw r}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Fa(e){if(e?.kind==="itx")return e.options.id}var Gi=k(require("os")),Na=k(require("path"));var Qi=Symbol("PrismaLibraryEngineCache");function dd(){let e=globalThis;return e[Qi]===void 0&&(e[Qi]={}),e[Qi]}function md(e){let r=dd();if(r[e]!==void 0)return r[e];let t=Na.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Gi.default.constants.dlopen.RTLD_LAZY|Gi.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ma={async loadLibrary(e){let r=await Bn(),t=await wa("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>md(t))}catch(n){let i=ei({e:n,platformInfo:r,id:t});throw new R(i,e.clientVersion)}}};var Ji,$a={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new R(`The \`adapter\` option for \`PrismaClient\` is required in this context (${fn().prettyName})`,r);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",r);Ji===void 0&&(Ji=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new R("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await Ji;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var fd="P2036",Re=L("prisma:client:libraryEngine");function gd(e){return e.item_type==="query"&&"query"in e}function hd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var qa=[...Mn,"native"],ja=0,wt=class{constructor(r,t){this.name="LibraryEngine";this.libraryLoader=t??Ma,r.engineWasm!==void 0&&(this.libraryLoader=t??$a),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("library")||ja===10&&console.warn(`${fe("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}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=JSON.stringify(t),o;if(r==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else r==="commit"?o=await this.engine?.commitTransaction(n.id,i):r==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(yd(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new V(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Nn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await er();if(!qa.includes(r))throw new R(`Unknown ${ue("PRISMA_QUERY_ENGINE_LIBRARY")} ${ue(W(r))}. Possible binaryTargets: ${Me(qa.join(", "))} or a path to the query engine library. -You may have to run ${Me("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this),{adapter:t}=this.config;t&&Re("Using driver adapter: %O",t),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{r.deref()?.logger(n)},t),ja++}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new R(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);if(t){if("span"in t){this.config.tracingHelper.createEngineSpan(t);return}t.level=t?.level.toLowerCase()??"unknown",gd(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):hd(t)?this.loggerRustPanic=new le(Wi(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.config.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 R(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return 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.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof R)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(Wi(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Er(r,t);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Fa(t));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(r){if(r.user_facing_error.is_panic)return new le(Wi(this,r.user_facing_error.message),this.config.clientVersion);let t=this.getExternalAdapterError(r.user_facing_error);return t?t.error:or(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r){if(r.error_code===fd&&this.config.adapter){let t=r.meta?.id;jt(typeof t=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(t);return jt(n,"External error with reported id was not registered"),n}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function yd(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Wi(e,r){return Sa({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Va({copyEngine:e=!0},r){let t;try{t=Ir({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}e&&t?.startsWith("prisma://")&&Wr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Ur(r.generator),i=!!(t?.startsWith("prisma://")||!e),o=!!r.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?t?.startsWith("prisma://")?l=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new H(l.join(` -`),{clientVersion:r.clientVersion})}if(i)return new bt(r);if(s)return new wt(r);throw new H("Invalid client engine type, please use `library` or `binary`",{clientVersion:r.clientVersion})}function bn({generator:e}){return e?.previewFeatures??[]}var Wa=k(Hi());function Ga(e,r){let t=Ja(e),n=Ed(t),i=wd(n);i?wn(i,r):r.addErrorMessage(()=>"Unknown error")}function Ja(e){return e.errors.flatMap(r=>r.kind==="Union"?Ja(r):[r])}function Ed(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:bd(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function bd(e,r){return[...new Set(e.concat(r))]}function wd(e){return di(e,(r,t)=>{let n=Ua(r),i=Ua(t);return n!==i?n-i:Qa(r)-Qa(t)})}function Ua(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function Qa(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var de=class{constructor(r,t){this.name=r;this.value=t;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};var xn=class{constructor(){this.fields=[]}addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Cr,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function wn(e,r){switch(e.kind){case"MutuallyExclusiveFields":xd(e,r);break;case"IncludeOnScalar":Pd(e,r);break;case"EmptySelection":vd(e,r);break;case"UnknownSelectionField":Sd(e,r);break;case"UnknownArgument":Rd(e,r);break;case"UnknownInputField":Ad(e,r);break;case"RequiredArgumentMissing":Id(e,r);break;case"InvalidArgumentType":_d(e,r);break;case"InvalidArgumentValue":kd(e,r);break;case"ValueTooLarge":Dd(e,r);break;case"SomeFieldsMissing":Od(e,r);break;case"TooManyFieldsGiven":Ld(e,r);break;case"Union":Ga(e,r);break;default:throw new Error("not implemented: "+e.kind)}}function xd(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 Pd(e,r){let[t,n]=Pn(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new de(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)}. ${xt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function vd(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(t){let n=t.getField("omit")?.value.asObject();if(n){Td(e,r,n);return}}Cd(e,r)}function Td(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new de(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 Cd(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ya(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function Sd(e,r){let[t,n]=Pn(e.selectionPath),i=r.arguments.getDeepSubSelectionValue(t)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Ya(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),Fd(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Nd(l,e.outputType))}r.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(xt(s)),a.join(" ")})}function Rd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Md(n,e.arguments)),r.addErrorMessage(i=>Ha(i,t,e.arguments.map(o=>o.name)))}function Ad(e,r){let[t,n]=Pn(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&za(o,e.inputType)}r.addErrorMessage(o=>Ha(o,n,e.inputType.fields.map(s=>s.name)))}function Ha(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=qd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(xt(e)),n.join(" ")}function Id(e,r){let t;r.addErrorMessage(l=>t?.value instanceof J&&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]=Pn(e.argumentPath),s=new xn,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 de(o,s).makeRequired())}else{let l=e.inputTypes.map(Ka).join(" | ");a.addSuggestion(new de(o,l).makeRequired())}}function Ka(e){return e.kind==="list"?`${Ka(e.elementType)}[]`:e.name}function _d(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=vn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function kd(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=vn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Dd(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 J&&(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 Od(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&&za(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${vn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(xt(i)),o.join(" ")})}function Ld(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 ${vn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ya(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new de(t.name,"true"))}function Fd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new de(t.name,"true"))}function Nd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new de(t.name,"true"))}function Md(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new de(t.name,t.typeNames.join(" | ")))}function za(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new de(t.name,t.typeNames.join(" | ")))}function Pn(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function xt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function vn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var $d=3;function qd(e,r){let t=1/0,n;for(let i of r){let o=(0,Wa.default)(e,i);o>$d||o({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.model?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};var rl=e=>({command:e});var tl=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Pt(e){try{return nl(e,"fast")}catch{return nl(e,"slow")}}function nl(e,r){return JSON.stringify(e.map(t=>Kd(t,r)))}function Kd(e,r){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:wr(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Te.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Yd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&r==="slow"?ol(e):e}function Yd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ol(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(il);let r={};for(let t of Object.keys(e))r[t]=il(e[t]);return r}function il(e){return typeof e=="bigint"?e.toString():ol(e)}var zd=/^(\s*alter\s)/i,sl=L("prisma:client");function zi(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&zd.exec(r))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Zi=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Pt(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Pt(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=tl(t),i={values:Pt(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?sl(`prisma.${e}(${n}, ${i.values})`):sl(`prisma.${e}(${n})`),{query:n,parameters:i}},al={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new ie(r,t)}},ll={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Xi(e){return function(t){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=ul(t(o))):ul(t(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ul(e){return typeof e.then=="function"?e:Promise.resolve(e)}var cl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,r){return r()}},eo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}createEngineSpan(r){return this.getGlobalTracingHelper().createEngineSpan(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??cl}};function pl(e){return e.includes("tracing")?new eo:cl}function dl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}var Zd=["$connect","$disconnect","$on","$transaction","$use","$extends"],ml=Zd;function fl(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var Cn=class{constructor(){this._middlewares=[]}use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var hl=k(ui());function Sn(e){return typeof e.batchRequestIdx=="number"}function Rn(e){return e===null?e:Array.isArray(e)?e.map(Rn):typeof e=="object"?Xd(e)?em(e):gr(e,Rn):e}function Xd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function em({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":return Buffer.from(r,"base64");case"DateTime":return new Date(r);case"Decimal":return new Te(r);case"Json":return JSON.parse(r);default:rr(r,"Unknown tagged value")}}function gl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(ro(e.query.arguments)),r.push(ro(e.query.selection)),r.join("")}function ro(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${ro(n)})`:t}).join(" ")})`}var rm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function to(e){return rm[e]}var An=class{constructor(r){this.options=r;this.tickActive=!1;this.batches={}}request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>to(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:nm(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"?yl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:to(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:gl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s}){if(tm(r),im(r,i)||r instanceof Oe)throw r;if(r instanceof V&&om(r)){let l=El(r.meta);Tn({args:o,errors:[l],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion})}let a=r.message;if(n&&(a=Ar({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),r.code){let l=s?{modelName:s,...r.meta}:r.meta;throw new V(a,{code:r.code,clientVersion:this.client._clientVersion,meta:l,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(a,this.client._clientVersion);if(r instanceof B)throw new B(a,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof R)throw new R(a,this.client._clientVersion);if(r instanceof le)throw new le(a,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,hl.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.values(r)[0],o=t.filter(a=>a!=="select"&&a!=="include"),s=Rn(Ii(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function nm(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:yl(e)};rr(e,"Unknown transaction kind")}}function yl(e){return{id:e.id,payload:e.payload}}function im(e,r){return Sn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function om(e){return e.code==="P2009"||e.code==="P2012"}function El(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(El)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var bl="5.15.0";var wl=bl;function xl(e){return e.map(r=>{let t={};for(let n of Object.keys(r))t[n]=Pl(r[n]);return t})}function Pl({prisma__type:e,prisma__value:r}){switch(e){case"bigint":return BigInt(r);case"bytes":return Buffer.from(r,"base64");case"decimal":return new Te(r);case"datetime":case"date":return new Date(r);case"time":return new Date(`1970-01-01T${r}Z`);case"array":return r.map(Pl);default:return r}}var Sl=k(Hi());var q=class extends Error{constructor(r){super(r+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(q,"PrismaClientConstructorValidationError");var vl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Tl=["pretty","colorless","minimal"],Cl=["info","query","warn","error"],am={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Or(t,r)||` Available datasources: ${r.join(", ")}`;throw new q(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!bn(r).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ur()==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Tl.includes(e)){let r=Or(e,Tl);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!Cl.includes(t)){let n=Or(t,Cl);throw new q(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Or(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Or(t,r);throw new q(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Rl(e,r){for(let[t,n]of Object.entries(e)){if(!vl.includes(t)){let i=Or(t,vl);throw new q(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}am[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Or(e,r){if(r.length===0||typeof e!="string")return"";let t=lm(e,r);return t?` Did you mean "${t}"?`:""}function lm(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,Sl.default)(e,i)}));t.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Sn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Ye=L("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var um={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},cm=Symbol.for("prisma.client.transaction.id"),pm={id:0,nextId(){return++this.id}};function Ll(e){class r{constructor(n){this._originalClient=this;this._middlewares=new Cn;this._createPrismaPromise=Xi();this.$extends=Ks;e=n?.__internal?.configOverride?.(e)??e,da(e),n&&Rl(n,e);let i=n?.adapter?yi(n.adapter):void 0,o=new Dl.EventEmitter().on("error",()=>{});this._extensions=mn.empty(),this._previewFeatures=bn(e),this._clientVersion=e.clientVersion??wl,this._activeProvider=e.activeProvider,this._tracingHelper=pl(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&vt.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&vt.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=!i&&Br(s,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&L.enable("prisma:client");let p=vt.default.resolve(e.dirname,e.relativePath);Ol.default.existsSync(p)||(p=e.dirname),Ye("dirname",e.dirname),Ye("relativePath",e.relativePath),Ye("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:vt.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&fl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ma(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Ir,getBatchRequestPayload:Er,prismaGraphQLToJSError:or,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:L("prisma:client:accelerateEngine"),engineVersion:_l.version,clientVersion:e.clientVersion}},Ye("clientVersion",e.clientVersion),this._engine=Va(e,this._engineConfig),this._requestHandler=new In(this,o),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{Jr.log(`${Jr.tags[g]??""}`,h.message||h.query)})}this._metrics=new hr(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=it(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ho()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Il(n,i);return zi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new H("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(zi(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new H(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:rl,callsite:We(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(xl)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Il(n,i));throw new H("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=pm.nextId(),s=dl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Al(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return it(Pe(Hs(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Xi(n)),te(cm,()=>n.id),yr(ml)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??um,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,I=>c(u,T=>(I?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await ta(this,g);return g.model?Zs({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new kl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>Za({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return L.enabled("prisma:client")&&(Ye("Prisma Client call:"),Ye(`prisma.${i}(${_s(n)})`),Ye("Generated request:"),Ye(JSON.stringify(h,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new H("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return r}function Il(e,r){return dm(e)?[new ie(e,r),al]:[e,ll]}function dm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var mm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Fl(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!mm.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function Nl(e){Br(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.4.3 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/src/prisma/client-pg/runtime/react-native.js b/src/prisma/client-pg/runtime/react-native.js deleted file mode 100644 index e863441..0000000 --- a/src/prisma/client-pg/runtime/react-native.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict";var ea=Object.create;var Qt=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ye=(e,t)=>{for(var r in t)Qt(e,r,{get:t[r],enumerable:!0})},jn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ra(t))!ia.call(e,i)&&i!==r&&Qt(e,i,{get:()=>t[i],enumerable:!(n=ta(t,i))||n.enumerable});return e};var fe=(e,t,r)=>(r=e!=null?ea(na(e)):{},jn(t||!e||!e.__esModule?Qt(r,"default",{value:e,enumerable:!0}):r,e)),Dr=e=>jn(Qt({},"__esModule",{value:!0}),e);var y,c=Se(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=Se(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=Se(()=>{"use strict";E=()=>{};E.prototype=E});var b,d=Se(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var oi=ce(tt=>{"use strict";m();c();p();f();d();var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oa=Jn(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=R;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=A);var L=F===A?0:4-F%4;return[F,L]}function l(C){var A=a(C),F=A[0],L=A[1];return(F+L)*3/4-L}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),L=F[0],N=F[1],M=new n(u(C,L,N)),k=0,z=N>0?L-4:L,j;for(j=0;j>16&255,M[k++]=A>>8&255,M[k++]=A&255;return N===2&&(A=r[C.charCodeAt(j)]<<2|r[C.charCodeAt(j+1)]>>4,M[k++]=A&255),N===1&&(A=r[C.charCodeAt(j)]<<10|r[C.charCodeAt(j+1)]<<4|r[C.charCodeAt(j+2)]>>2,M[k++]=A>>8&255,M[k++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,A,F){for(var L,N=[],M=A;Mz?z:k+M));return L===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):L===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),sa=Jn(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,R=n?-1:1,C=t[r+v];for(v+=R,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=R,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=R,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,R=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=R/u:r+=R*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=F*128}}),Br=oa(),Xe=sa(),Un=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=T;tt.SlowBuffer=fa;tt.INSPECT_MAX_BYTES=50;var Jt=2147483647;tt.kMaxLength=Jt;T.TYPED_ARRAY_SUPPORT=aa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function aa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Re(e){if(e>Jt)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ur(e)}return Wn(e,t,r)}T.poolSize=8192;function Wn(e,t,r){if(typeof e=="string")return ua(e,t);if(ArrayBuffer.isView(e))return ca(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return Hn(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=pa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return Wn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Gn(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function la(e,t,r){return Gn(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}T.alloc=function(e,t,r){return la(e,t,r)};function Ur(e){return Gn(e),Re(e<0?0:qr(e)|0)}T.allocUnsafe=function(e){return Ur(e)};T.allocUnsafeSlow=function(e){return Ur(e)};function ua(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Kn(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function $r(e){let t=e.length<0?0:qr(e.length)|0,r=Re(t);for(let n=0;n=Jt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Jt.toString(16)+" bytes");return e|0}function fa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Kn(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return jr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ii(e).length;default:if(i)return n?-1:jr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=Kn;function da(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Pa(this,t,r);case"utf8":case"utf-8":return Yn(this,t,r);case"ascii":return xa(this,t,r);case"latin1":case"binary":return va(this,t,r);case"base64":return ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function qe(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Un&&(T.prototype[Un]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Qr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:qn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):qn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return ma(this,e,t,r);case"utf8":case"utf-8":return ga(this,e,t,r);case"ascii":case"latin1":case"binary":return ha(this,e,t,r);case"base64":return ya(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ba(e,t,r){return t===0&&r===e.length?Br.fromByteArray(e):Br.fromByteArray(e.slice(t,r))}function Yn(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ea(n)}var Vn=4096;function Ea(e){let t=e.length;if(t<=Vn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=_e(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=_e(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),Xe.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),Xe.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Xe.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Xe.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Zn(e,t,r,n,i){ni(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function Xn(e,t,r,n,i){ni(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=_e(function(e,t=0){return Zn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=_e(function(e,t=0){return Xn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=_e(function(e,t=0){return Zn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=_e(function(e,t=0){return Xn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ti(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Xe.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ti(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ti(this,e,t,!1,r)};function ri(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Xe.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ri(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ri(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Qn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Qn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Qn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ca(e,t,r){et(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&yt(t,e.length-(r+1))}function ni(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ze.ERR_OUT_OF_RANGE("value",a,e)}Ca(n,i,o)}function et(e,t){if(typeof e!="number")throw new Ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function yt(e,t,r){throw Math.floor(e)!==e?(et(e,r),new Ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ze.ERR_BUFFER_OUT_OF_BOUNDS:new Ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Aa=/[^+/0-9A-Za-z-_]/g;function Sa(e){if(e=e.split("=")[0],e=e.trim().replace(Aa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function jr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ra(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ii(e){return Br.toByteArray(Sa(e))}function Wt(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Qr(e){return e!==e}var Oa=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function _e(e){return typeof BigInt>"u"?Fa:e}function Fa(){throw new Error("BigInt not supported")}});var w,m=Se(()=>{"use strict";w=fe(oi())});function Ma(){return!1}var _a,La,Gt,Gr=Se(()=>{"use strict";m();c();p();f();d();_a={},La={existsSync:Ma,promises:_a},Gt=La});var gi=ce((gf,mi)=>{"use strict";m();c();p();f();d();mi.exports=(zr(),Dr(Kr)).format});var Kr={};Ye(Kr,{default:()=>Xa,deprecate:()=>yi,format:()=>bi,inspect:()=>wi,promisify:()=>hi});function hi(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function yi(e,t){return(...r)=>(console.warn(t),e(...r))}function wi(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var bi,Za,Xa,zr=Se(()=>{"use strict";m();c();p();f();d();bi=gi(),Za={promisify:hi,deprecate:yi,inspect:wi,format:bi},Xa=Za});function il(...e){return e.join("/")}function ol(...e){return e.join("/")}var Ti,sl,al,we,en=Se(()=>{"use strict";m();c();p();f();d();Ti="/",sl={sep:Ti},al={resolve:il,posix:sl,join:ol,sep:Ti},we=al});var Ci=ce(()=>{"use strict";m();c();p();f();d()});var Ri=ce((fd,Si)=>{"use strict";m();c();p();f();d();Si.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Oi=ce((wd,ki)=>{"use strict";m();c();p();f();d();var ul=Ri();ki.exports=e=>{let t=ul(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Kt,Fi=Se(()=>{"use strict";m();c();p();f();d();Kt=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var _i=ce((Yd,Mi)=>{"use strict";m();c();p();f();d();Mi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ni=ce((um,Ii)=>{"use strict";m();c();p();f();d();Ii.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var nn=ce((gm,Di)=>{"use strict";m();c();p();f();d();var ml=Ni();Di.exports=e=>typeof e=="string"?e.replace(ml(),""):e});var Bi=ce((_m,Yt)=>{"use strict";m();c();p();f();d();Yt.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`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 r=new URL(`${t}/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(",")}r.searchParams.set(i,o)}}return r.toString()};Yt.exports.default=Yt.exports});var qi=ce((ky,wl)=>{wl.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Vi=ce(()=>{"use strict";m();c();p();f();d()});var Fn=ce((cA,ls)=>{"use strict";m();c();p();f();d();ls.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sZr,Decimal:()=>ve,Extensions:()=>Jr,MetricsClient:()=>nt,NotFoundError:()=>Oe,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>G,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>H,PrismaClientValidationError:()=>Y,Public:()=>Wr,Sql:()=>se,defineDmmfProperty:()=>Ui,empty:()=>Ji,getPrismaClient:()=>Ys,getRuntime:()=>Zo,join:()=>Qi,makeStrictEnum:()=>Zs,objectEnumValues:()=>Xt,raw:()=>dn,sqltag:()=>mn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Dr(fp);m();c();p();f();d();var Jr={};Ye(Jr,{defineExtension:()=>si,getExtensionContext:()=>ai});m();c();p();f();d();m();c();p();f();d();function si(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();f();d();function ai(e){return e}var Wr={};Ye(Wr,{validator:()=>li});m();c();p();f();d();m();c();p();f();d();function li(...e){return t=>t}m();c();p();f();d();m();c();p();f();d();var Ht={};Ye(Ht,{$:()=>di,bgBlack:()=>Qa,bgBlue:()=>Ha,bgCyan:()=>za,bgGreen:()=>Wa,bgMagenta:()=>Ka,bgRed:()=>Ja,bgWhite:()=>Ya,bgYellow:()=>Ga,black:()=>ja,blue:()=>Je,bold:()=>de,cyan:()=>ke,dim:()=>wt,gray:()=>xt,green:()=>Et,grey:()=>Va,hidden:()=>Ba,inverse:()=>Da,italic:()=>Na,magenta:()=>Ua,red:()=>Ve,reset:()=>Ia,strikethrough:()=>$a,underline:()=>bt,white:()=>qa,yellow:()=>Qe});m();c();p();f();d();var Hr,ui,ci,pi,fi=!0;typeof y<"u"&&({FORCE_COLOR:Hr,NODE_DISABLE_COLORS:ui,NO_COLOR:ci,TERM:pi}=y.env||{},fi=y.stdout&&y.stdout.isTTY);var di={enabled:!ui&&ci==null&&pi!=="dumb"&&(Hr!=null&&Hr!=="0"||fi)};function U(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!di.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ia=U(0,0),de=U(1,22),wt=U(2,22),Na=U(3,23),bt=U(4,24),Da=U(7,27),Ba=U(8,28),$a=U(9,29),ja=U(30,39),Ve=U(31,39),Et=U(32,39),Qe=U(33,39),Je=U(34,39),Ua=U(35,39),ke=U(36,39),qa=U(37,39),xt=U(90,39),Va=U(90,39),Qa=U(40,49),Ja=U(41,49),Wa=U(42,49),Ga=U(43,49),Ha=U(44,49),Ka=U(45,49),za=U(46,49),Ya=U(47,49);m();c();p();f();d();var el=100,Ei=["green","yellow","blue","magenta","cyan","red"],vt=[],xi=Date.now(),tl=0,Yr=typeof y<"u"?y.env:{};globalThis.DEBUG??=Yr.DEBUG??"";globalThis.DEBUG_COLORS??=Yr.DEBUG_COLORS?Yr.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e,i;typeof require=="function"&&typeof y<"u"&&typeof y.stderr<"u"&&typeof y.stderr.write=="function"?i=(...o)=>{try{let s=(zr(),Dr(Kr));y.stderr.write(s.format(...o)+` -`)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function rl(e){let t={color:Ei[tl++%Ei.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&vt.push([o,...n]),vt.length>el&&vt.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:nl(g)),u=`+${Date.now()-xi}ms`;xi=Date.now(),globalThis.DEBUG_COLORS?a(Ht[s](de(o)),...l,Ht[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Zr=new Proxy(rl,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function nl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function vi(e=7500){let t=vt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Le||={});m();c();p();f();d();en();function tn(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var At={};Ye(At,{error:()=>fl,info:()=>pl,log:()=>cl,query:()=>dl,should:()=>Li,tags:()=>Ct,warn:()=>rn});m();c();p();f();d();var Ct={error:Ve("prisma:error"),warn:Qe("prisma:warn"),info:ke("prisma:info"),query:Je("prisma:query")},Li={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function cl(...e){console.log(...e)}function rn(e,...t){Li.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function pl(e,...t){console.info(`${Ct.info} ${e}`,...t)}function fl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function dl(e,...t){console.log(`${Ct.query} ${e}`,...t)}m();c();p();f();d();function zt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();f();d();function We(e,t){throw new Error(t)}m();c();p();f();d();function on(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();f();d();var sn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();f();d();function rt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();f();d();function an(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$i.has(e)||($i.add(e),rn(t,...r))};m();c();p();f();d();var G=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(G,"PrismaClientKnownRequestError");var Oe=class extends G{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(Oe,"NotFoundError");m();c();p();f();d();var V=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(V,"PrismaClientInitializationError");m();c();p();f();d();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(ue,"PrismaClientRustPanicError");m();c();p();f();d();var H=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(H,"PrismaClientUnknownRequestError");m();c();p();f();d();var Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(Y,"PrismaClientValidationError");m();c();p();f();d();var nt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();f();d();m();c();p();f();d();function Rt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Ui(e,t){let r=Rt(()=>gl(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function gl(e){return{datamodel:{models:ln(e.models),enums:ln(e.enums),types:ln(e.types)}}}function ln(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();f();d();var Zt=Symbol(),un=new WeakMap,Fe=class{constructor(t){t===Zt?un.set(this,`Prisma.${this._getName()}`):un.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return un.get(this)}},kt=class extends Fe{_getNamespace(){return"NullTypes"}},Ot=class extends kt{};cn(Ot,"DbNull");var Ft=class extends kt{};cn(Ft,"JsonNull");var Mt=class extends kt{};cn(Mt,"AnyNull");var Xt={classes:{DbNull:Ot,JsonNull:Ft,AnyNull:Mt},instances:{DbNull:new Ot(Zt),JsonNull:new Ft(Zt),AnyNull:new Mt(Zt)}};function cn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();function _t(e){return{ok:!1,error:e,map(){return _t(e)},flatMap(){return _t(e)}}}var pn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},fn=e=>{let t=new pn,r=Ge(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ge(t,e.queryRaw.bind(e)),executeRaw:Ge(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>hl(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=yl(t,e.getConnectionInfo.bind(e))),n},hl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ge(e,t.queryRaw.bind(t)),executeRaw:Ge(e,t.executeRaw.bind(t)),commit:Ge(e,t.commit.bind(t)),rollback:Ge(e,t.rollback.bind(t))});function Ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}function yl(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}var zs=fe(qi());var wk=fe(Vi());Fi();Gr();en();m();c();p();f();d();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();f();d();m();c();p();f();d();var er={enumerable:!0,configurable:!0,writable:!0};function tr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>er,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Wi=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=bl(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Gi(Reflect.ownKeys(o),r),a=Gi(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...er,...l?.getPropertyDescriptor(s)}:er:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Wi]=function(){let o={...this};return delete o[Wi],o},i}function bl(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Gi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();f();d();function it(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();f();d();function rr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();f();d();m();c();p();f();d();var ot=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();f();d();m();c();p();f();d();function Hi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();f();d();function st(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function nr(e){return e.toString()!=="Invalid Date"}m();c();p();f();d();m();c();p();f();d();var at=9e15,Be=1e9,gn="0123456789abcdef",or="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},Zi,Me,I=!0,lr="[DecimalError] ",De=lr+"Invalid argument: ",Xi=lr+"Precision limit exceeded",eo=lr+"crypto unavailable",to="[object Decimal]",te=Math.floor,J=Math.pow,El=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,xl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ro=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,_=7,Pl=9007199254740991,Tl=or.length-1,yn=sr.length-1,S={toStringTag:to};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};S.ceil=function(){return O(new this.constructor(this),this.e+1,2)};S.clampedTo=S.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};S.comparedTo=S.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};S.cosine=S.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+_,n.rounding=1,r=Cl(n,ao(n,r)),n.precision=e,n.rounding=t,O(Me==2||Me==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};S.cubeRoot=S.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(I=!1,o=g.s*J(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=J(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=$(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return I=!0,O(n,e,h.rounding,t)};S.decimalPlaces=S.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/_))*_,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};S.dividedBy=S.div=function(e){return $(this,new this.constructor(e))};S.dividedToIntegerBy=S.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};S.equals=S.eq=function(e){return this.cmp(e)===0};S.floor=function(){return O(new this.constructor(this),this.e+1,3)};S.greaterThan=S.gt=function(e){return this.cmp(e)>0};S.greaterThanOrEqualTo=S.gte=function(e){var t=this.cmp(e);return t==1||t===0};S.hyperbolicCosine=S.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};S.hyperbolicSine=S.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=lt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/cr(5,e)),i=lt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};S.hyperbolicTangent=S.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};S.inverseCosine=S.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?me(r,i,o):new r(0):new r(NaN):t.isZero()?me(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=me(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};S.inverseHyperbolicCosine=S.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};S.inverseHyperbolicSine=S.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!0,n.precision=e,n.rounding=t,r.ln())};S.inverseHyperbolicTangent=S.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};S.inverseSine=S.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=me(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};S.inverseTangent=S.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=yn)return s=me(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=yn)return s=me(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/_+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/_),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};S.isNaN=function(){return!this.s};S.isNegative=S.isNeg=function(){return this.s<0};S.isPositive=S.isPos=function(){return this.s>0};S.isZero=function(){return!!this.d&&this.d[0]===0};S.lessThan=S.lt=function(e){return this.cmp(e)<0};S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1};S.logarithm=S.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,R=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(I=!1,a=h+R,s=Ne(u,a),n=t?ar(g,a+10):Ne(e,a),l=$(s,n,a,1),It(l.d,i=h,v))do if(a+=10,s=Ne(u,a),n=t?ar(g,a+10):Ne(e,a),l=$(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(It(l.d,i+=10,v));return I=!0,O(l,h,v)};S.minus=S.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,R=this,C=R.constructor;if(e=new C(e),!R.d||!e.d)return!R.s||!e.s?e=new C(NaN):R.d?e.s=-e.s:e=new C(e.d||R.s!==e.s?R:NaN),e;if(R.s!=e.s)return e.s=-e.s,R.plus(e);if(u=R.d,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(R);else return new C(l===3?-0:0);return I?O(e,a,l):e}if(r=te(e.e/_),g=te(R.e/_),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/_),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/ge|0,u[i]%=ge;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=ur(u,n),I?O(e,a,l):e};S.precision=S.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=no(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};S.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};S.sine=S.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+_,n.rounding=1,r=Sl(n,ao(n,r)),n.precision=e,n.rounding=t,O(Me>2?r.neg():r,e,t,!0)):new n(NaN)};S.squareRoot=S.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(I=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=te((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return I=!0,O(n,l,g.rounding,e)};S.tangent=S.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Me==2||Me==4?r.neg():r,e,t,!0)):new n(NaN)};S.times=S.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,R=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!R||!R[0])return new h(!e.s||v&&!v[0]&&!R||R&&!R[0]&&!v?NaN:!v||!R?e.s/0:e.s*0);for(r=te(g.e/_)+te(e.e/_),l=v.length,u=R.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+R[n]*v[i-n-1]+t,o[i--]=a%ge|0,t=a/ge|0;o[i]=(o[i]+t)%ge|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=ur(o,r),I?O(e,h.precision,h.rounding):e};S.toBinary=function(e,t){return En(this,2,e,t)};S.toDecimalPlaces=S.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),O(r,e+r.e+1,t))};S.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=O(new i(n),e+1,t),r=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};S.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=xe(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=O(new o(i),e+i.e+1,t),r=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};S.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,R=this,C=R.d,A=R.constructor;if(!C)return new A(R);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=no(C)-R.e-1,s=o%_,t.d[0]=J(10,s<0?_+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(I=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*_*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=R.s,v=$(u,n,o,1).minus(R).abs().cmp($(l,r,o,1).minus(R).abs())<1?[u,n]:[l,r],A.precision=g,I=!0,v};S.toHexadecimal=S.toHex=function(e,t){return En(this,16,e,t)};S.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(I=!1,r=$(r,e,0,t,1).times(e),I=!0,O(r)):(e.s=r.s,r=e),r};S.toNumber=function(){return+this};S.toOctal=function(e,t){return En(this,8,e,t)};S.toPower=S.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(J(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=te(e.e/_),t>=e.d.length-1&&(r=u<0?-u:u)<=Pl)return i=io(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(I=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=wn(e.times(Ne(a,n+r)),n),i.d&&(i=O(i,n+5,1),It(i.d,n,o)&&(t=n+10,i=O(wn(e.times(Ne(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,I=!0,l.rounding=o,O(i,n,o))};S.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=O(new i(n),e,t),r=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};S.toSignificantDigits=S.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),O(new n(r),e,t)};S.toString=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};S.truncated=S.trunc=function(){return O(new this.constructor(this),this.e+1,1)};S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function It(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=_,i=0):(i=Math.ceil((t+1)/_),t%=_),o=J(10,_-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==J(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==J(10,t-3)-1,s}function ir(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Cl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,R,C,A,F,L,N,M,k,z,j,ht,Q,ie,Ae,X,ze,Vt=n.constructor,Nr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new Vt(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Nr*0:Nr/0);for(l?(R=1,g=n.e-i.e):(l=ge,R=_,g=te(n.e/R)-te(i.e/R)),X=B.length,ie=ee.length,L=new Vt(Nr),N=L.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?(j=o=Vt.precision,s=Vt.rounding):a?j=o+(n.e-i.e)+1:j=o,j<0)N.push(1),C=!0;else{if(j=j/R+2|0,h=0,X==1){for(v=0,B=B[0],j++;(h1&&(B=e(B,v,l),ee=e(ee,v,l),X=B.length,ie=ee.length),Q=X,M=ee.slice(0,X),k=M.length;k=l/2&&++Ae;do v=0,u=t(B,M,X,k),u<0?(z=M[0],X!=k&&(z=z*l+(M[1]||0)),v=z/Ae|0,v>1?(v>=l&&(v=l-1),A=e(B,v,l),F=A.length,k=M.length,u=t(A,M,F,k),u==1&&(v--,r(A,X=10;v/=10)h++;L.e=h+g*R-1,O(L,a?o+L.e+1:o,s,C)}return L}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,R=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=_,s=t,g=h[v=0],l=g/J(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/_),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=_,s=o-_+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=_,s=o-_+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%J(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/J(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=J(10,(_-t%_)%_),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=J(10,_-o),h[v]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==ge&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=ge)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return I&&(e.e>R.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function ur(e,t){var r=e[0];for(t*=_;r>=10;r/=10)t++;return t}function ar(e,t,r){if(t>Tl)throw I=!0,r&&(e.precision=r),Error(Xi);return O(new e(or),t,1,!0)}function me(e,t,r){if(t>yn)throw Error(Xi);return O(new e(sr),t,r,!0)}function no(e){var t=e.length-1,r=t*_+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function io(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/_+4);for(I=!1;;){if(r%2&&(o=o.times(t),zi(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),zi(t.d,s)}return I=!0,o}function Ki(e){return e.d[e.d.length-1]&1}function oo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,l=C):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(J(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&It(s.d,l-n,R,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=C,R,I=!0);else return v.precision=C,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,g,h,v,R=1,C=10,A=e,F=A.d,L=A.constructor,N=L.rounding,M=L.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new L(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(I=!1,g=M):g=t,L.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),R++;o=A.e,n>1?(A=new L("0."+r),o++):A=new L(n+"."+r.slice(1))}else return u=ar(L,g+2,M).times(o+""),A=Ne(new L(n+"."+r.slice(1)),g-C).plus(u),L.precision=M,t==null?O(A,M,N,I=!0):A;for(h=A,l=s=A=$(A.minus(1),A.plus(1),g,1),v=O(A.times(A),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus($(s,new L(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(ar(L,g+2,M).times(o+""))),l=$(l,new L(R),g,1),t==null)if(It(l.d,g-C,N,a))L.precision=g+=C,u=s=A=$(h.minus(1),h.plus(1),g,1),v=O(A.times(A),g,1),i=a=1;else return O(l,L.precision=M,N,I=!0);else return L.precision=M,l;l=u,i+=2}}function so(e){return String(e.s*e.s/0)}function bn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%_,r<0&&(n+=_),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ro.test(t))return bn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(xl.test(t))r=16,t=t.toLowerCase();else if(El.test(t))r=2;else if(vl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=io(n,new n(r),o,o*2)),u=ir(t,r,ge),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=ur(u,g),e.d=u,I=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),I=!0,e)}function Sl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/cr(5,r)),t=lt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function lt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/_);for(I=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return I=!0,s.d.length=h+1,s}function cr(e,t){for(var r=e;--t;)r*=e;return r}function ao(e,t){var r,n=t.s<0,i=me(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Ki(r)?n?2:3:n?4:1,t;Me=Ki(r)?n?1:4:n?3:2}return t.minus(i).abs()}function En(e,t,r,n){var i,o,s,a,l,u,g,h,v,R=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=R.rounding:ae(n,0,8)):(r=R.precision,n=R.rounding),!e.isFinite())g=so(e);else{for(g=xe(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new R(1),v.e=g.length-s,v.d=ir(xe(v),10,i),v.e=v.d.length),h=ir(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new R(e),e.d=h,e.e=o,e=$(e,v,r,n,0,i),h=e.d,o=e.e,u=Zi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ir(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Rl(e){return new this(e).abs()}function kl(e){return new this(e).acos()}function Ol(e){return new this(e).acosh()}function Fl(e,t){return new this(e).plus(t)}function Ml(e){return new this(e).asin()}function _l(e){return new this(e).asinh()}function Ll(e){return new this(e).atan()}function Il(e){return new this(e).atanh()}function Nl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=me(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?me(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=me(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=me(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function Dl(e){return new this(e).cbrt()}function Bl(e){return O(e=new this(e),e.e+1,2)}function $l(e,t,r){return new this(e).clamp(t,r)}function jl(e){if(!e||typeof e!="object")throw Error(lr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-at,0,"toExpPos",0,at,"maxE",0,at,"minE",-at,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=hn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(eo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Ul(e){return new this(e).cos()}function ql(e){return new this(e).cosh()}function lo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Yi(o)){u.s=o.s,I?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;I?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(eo);else for(;o=10;i/=10)n++;n<_&&(r-=_-n)}return s.e=r,s.d=a,s}function nu(e){return O(e=new this(e),e.e+1,this.rounding)}function iu(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ou(e){return new this(e).sin()}function su(e){return new this(e).sinh()}function au(e){return new this(e).sqrt()}function lu(e,t){return new this(e).sub(t)}function uu(){var e=0,t=arguments,r=new this(t[e]);for(I=!1;r.s&&++e`}};function ct(e){return e instanceof Nt}m();c();p();f();d();m();c();p();f();d();var pr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();f();d();var fr=e=>e,dr={bold:fr,red:fr,green:fr,dim:fr,enabled:!1},uo={bold:de,red:Ve,green:Et,dim:wt,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();f();d();var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();f();d();var $e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ft=class extends $e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new pr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};m();c();p();f();d();var co=": ",mr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+co.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(co).write(this.value)}};m();c();p();f();d();var gr=class e extends $e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ft&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(pt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();f();d();var K=class extends $e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var xn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function hr(e){return new xn(po(e))}function po(e){let t=new gr;for(let[r,n]of Object.entries(e)){let i=new mr(r,fo(n));t.addField(i)}return t}function fo(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(ut(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=nr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Fe?new K(`Prisma.${e._getName()}`):ct(e)?new K(`prisma.${Hi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?mu(e):typeof e=="object"?po(e):new K(Object.prototype.toString.call(e))}function mu(e){let t=new ft;for(let r of e)t.addItem(fo(r));return t}function mo(e){if(e===void 0)return"";let t=hr(e);return new ot(0,{colors:dr}).write(t).toString()}m();c();p();f();d();var gu="P2037";function yr({error:e,user_facing_error:t},r,n){return t.error_code?new G(hu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new H(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function hu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===gu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var Dt="";function go(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=bu(n)||xu(n)||Tu(n)||Ru(n)||Au(n);return i&&r.push(i),r},[])}var yu=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wu=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bu(e){var t=yu.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=wu.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Dt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Eu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function xu(e){var t=Eu.exec(e);return t?{file:t[2],methodName:t[1]||Dt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Pu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tu(e){var t=vu.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Pu.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Dt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Cu=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Au(e){var t=Cu.exec(e);return t?{file:t[3],methodName:t[1]||Dt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Su=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ru(e){var t=Su.exec(e);return t?{file:t[2],methodName:t[1]||Dt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vn=class{getLocation(){return null}},Pn=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=go(t).find(i=>{if(!i.file)return!1;let o=tn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function je(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new vn:new Pn}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var ho={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Ou(e);return Object.entries(t).reduce((n,[i,o])=>(ho[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ou(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function wr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function yo(e,t){let r=wr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}m();c();p();f();d();function Fu(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function Mu(e={}){return typeof e.select=="object"?t=>wr(e)(t)._count:t=>wr(e)(t)._count._all}function wo(e,t){return t({action:"count",unpacker:Mu(e),argsMapper:Fu})(e)}m();c();p();f();d();function _u(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Lu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function bo(e,t){return t({action:"groupBy",unpacker:Lu(e),argsMapper:_u})(e)}function Eo(e,t,r){if(t==="aggregate")return n=>yo(n,r);if(t==="count")return n=>wo(n,r);if(t==="groupBy")return n=>bo(n,r)}m();c();p();f();d();function xo(e,t){let r=t.fields.filter(i=>!i.relationName),n=sn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Nt(e,o,s.type,s.isList,s.kind==="enum")},...tr(Object.keys(n))})}m();c();p();f();d();m();c();p();f();d();var vo=e=>Array.isArray(e)?e:e.split("."),Tn=(e,t)=>vo(t).reduce((r,n)=>r&&r[n],e),Po=(e,t,r)=>vo(t).reduceRight((n,i,o,s)=>Object.assign({},Tn(e,s.slice(0,o)),{[i]:n}),r);function Iu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nu(e,t,r){return t===void 0?e??{}:Po(t,r,e||!0)}function Cn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=je(e._errorFormat),g=Iu(n,i),h=Nu(l,o,g),v=r({dataPath:g,callsite:u})(h),R=Du(e,t);return new Proxy(v,{get(C,A){if(!R.includes(A))return C[A];let L=[a[A].type,r,A],N=[g,h];return Cn(e,...L,...N)},...tr([...R,...Object.getOwnPropertyNames(v)])})}}function Du(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();f();d();m();c();p();f();d();var Ro=fe(_i());m();c();p();f();d();Gr();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var To={keyword:ke,entity:ke,value:e=>de(Je(e)),punctuation:Je,directive:ke,function:ke,variable:e=>de(Je(e)),string:e=>de(Et(e)),boolean:Qe,number:ke,comment:xt};var Bu=e=>e,br={},$u=0,D={manual:br.Prism&&br.Prism.manual,disableWorkerMessageHandler:br.Prism&&br.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof he){let t=e;return new he(t.type,D.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(D.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof he)continue;if(z&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(k?h[1].length:0),v=h.index+h[0].length,a=Q,l=ie;for(let B=t.length;a=l&&(++Q,ie=l);if(t[Q]instanceof he)continue;u=a-Q,Ae=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Ae),u=1}if(!h){if(o)break;continue}k&&(j=h[1]?h[1].length:0);var g=h.index+j,h=h[0].slice(j),v=g+h.length,R=Ae.slice(0,g),C=Ae.slice(v);let X=[Q,u];R&&(++Q,ie+=R.length,X.push(R));let ze=new he(A,M?D.tokenize(h,M):h,ht,h,z);if(X.push(ze),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&D.matchGrammar(e,t,r,Q,ie,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return D.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=D.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=D.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:he};D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});D.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;D.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});D.languages.markup&&D.languages.markup.tag.addInlined("script","javascript");D.languages.js=D.languages.javascript;D.languages.typescript=D.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});D.languages.ts=D.languages.typescript;function he(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}he.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return he.stringify(r,t)}).join(""):ju(e.type)(e.content)};function ju(e){return To[e]||Bu}function Co(e){return Uu(e,D.languages.javascript)}function Uu(e,t){return D.tokenize(e,t).map(n=>he.stringify(n)).join("")}m();c();p();f();d();var Ao=fe(Oi());function So(e){return(0,Ao.default)(e)}var Er=class e{static read(t){let r;try{r=Gt.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,So(n).split(` -`))}highlight(){let t=Co(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var qu={red:Ve,gray:xt,dim:wt,bold:de,underline:bt,highlightSource:e=>e.highlight()},Vu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Qu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Ju({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Qu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.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=Er.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Gu(g),v=Wu(g);if(!v)return s;s.functionName=`${v.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,v.openingBraceIndex))),u=o.highlightSource(u);let R=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(R))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+R+1;C+=2,s.callArguments=(0,Ro.default)(i,C).slice(C)}}return s}function Wu(e){let t=Object.keys(Le.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).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 Gu(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=mt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof G&&o.code==="P2025"?new Oe(`No ${e} found`,t):o})}}m();c();p();f();d();function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var Yu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Zu=["aggregate","count","groupBy"];function An(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Xu(e,t),tc(e,t),Lt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ee({},n)}function Xu(e,t){let r=Te(t),n=Object.keys(Le.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ko(o,t,e._clientVersion,s);let a=l=>u=>{let g=je(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return Yu.includes(o)?Cn(e,t,a):ec(i)?Eo(e,i,a):a({})}}}function ec(e){return Zu.includes(e)}function tc(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return xo(t,r)}))}m();c();p();f();d();function Oo(e){return e.replace(/^./,t=>t.toUpperCase())}var Sn=Symbol();function Bt(e){let t=[rc(e),ne(Sn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Lt(r)),Ee(e,t)}function rc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=Oo(i);if(e._runtimeDataModel.models[o]!==void 0)return An(e,o);if(e._runtimeDataModel.models[i]!==void 0)return An(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fo(e){return e[Sn]?e[Sn]:e}function Mo(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Bt(t)}m();c();p();f();d();m();c();p();f();d();function _o({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);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(g=>n[g]);u.length>0&&a.push(it(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(it(u))}nc(e,l.needs)&&s.push(ic(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function nc(e,t){return t.every(r=>on(e,r))}function ic(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();f();d();function xr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=xr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Io({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:xr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,l)=>_o({result:s,modelName:Te(a),select:l.select,omit:l.omit,extensions:n})})}m();c();p();f();d();m();c();p();f();d();function No(e){if(e instanceof se)return oc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:No(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=qo(o,l),a.args=s,Bo(e,a,r,n+1)}})})}function $o(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Bo(e,t,s)}function jo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Uo(r,n,0,e):e(r)}}function Uo(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=qo(i,l),Uo(a,t,r+1,n)}})}var Do=e=>e;function qo(e=Do,t=Do){return r=>e(t(r))}m();c();p();f();d();m();c();p();f();d();function Qo(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:sc({...e,...Vo(t.name,e,t.result.$allModels),...Vo(t.name,e,t.result[n])})}function sc(e){let t=new be,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return rt(e,n=>({...n,needs:r(n.name,new Set)}))}function Vo(e,t,r){return r?rt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ac(t,o,i)})):{}}function ac(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Wo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Rt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Rt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Te(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Pr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();f();d();var Go=le("prisma:client"),Ho={Vercel:"vercel","Netlify CI":"netlify"};function Ko({postinstall:e,ciName:t,clientVersion:r}){if(Go("checkPlatformCaching:postinstall",e),Go("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ho){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Ho[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();f();d();function zo(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var lc="Cloudflare-Workers",uc="node";function Yo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===lc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===uc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var cc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Zo(){let e=Yo();return{id:e,prettyName:cc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();f();d();m();c();p();f();d();var Rn=fe(nn());m();c();p();f();d();function Xo(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();f();d();function es(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}m();c();p();f();d();var pc=fe(Ci()),ts=fe(Bi());function rs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ts.default)({user:t,repo:r,template:n,title:e,body:i})}function ns({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=vi(6e3-(s?.length??0)),l=es((0,Rn.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",g=(0,Rn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?Xo(s):""} -\`\`\` -`),h=rs({title:r,body:g});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${bt(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}m();c();p();f();d();function Tr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new V(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new V("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();f();d();m();c();p();f();d();function is(e){if(e?.kind==="itx")return e.options.id}m();c();p();f();d();var kn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r})}async connect(t){return __PrismaProxy.connect(this.engineObject,t)}async disconnect(t){return __PrismaProxy.disconnect(this.engineObject,t)}query(t,r,n){return __PrismaProxy.execute(this.engineObject,t,r,n)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r){return __PrismaProxy.startTransaction(this.engineObject,t,r)}async commitTransaction(t,r){return __PrismaProxy.commitTransaction(this.engineObject,t,r)}async rollbackTransaction(t,r){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}},os={async loadLibrary(e){if(!__PrismaProxy)throw new V("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:kn}}};var fc="P2036",Ce=le("prisma:client:libraryEngine");function dc(e){return e.item_type==="query"&&"query"in e}function mc(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var RC=[...Xr,"native"],ss=0,jt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=os,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("react-native")||ss===10&&console.warn(`${Qe("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(gc(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new G(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new H("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new H("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Ce("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r),ss++}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",dc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):mc(r)?this.loggerRustPanic=new ue(On(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new H(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof V)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(On(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new H(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ce("requestBatch");let i=rr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),is(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new H(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(On(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:yr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===fc&&this.config.adapter){let r=t.meta?.id;zt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return zt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function gc(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function On(e,t){return ns({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function as({copyEngine:e=!0},t){let r;try{r=Tr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&St("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Tt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new Y(l.join(` -`),{clientVersion:t.clientVersion})}return new jt(t)}m();c();p();f();d();function Cr({generator:e}){return e?.previewFeatures??[]}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var ds=fe(Fn());m();c();p();f();d();function ps(e,t){let r=fs(e),n=hc(r),i=wc(n);i?Ar(i,t):t.addErrorMessage(()=>"Unknown error")}function fs(e){return e.errors.flatMap(t=>t.kind==="Union"?fs(t):[t])}function hc(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:yc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function yc(e,t){return[...new Set(e.concat(t))]}function wc(e){return an(e,(t,r)=>{let n=us(t),i=us(r);return n!==i?n-i:cs(t)-cs(r)})}function us(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function cs(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();f();d();var pe=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();f();d();var Sr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ar(e,t){switch(e.kind){case"MutuallyExclusiveFields":bc(e,t);break;case"IncludeOnScalar":Ec(e,t);break;case"EmptySelection":xc(e,t);break;case"UnknownSelectionField":Tc(e,t);break;case"UnknownArgument":Cc(e,t);break;case"UnknownInputField":Ac(e,t);break;case"RequiredArgumentMissing":Sc(e,t);break;case"InvalidArgumentType":Rc(e,t);break;case"InvalidArgumentValue":kc(e,t);break;case"ValueTooLarge":Oc(e,t);break;case"SomeFieldsMissing":Fc(e,t);break;case"TooManyFieldsGiven":Mc(e,t);break;case"Union":ps(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function bc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ec(e,t){let[r,n]=Rr(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Ut(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function xc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){vc(e,t,n);return}}Pc(e,t)}function vc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Pc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),hs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Ut(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Tc(e,t){let[r,n]=Rr(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),hs(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),_c(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Lc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Ut(s)),a.join(" ")})}function Cc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ic(n,e.arguments)),t.addErrorMessage(i=>ms(i,r,e.arguments.map(o=>o.name)))}function Ac(e,t){let[r,n]=Rr(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ys(o,e.inputType)}t.addErrorMessage(o=>ms(o,n,e.inputType.fields.map(s=>s.name)))}function ms(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Dc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Ut(e)),n.join(" ")}function Sc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Rr(e.argumentPath),s=new Sr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(gs).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}}function gs(e){return e.kind==="list"?`${gs(e.elementType)}[]`:e.name}function Rc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=kr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function kc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=kr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Oc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Fc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ys(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${kr("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(Ut(i)),o.join(" ")})}function Mc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${kr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function hs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function _c(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Lc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ic(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ys(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function Rr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ut({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function kr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Nc=3;function Dc(e,t){let r=1/0,n;for(let i of t){let o=(0,ds.default)(e,i);o>Nc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();f();d();var xs=e=>({command:e});m();c();p();f();d();m();c();p();f();d();var vs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();f();d();function qt(e){try{return Ps(e,"fast")}catch{return Ps(e,"slow")}}function Ps(e,t){return JSON.stringify(e.map(r=>Gc(r,t)))}function Gc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:st(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Hc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Cs(e):e}function Hc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Cs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ts);let t={};for(let r of Object.keys(e))t[r]=Ts(e[r]);return t}function Ts(e){return typeof e=="bigint"?e.toString():Cs(e)}var Kc=/^(\s*alter\s)/i,As=le("prisma:client");function Ln(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Kc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var In=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=vs(r),i={values:qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?As(`prisma.${e}(${n}, ${i.values})`):As(`prisma.${e}(${n})`),{query:n,parameters:i}},Ss={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Rs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();f();d();function Nn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=ks(r(o)):ks(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ks(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();f();d();var Os={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Dn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Os}};function Fs(e){return e.includes("tracing")?new Dn:Os}m();c();p();f();d();function Ms(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();f();d();var zc=["$connect","$disconnect","$on","$transaction","$use","$extends"],_s=zc;m();c();p();f();d();function Ls(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();f();d();var Fr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();f();d();var Ns=fe(nn());m();c();p();f();d();function Mr(e){return typeof e.batchRequestIdx=="number"}m();c();p();f();d();function _r(e){return e===null?e:Array.isArray(e)?e.map(_r):typeof e=="object"?Yc(e)?Zc(e):rt(e,_r):e}function Yc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Zc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:We(t,"Unknown tagged value")}}m();c();p();f();d();function Is(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Bn(e.query.arguments)),t.push(Bn(e.query.selection)),t.join("")}function Bn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Bn(n)})`:r}).join(" ")})`}m();c();p();f();d();var Xc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function $n(e){return Xc[e]}m();c();p();f();d();var Lr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>$n(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:tp(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ds(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:$n(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Is(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(ep(t),rp(t,i)||t instanceof Oe)throw t;if(t instanceof G&&np(t)){let l=Bs(t.meta);Or({args:o,errors:[l],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=mt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let l=s?{modelName:s,...t.meta}:t.meta;throw new G(a,{code:t.code,clientVersion:this.client._clientVersion,meta:l,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(a,this.client._clientVersion);if(t instanceof H)throw new H(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof V)throw new V(a,this.client._clientVersion);if(t instanceof ue)throw new ue(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ns.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=_r(Tn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function tp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ds(e)};We(e,"Unknown transaction kind")}}function Ds(e){return{id:e.id,payload:e.payload}}function rp(e,t){return Mr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function np(e){return e.code==="P2009"||e.code==="P2012"}function Bs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();f();d();var $s="5.15.0";var js=$s;m();c();p();f();d();function Us(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=qs(t[n]);return r})}function qs({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ve(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(qs);default:return t}}m();c();p();f();d();var Ws=fe(Fn());m();c();p();f();d();var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(q,"PrismaClientConstructorValidationError");var Vs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Qs=["pretty","colorless","minimal"],Js=["info","query","warn","error"],op={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=gt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Cr(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Tt()==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Qs.includes(e)){let t=gt(e,Qs);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Js.includes(r)){let n=gt(r,Js);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=gt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=gt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Gs(e,t){for(let[r,n]of Object.entries(e)){if(!Vs.includes(r)){let i=gt(r,Vs);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}op[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function gt(e,t){if(t.length===0||typeof e!="string")return"";let r=sp(e,t);return r?` Did you mean "${r}"?`:""}function sp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ws.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Mr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Ue=le("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var ap={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},lp=Symbol.for("prisma.client.transaction.id"),up={id:0,nextId(){return++this.id}};function Ys(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Fr;this._createPrismaPromise=Nn();this.$extends=Mo;e=n?.__internal?.configOverride?.(e)??e,Ko(e),n&&Gs(n,e);let i=n?.adapter?fn(n.adapter):void 0,o=new Kt().on("error",()=>{});this._extensions=Pr.empty(),this._previewFeatures=Cr(e),this._clientVersion=e.clientVersion??js,this._activeProvider=e.activeProvider,this._tracingHelper=Fs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&le.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);Gt.existsSync(h)||(h=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Ls(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:zo(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Tr,getBatchRequestPayload:rr,prismaGraphQLToJSError:yr,PrismaClientUnknownRequestError:H,PrismaClientInitializationError:V,PrismaClientKnownRequestError:G,debug:le("prisma:client:accelerateEngine"),engineVersion:zs.version,clientVersion:e.clientVersion}},Ue("clientVersion",e.clientVersion),this._engine=as(e,this._engineConfig),this._requestHandler=new Ir(this,o),l.log)for(let R of l.log){let C=typeof R=="string"?R:R.emit==="stdout"?R.level:null;C&&this.$on(C,A=>{At.log(`${At.tags[C]??""}`,A.message||A.query)})}this._metrics=new nt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Bt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Pi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ks(n,i);return Ln(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Ln(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xs,callsite:je(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Us)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Ks(n,i));throw new Y("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=up.nextId(),s=Ms(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Hs(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Bt(Ee(Fo(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Nn(n)),ne(lp,()=>n.id),it(_s)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??ap,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,F=>g(u,L=>(F?.end(),l(L))));let{runInTransaction:h,args:v,...R}=u,C={...n,...R};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await $o(this,C);return C.model?Io({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:R}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>ws({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return le.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${mo(n)})`),Ue("Generated request:"),Ue(JSON.stringify(A,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:R})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Ks(e,t){return cp(e)?[new se(e,t),Ss]:[e,Rs]}function cp(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();f();d();var pp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zs(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!pp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();f();d();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=react-native.js.map diff --git a/src/prisma/client-pg/runtime/wasm.js b/src/prisma/client-pg/runtime/wasm.js deleted file mode 100644 index 7850c90..0000000 --- a/src/prisma/client-pg/runtime/wasm.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict";var ko=Object.create;var Et=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Mo=Object.getOwnPropertyNames;var Io=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},Kr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mo(t))!_o.call(e,i)&&i!==r&&Et(e,i,{get:()=>t[i],enumerable:!(n=Lo(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?ko(Io(e)):{},Kr(t||!e||!e.__esModule?Et(r,"default",{value:e,enumerable:!0}):r,e)),ar=e=>Kr(Et({},"__esModule",{value:!0}),e);function lr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Uo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(v=0){return $(v,"offset"),Y(v,"offset"),q(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,C=0){let T=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=No[T];return $(C,"offset"),Y(C,"offset"),q(C,"offset",this.length-1),Fo(v,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](C,v,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function zr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function xt(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=Vo+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Fo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Hr(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function qo(e,t="utf8"){return h.from(e,t)}var h,No,Uo,Bo,$o,Vo,y,ur,u=oe(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Hr(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return lr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return $o.includes(r)}static compare(r,n){xt(r,"buff1"),xt(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return lr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){q(n,"targetStart"),q(i,"sourceStart",this.length),q(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-f:r.length),f);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),f=typeof n=="string"?0:n;return f=typeof n=="number"?f:null,f=Number.isNaN(f)?null:f,f??=o?this.length:0,f=f<0?this.length+f:f,a.length===0&&o===!1?f>=this.length?this.length:f:a.length===0&&o===!0?(f>=this.length?this.length:f)||this.length:s((v,C)=>(o?C<=f:C>=f)&&this[C]===a[0]&&a.every((O,R)=>this[C+R]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Bo.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+ur(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+ur(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");zr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};No={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Uo=new TextEncoder,Bo=new TextDecoder,$o=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Vo=4294967295;Do(h.prototype);y=new Proxy(qo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),ur=String.fromCodePoint});var g,c=oe(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var E,m=oe(()=>{"use strict";E=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var w,p=oe(()=>{"use strict";w=()=>{};w.prototype=w});var b,d=oe(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});function en(e,t){var r,n,i,o,s,a,f,v,C=e.constructor,T=C.precision;if(!e.s||!t.s)return t.s||(t=new C(e)),U?_(t,T):t;if(f=e.d,v=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(T/F),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/j|0,f[o]%=j;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,U?_(t,T):t}function le(e,t,r){if(e!==~~e||er)throw Error(Re+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(mr+V(e));if(!e.s)return new C(Z);for(t==null?(U=!1,a=T):a=t,s=new C(.03125);e.abs().gte(.1);)e=e.times(s),v+=5;for(n=Math.log(Ae(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new C(Z),C.precision=a;;){if(i=_(i.times(e),a),r=r.times(++f),s=o.plus(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;v--;)o=_(o.times(o),a);return C.precision=T,t==null?(U=!0,_(o,T)):o}o=s}}function V(e){for(var t=e.e*F,r=e.d[0];r>=10;r/=10)t++;return t}function cr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(te+"LN10 precision limit exceeded");return _(new e(e.LN10),t)}function we(e){for(var t="";e--;)t+="0";return t}function Ye(e,t){var r,n,i,o,s,a,f,v,C,T=1,O=10,R=e,L=R.d,S=R.constructor,M=S.precision;if(R.s<1)throw Error(te+(R.s?"NaN":"-Infinity"));if(R.eq(Z))return new S(0);if(t==null?(U=!1,v=M):v=t,R.eq(10))return t==null&&(U=!0),cr(S,v);if(v+=O,S.precision=v,r=ae(L),n=r.charAt(0),o=V(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=ae(R.d),n=r.charAt(0),T++;o=V(R),n>1?(R=new S("0."+r),o++):R=new S(n+"."+r.slice(1))}else return f=cr(S,v+2,M).times(o+""),R=Ye(new S(n+"."+r.slice(1)),v-O).plus(f),S.precision=M,t==null?(U=!0,_(R,M)):R;for(a=s=R=ge(R.minus(Z),R.plus(Z),v),C=_(R.times(R),v),i=3;;){if(s=_(s.times(C),v),f=a.plus(ge(s,new S(i),v)),ae(f.d).slice(0,v)===ae(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(cr(S,v+2,M).times(o+""))),a=ge(a,new S(T),v),S.precision=M,t==null?(U=!0,_(a,M)):a;a=f,i+=2}}function Yr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/F),e.d=[],n=(r+1)%F,r<0&&(n+=F),nPt||e.e<-Pt))throw Error(mr+r)}else e.s=0,e.e=0,e.d=[0];return e}function _(e,t,r){var n,i,o,s,a,f,v,C,T=e.d;for(s=1,o=T[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=F,i=t,v=T[C=0];else{if(C=Math.ceil((n+1)/F),o=T.length,C>=o)return e;for(v=o=T[C],s=1;o>=10;o/=10)s++;n%=F,i=n-F+s}if(r!==void 0&&(o=Ae(10,s-i-1),a=v/o%10|0,f=t<0||T[C+1]!==void 0||v%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?v/Ae(10,s-i):0:T[C-1])%10&1||r==(e.s<0?8:7))),t<1||!T[0])return f?(o=V(e),T.length=1,t=t-o-1,T[0]=Ae(10,(F-t%F)%F),e.e=Fe(-t/F)||0):(T.length=1,T[0]=e.e=e.s=0),e;if(n==0?(T.length=C,o=1,C--):(T.length=C+1,o=Ae(10,F-n),T[C]=i>0?(v/Ae(10,s-i)%Ae(10,i)|0)*o:0),f)for(;;)if(C==0){(T[0]+=o)==j&&(T[0]=1,++e.e);break}else{if(T[C]+=o,T[C]!=j)break;T[C--]=0,o=1}for(n=T.length;T[--n]===0;)T.pop();if(U&&(e.e>Pt||e.e<-Pt))throw Error(mr+V(e));return e}function rn(e,t){var r,n,i,o,s,a,f,v,C,T,O=e.constructor,R=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?_(t,R):t;if(f=e.d,T=t.d,n=t.e,v=e.e,f=f.slice(),s=v-n,s){for(C=s<0,C?(r=f,s=-s,a=T.length):(r=T,n=v,a=f.length),i=Math.max(Math.ceil(R/F),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=T.length,C=i0;--i)f[a++]=0;for(i=T.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+we(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+we(-i-1)+o,r&&(n=r-s)>0&&(o+=we(n))):i>=s?(o+=we(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+we(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=we(n))),e.s<0?"-"+o:o}function Xr(e,t){if(e.length>t)return e.length=t,!0}function nn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Re+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Yr(s,o.toString())}else if(typeof o!="string")throw Error(Re+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Qo.test(o))Yr(s,o);else throw Error(Re+o)}if(i.prototype=A,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=nn,i.config=i.set=Jo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Re+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Re+r+": "+n);return this}var De,jo,pr,U,te,Re,mr,Fe,Ae,Qo,Z,j,F,Zr,Pt,A,ge,pr,vt,on=oe(()=>{"use strict";u();c();m();p();d();l();De=1e9,jo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,te="[DecimalError] ",Re=te+"Invalid argument: ",mr=te+"Exponent out of range: ",Fe=Math.floor,Ae=Math.pow,Qo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,F=7,Zr=9007199254740991,Pt=Fe(Zr/F),A={};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};A.comparedTo=A.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};A.decimalPlaces=A.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*F;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};A.dividedBy=A.div=function(e){return ge(this,new this.constructor(e))};A.dividedToIntegerBy=A.idiv=function(e){var t=this,r=t.constructor;return _(ge(t,new r(e),0,1),r.precision)};A.equals=A.eq=function(e){return!this.cmp(e)};A.exponent=function(){return V(this)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){return this.cmp(e)>=0};A.isInteger=A.isint=function(){return this.e>this.d.length-2};A.isNegative=A.isneg=function(){return this.s<0};A.isPositive=A.ispos=function(){return this.s>0};A.isZero=function(){return this.s===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(te+"NaN");if(r.s<1)throw Error(te+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ge(Ye(r,o),Ye(e,o),o),U=!0,_(t,i))};A.minus=A.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rn(t,e):en(t,(e.s=-e.s,e))};A.modulo=A.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(te+"NaN");return r.s?(U=!1,t=ge(r,e,0,1).times(e),U=!0,r.minus(t)):_(new n(r),i)};A.naturalExponential=A.exp=function(){return tn(this)};A.naturalLogarithm=A.ln=function(){return Ye(this)};A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};A.plus=A.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?en(t,e):rn(t,(e.s=-e.s,e))};A.precision=A.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);if(t=V(i)+1,n=i.d.length-1,r=n*F+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};A.squareRoot=A.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(te+"NaN")}for(e=V(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(ge(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(_(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,_(n,r)};A.times=A.mul=function(e){var t,r,n,i,o,s,a,f,v,C=this,T=C.constructor,O=C.d,R=(e=new T(e)).d;if(!C.s||!e.s)return new T(0);for(e.s*=C.s,r=C.e+e.e,f=O.length,v=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?_(e,T.precision):e};A.toDecimalPlaces=A.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,De),t===void 0?t=n.rounding:le(t,0,8),_(r,e+V(r)+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Se(n,!0):(le(e,0,De),t===void 0?t=i.rounding:le(t,0,8),n=_(new i(n),e+1,t),r=Se(n,!0,e+1)),r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Se(i):(le(e,0,De),t===void 0?t=o.rounding:le(t,0,8),n=_(new o(i),e+V(i)+1,t),r=Se(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};A.toInteger=A.toint=function(){var e=this,t=e.constructor;return _(new t(e),V(e)+1,t.rounding)};A.toNumber=function(){return+this};A.toPower=A.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,v=12,C=+(e=new f(e));if(!e.s)return new f(Z);if(a=new f(a),!a.s){if(e.s<1)throw Error(te+"Infinity");return a}if(a.eq(Z))return a;if(n=f.precision,e.eq(Z))return _(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=C<0?-C:C)<=Zr){for(i=new f(Z),t=Math.ceil(n/F+4),U=!1;r%2&&(i=i.times(a),Xr(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),Xr(a.d,t);return U=!0,e.s<0?new f(Z).div(i):_(i,n)}}else if(o<0)throw Error(te+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(Ye(a,n+v)),U=!0,i=tn(i),i.s=o,i};A.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Se(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,De),t===void 0?t=o.rounding:le(t,0,8),i=_(new o(i),e,t),r=V(i),n=Se(i,e<=r||r<=o.toExpNeg,e)),n};A.toSignificantDigits=A.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,De),t===void 0?t=n.rounding:le(t,0,8)),_(new n(r),e,t)};A.toString=A.valueOf=A.val=A.toJSON=A[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=V(e),r=e.constructor;return Se(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,v,C,T,O,R,L,S,M,ne,z,Ie,k,Ce,sr,ie,bt,wt=n.constructor,Oo=n.s==i.s?1:-1,se=n.d,B=i.d;if(!n.s)return new wt(n);if(!i.s)throw Error(te+"Division by zero");for(f=n.e-i.e,ie=B.length,Ce=se.length,R=new wt(Oo),L=R.d=[],v=0;B[v]==(se[v]||0);)++v;if(B[v]>(se[v]||0)&&--f,o==null?z=o=wt.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new wt(0);if(z=z/F+2|0,v=0,ie==1)for(C=0,B=B[0],z++;(v1&&(B=e(B,C),se=e(se,C),ie=B.length,Ce=se.length),k=ie,S=se.slice(0,ie),M=S.length;M=j/2&&++sr;do C=0,a=t(B,S,ie,M),a<0?(ne=S[0],ie!=M&&(ne=ne*j+(S[1]||0)),C=ne/sr|0,C>1?(C>=j&&(C=j-1),T=e(B,C),O=T.length,M=S.length,a=t(T,S,O,M),a==1&&(C--,r(T,ie{"use strict";on();P=class extends vt{static isDecimal(t){return t instanceof vt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new vt(`0.${n.slice(0,t)}`)}}},ue=P});function Wo(){return!1}var Go,Ko,un,cn=oe(()=>{"use strict";u();c();m();p();d();l();Go={},Ko={existsSync:Wo,promises:Go},un=Ko});var xn=Te((Au,En)=>{"use strict";u();c();m();p();d();l();En.exports=(yr(),ar(hr)).format});var hr={};ze(hr,{default:()=>Yo,deprecate:()=>vn,format:()=>Tn,inspect:()=>Cn,promisify:()=>Pn});function Pn(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function vn(e,t){return(...r)=>(console.warn(t),e(...r))}function Cn(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Tn,zo,Yo,yr=oe(()=>{"use strict";u();c();m();p();d();l();Tn=xn(),zo={promisify:Pn,deprecate:vn,inspect:Cn,format:Tn},Yo=zo});function rs(...e){return e.join("/")}function ns(...e){return e.join("/")}var On,is,os,Ze,kn=oe(()=>{"use strict";u();c();m();p();d();l();On="/",is={sep:On},os={resolve:rs,posix:is,join:ns,sep:On},Ze=os});var St,Mn=oe(()=>{"use strict";u();c();m();p();d();l();St=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var _n=Te((Kc,In)=>{"use strict";u();c();m();p();d();l();In.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Nn=Te((lm,Fn)=>{"use strict";u();c();m();p();d();l();Fn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Bn=Te((gm,Un)=>{"use strict";u();c();m();p();d();l();var ms=Nn();Un.exports=e=>typeof e=="string"?e.replace(ms(),""):e});var jn=Te((Jf,gs)=>{gs.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Qn=Te(()=>{"use strict";u();c();m();p();d();l()});var Br=Te((ST,Fi)=>{"use strict";u();c();m();p();d();l();Fi.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;swr,Decimal:()=>ue,Extensions:()=>dr,MetricsClient:()=>Be,NotFoundError:()=>he,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>ye,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>W,Public:()=>fr,Sql:()=>X,defineDmmfProperty:()=>qn,empty:()=>Wn,getPrismaClient:()=>Ao,getRuntime:()=>Pe,join:()=>Jn,makeStrictEnum:()=>Ro,objectEnumValues:()=>Lt,raw:()=>kr,sqltag:()=>Lr,warnEnvConflicts:()=>void 0,warnOnce:()=>nt});module.exports=ar(Ya);u();c();m();p();d();l();var dr={};ze(dr,{defineExtension:()=>sn,getExtensionContext:()=>an});u();c();m();p();d();l();u();c();m();p();d();l();function sn(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();m();p();d();l();function an(e){return e}var fr={};ze(fr,{validator:()=>ln});u();c();m();p();d();l();u();c();m();p();d();l();function ln(...e){return t=>t}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var gr,mn,pn,dn,fn=!0;typeof g<"u"&&({FORCE_COLOR:gr,NODE_DISABLE_COLORS:mn,NO_COLOR:pn,TERM:dn}=g.env||{},fn=g.stdout&&g.stdout.isTTY);var Ho={enabled:!mn&&pn==null&&dn!=="dumb"&&(gr!=null&&gr!=="0"||fn)};function D(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ho.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var ru=D(0,0),Ct=D(1,22),Tt=D(2,22),nu=D(3,23),gn=D(4,24),iu=D(7,27),ou=D(8,28),su=D(9,29),au=D(30,39),Ne=D(31,39),hn=D(32,39),At=D(33,39),yn=D(34,39),lu=D(35,39),bn=D(36,39),uu=D(37,39),wn=D(90,39),cu=D(90,39),mu=D(40,49),pu=D(41,49),du=D(42,49),fu=D(43,49),gu=D(44,49),hu=D(45,49),yu=D(46,49),bu=D(47,49);u();c();m();p();d();l();var Xo=100,An=["green","yellow","blue","magenta","cyan","red"],Rt=[],Rn=Date.now(),Zo=0,br=typeof g<"u"?g.env:{};globalThis.DEBUG??=br.DEBUG??"";globalThis.DEBUG_COLORS??=br.DEBUG_COLORS?br.DEBUG_COLORS==="true":!0;var Xe={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e,i;typeof require=="function"&&typeof g<"u"&&typeof g.stderr<"u"&&typeof g.stderr.write=="function"?i=(...o)=>{try{let s=(yr(),ar(hr));g.stderr.write(s.format(...o)+` -`)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function es(e){let t={color:An[Zo++%An.length],enabled:Xe.enabled(e),namespace:e,log:Xe.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Rt.push([o,...n]),Rt.length>Xo&&Rt.shift(),Xe.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ts(C)),v=`+${Date.now()-Rn}ms`;Rn=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var wr=new Proxy(es,{get:(e,t)=>Xe[t],set:(e,t,r)=>Xe[t]=r});function ts(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Sn(){Rt.length=0}var ee=wr;u();c();m();p();d();l();u();c();m();p();d();l();var Er=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Ln="library";function et(e){let t=ss();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ln)}function ss(){let e=g.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u();c();m();p();d();l();u();c();m();p();d();l();var Oe;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Oe||={});var rt={};ze(rt,{error:()=>us,info:()=>ls,log:()=>as,query:()=>cs,should:()=>Dn,tags:()=>tt,warn:()=>xr});u();c();m();p();d();l();var tt={error:Ne("prisma:error"),warn:At("prisma:warn"),info:bn("prisma:info"),query:yn("prisma:query")},Dn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function as(...e){console.log(...e)}function xr(e,...t){Dn.warn()&&console.warn(`${tt.warn} ${e}`,...t)}function ls(e,...t){console.info(`${tt.info} ${e}`,...t)}function us(e,...t){console.error(`${tt.error} ${e}`,...t)}function cs(e,...t){console.log(`${tt.query} ${e}`,...t)}u();c();m();p();d();l();function Ot(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function ke(e,t){throw new Error(t)}u();c();m();p();d();l();function Pr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();m();p();d();l();var vr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});u();c();m();p();d();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();m();p();d();l();function Cr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$n.has(e)||($n.add(e),xr(t,...r))};u();c();m();p();d();l();var Q=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(Q,"PrismaClientKnownRequestError");var he=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(he,"NotFoundError");u();c();m();p();d();l();var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(I,"PrismaClientInitializationError");u();c();m();p();d();l();var ye=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(ye,"PrismaClientRustPanicError");u();c();m();p();d();l();var J=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(J,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var W=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(W,"PrismaClientValidationError");u();c();m();p();d();l();var Be=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u();c();m();p();d();l();u();c();m();p();d();l();function it(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function qn(e,t){let r=it(()=>ps(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ps(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Tr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();m();p();d();l();var kt=Symbol(),Ar=new WeakMap,be=class{constructor(t){t===kt?Ar.set(this,`Prisma.${this._getName()}`):Ar.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ar.get(this)}},ot=class extends be{_getNamespace(){return"NullTypes"}},st=class extends ot{};Rr(st,"DbNull");var at=class extends ot{};Rr(at,"JsonNull");var lt=class extends ot{};Rr(lt,"AnyNull");var Lt={classes:{DbNull:st,JsonNull:at,AnyNull:lt},instances:{DbNull:new st(kt),JsonNull:new at(kt),AnyNull:new lt(kt)}};function Rr(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function ut(e){return{ok:!1,error:e,map(){return ut(e)},flatMap(){return ut(e)}}}var Sr=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Or=e=>{let t=new Sr,r=Le(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Le(t,e.queryRaw.bind(e)),executeRaw:Le(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>ds(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=fs(t,e.getConnectionInfo.bind(e))),n},ds=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Le(e,t.queryRaw.bind(t)),executeRaw:Le(e,t.executeRaw.bind(t)),commit:Le(e,t.commit.bind(t)),rollback:Le(e,t.rollback.bind(t))});function Le(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}function fs(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}var To=_e(jn());var cO=_e(Qn());Mn();cn();kn();u();c();m();p();d();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var Mt={enumerable:!0,configurable:!0,writable:!0};function It(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Mt,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Gn=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=hs(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Kn(Reflect.ownKeys(o),r),a=Kn(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Mt,...f?.getPropertyDescriptor(s)}:Mt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Gn]=function(){let o={...this};return delete o[Gn],o},i}function hs(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Kn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function $e(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function _t(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();m();p();d();l();u();c();m();p();d();l();var Ve=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};u();c();m();p();d();l();u();c();m();p();d();l();function Hn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();m();p();d();l();function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Dt(e){return e.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(e){return P.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}u();c();m();p();d();l();var mt=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Qe(e){return e instanceof mt}u();c();m();p();d();l();u();c();m();p();d();l();var Ft=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Nt=e=>e,Ut={bold:Nt,red:Nt,green:Nt,dim:Nt,enabled:!1},zn={bold:Ct,red:Ne,green:hn,dim:Tt,enabled:!0},Je={write(e){e.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Ee=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var We=class extends Ee{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Ft(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Je,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};u();c();m();p();d();l();var Yn=": ",Bt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Yn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Yn).write(this.value)}};u();c();m();p();d();l();var $t=class e extends Ee{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let f;if(s.value instanceof e?f=s.value.getField(a):s.value instanceof We&&(f=s.value.getField(Number(a))),!f)return;s=f}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Je,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var G=class extends Ee{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Mr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Vt(e){return new Mr(Xn(e))}function Xn(e){let t=new $t;for(let[r,n]of Object.entries(e)){let i=new Bt(r,Zn(n));t.addField(i)}return t}function Zn(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(je(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Dt(e)?e.toISOString():"Invalid Date";return new G(`new Date("${t}")`)}return e instanceof be?new G(`Prisma.${e._getName()}`):Qe(e)?new G(`prisma.${Hn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?bs(e):typeof e=="object"?Xn(e):new G(Object.prototype.toString.call(e))}function bs(e){let t=new We;for(let r of e)t.addItem(Zn(r));return t}function ei(e){if(e===void 0)return"";let t=Vt(e);return new Ve(0,{colors:Ut}).write(t).toString()}u();c();m();p();d();l();var ws="P2037";function qt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(Es(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Es(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ws&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Ir=class{getLocation(){return null}};function xe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ir}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ti={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ge(e={}){let t=Ps(e);return Object.entries(t).reduce((n,[i,o])=>(ti[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ps(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function jt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ri(e,t){let r=jt(e);return t({action:"aggregate",unpacker:r,argsMapper:Ge})(e)}u();c();m();p();d();l();function vs(e={}){let{select:t,...r}=e;return typeof t=="object"?Ge({...r,_count:t}):Ge({...r,_count:{_all:!0}})}function Cs(e={}){return typeof e.select=="object"?t=>jt(e)(t)._count:t=>jt(e)(t)._count._all}function ni(e,t){return t({action:"count",unpacker:Cs(e),argsMapper:vs})(e)}u();c();m();p();d();l();function Ts(e={}){let t=Ge(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function As(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ii(e,t){return t({action:"groupBy",unpacker:As(e),argsMapper:Ts})(e)}function oi(e,t,r){if(t==="aggregate")return n=>ri(n,r);if(t==="count")return n=>ni(n,r);if(t==="groupBy")return n=>ii(n,r)}u();c();m();p();d();l();function si(e,t){let r=t.fields.filter(i=>!i.relationName),n=vr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...It(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var ai=e=>Array.isArray(e)?e:e.split("."),_r=(e,t)=>ai(t).reduce((r,n)=>r&&r[n],e),li=(e,t,r)=>ai(t).reduceRight((n,i,o,s)=>Object.assign({},_r(e,s.slice(0,o)),{[i]:n}),r);function Rs(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ss(e,t,r){return t===void 0?e??{}:li(t,r,e||!0)}function Dr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,v)=>({...f,[v.name]:v}),{});return f=>{let v=xe(e._errorFormat),C=Rs(n,i),T=Ss(f,o,C),O=r({dataPath:C,callsite:v})(T),R=Os(e,t);return new Proxy(O,{get(L,S){if(!R.includes(S))return L[S];let ne=[a[S].type,r,S],z=[C,T];return Dr(e,...ne,...z)},...It([...R,...Object.getOwnPropertyNames(O)])})}}function Os(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u();c();m();p();d();l();u();c();m();p();d();l();var ks=_e(_n());var Ls={red:Ne,gray:wn,dim:Tt,bold:Ct,underline:gn,highlightSource:e=>e.highlight()},Ms={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Is({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function _s({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(Ds(t))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Ds(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Ke(e){let t=e.showColors?Ls:Ms,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Is(e),_s(r,t)}function ui(e,t,r,n){return e===Oe.ModelAction.findFirstOrThrow||e===Oe.ModelAction.findUniqueOrThrow?Fs(t,r,n):n}function Fs(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Ke({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new W(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new he(`No ${e} found`,t):o})}}u();c();m();p();d();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Ns=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Us=["aggregate","count","groupBy"];function Fr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Bs(e,t),Vs(e,t),ct(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Bs(e,t){let r=de(t),n=Object.keys(Oe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=f=>e._request(f);s=ui(o,t,e._clientVersion,s);let a=f=>v=>{let C=xe(e._errorFormat);return e._createPrismaPromise(T=>{let O={args:v,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:T,callsite:C};return s({...O,...f})})};return Ns.includes(o)?Dr(e,t,a):$s(i)?oi(e,i,a):a({})}}}function $s(e){return Us.includes(e)}function Vs(e,t){return Me(H("fields",()=>{let r=e._runtimeDataModel.models[t];return si(t,r)}))}u();c();m();p();d();l();function ci(e){return e.replace(/^./,t=>t.toUpperCase())}var Nr=Symbol();function pt(e){let t=[qs(e),H(Nr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(ct(r)),me(e,t)}function qs(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=ci(i);if(e._runtimeDataModel.models[o]!==void 0)return Fr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function mi(e){return e[Nr]?e[Nr]:e}function pi(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return pt(t)}u();c();m();p();d();l();u();c();m();p();d();l();function di({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let v=f.needs.filter(C=>n[C]);v.length>0&&a.push($e(v))}else if(r){if(!r[f.name])continue;let v=f.needs.filter(C=>!r[C]);v.length>0&&a.push($e(v))}js(e,f.needs)&&s.push(Qs(f,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function js(e,t){return t.every(r=>Pr(e,r))}function Qs(e,t){return Me(H(e.name,()=>e.compute(t)))}u();c();m();p();d();l();function Qt({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let v=typeof s=="object"?s:{};t[o]=Qt({visitor:i,result:t[o],args:v,modelName:f.type,runtimeDataModel:n})}}function gi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Qt({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,f)=>di({result:s,modelName:de(a),select:f.select,omit:f.omit,extensions:n})})}u();c();m();p();d();l();u();c();m();p();d();l();l();function hi(e){if(e instanceof X)return Js(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:hi(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Pi(o,f),a.args=s,bi(e,a,r,n+1)}})})}function wi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return bi(e,t,s)}function Ei(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?xi(r,n,0,e):e(r)}}function xi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Pi(i,f),xi(a,t,r+1,n)}})}var yi=e=>e;function Pi(e=yi,t=yi){return r=>e(t(r))}u();c();m();p();d();l();u();c();m();p();d();l();function Ci(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ws({...e,...vi(t.name,e,t.result.$allModels),...vi(t.name,e,t.result[n])})}function Ws(e){let t=new ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function vi(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Gs(t,o,i)})):{}}function Gs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ti(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Ai(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Jt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=it(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=it(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ci(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Wt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Jt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Jt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var Ri=ee("prisma:client"),Si={Vercel:"vercel","Netlify CI":"netlify"};function Oi({postinstall:e,ciName:t,clientVersion:r}){if(Ri("checkPlatformCaching:postinstall",e),Ri("checkPlatformCaching:ciName",t),e===!0&&t&&t in Si){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Si[t]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function ki(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Ks="Cloudflare-Workers",Hs="node";function Li(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Ks?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var zs={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Pe(){let e=Li();return{id:e,prettyName:zs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();m();p();d();l();u();c();m();p();d();l();function Gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Pe().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function Mi(e){if(e?.kind==="itx")return e.options.id}u();c();m();p();d();l();var Ur,Ii={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Pe().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Ur===void 0&&(Ur=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(f.exports),o.QueryEngine})());let i=await Ur;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ys="P2036",fe=ee("prisma:client:libraryEngine");function Xs(e){return e.item_type==="query"&&"query"in e}function Zs(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var MC=[...Er,"native"],_i=0,ft=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Ii,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("wasm")||_i===10&&console.warn(`${At("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(ea(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r),_i++}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",Xs(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Zs(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){fe(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=_t(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Mi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:f}=s;if(Array.isArray(a))return a.map(v=>v.errors&&v.errors.length>0?this.loggerRustPanic??this.buildQueryError(v.errors[0]):{data:v,elapsed:0});throw f&&f.length===1?new Error(f[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:qt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Ys&&this.config.adapter){let r=t.meta?.id;Ot(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Ot(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function ea(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}u();c();m();p();d();l();var gt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Kt=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(gt,this.config.clientVersion)}metrics(t){throw new I(gt,this.config.clientVersion)}request(t,r){throw new I(gt,this.config.clientVersion)}requestBatch(t,r){throw new I(gt,this.config.clientVersion)}applyPendingMigrations(){throw new I(gt,this.config.clientVersion)}};function Di({copyEngine:e=!0},t){let r;try{r=Gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&nt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=et(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let f;throw e?r?.startsWith("prisma://")?f=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:f=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:f=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new W(f.join(` -`),{clientVersion:t.clientVersion})}if(o)return new ft(t);if(i)return new Kt(t);{let f=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Pe().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new W(f.join(` -`),{clientVersion:t.clientVersion})}throw new W("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}u();c();m();p();d();l();function Ht({generator:e}){return e?.previewFeatures??[]}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Vi=_e(Br());u();c();m();p();d();l();function Bi(e,t){let r=$i(e),n=ta(r),i=na(n);i?zt(i,t):t.addErrorMessage(()=>"Unknown error")}function $i(e){return e.errors.flatMap(t=>t.kind==="Union"?$i(t):[t])}function ta(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ra(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ra(e,t){return[...new Set(e.concat(t))]}function na(e){return Cr(e,(t,r)=>{let n=Ni(t),i=Ni(r);return n!==i?n-i:Ui(t)-Ui(r)})}function Ni(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ui(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var re=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};u();c();m();p();d();l();var Yt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function zt(e,t){switch(e.kind){case"MutuallyExclusiveFields":ia(e,t);break;case"IncludeOnScalar":oa(e,t);break;case"EmptySelection":sa(e,t);break;case"UnknownSelectionField":ua(e,t);break;case"UnknownArgument":ca(e,t);break;case"UnknownInputField":ma(e,t);break;case"RequiredArgumentMissing":pa(e,t);break;case"InvalidArgumentType":da(e,t);break;case"InvalidArgumentValue":fa(e,t);break;case"ValueTooLarge":ga(e,t);break;case"SomeFieldsMissing":ha(e,t);break;case"TooManyFieldsGiven":ya(e,t);break;case"Union":Bi(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function ia(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function oa(e,t){let[r,n]=Xt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new re(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ht(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function sa(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){aa(e,t,n);return}}la(e,t)}function aa(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new re(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function la(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Qi(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ht(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ua(e,t){let[r,n]=Xt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),f=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Qi(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ba(a,e.outputType)):f?.hasField(n)&&(o="omit",f.getField(n)?.markAsError(),wa(f,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(ht(s)),a.join(" ")})}function ca(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ea(n,e.arguments)),t.addErrorMessage(i=>qi(i,r,e.arguments.map(o=>o.name)))}function ma(e,t){let[r,n]=Xt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ji(o,e.inputType)}t.addErrorMessage(o=>qi(o,n,e.inputType.fields.map(s=>s.name)))}function qi(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Pa(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ht(e)),n.join(" ")}function pa(e,t){let r;t.addErrorMessage(f=>r?.value instanceof G&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Xt(e.argumentPath),s=new Yt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new re(o,s).makeRequired())}else{let f=e.inputTypes.map(ji).join(" | ");a.addSuggestion(new re(o,f).makeRequired())}}function ji(e){return e.kind==="list"?`${ji(e.elementType)}[]`:e.name}function da(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Zt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function fa(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Zt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ga(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function ha(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ji(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Zt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ht(i)),o.join(" ")})}function ya(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Zt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Qi(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,"true"))}function ba(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new re(r.name,"true"))}function wa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new re(r.name,"true"))}function Ea(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function Ji(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function Xt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ht({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Zt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var xa=3;function Pa(e,t){let r=1/0,n;for(let i of t){let o=(0,Vi.default)(e,i);o>xa||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();m();p();d();l();var Hi=e=>({command:e});u();c();m();p();d();l();u();c();m();p();d();l();var zi=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();m();p();d();l();l();function yt(e){try{return Yi(e,"fast")}catch{return Yi(e,"slow")}}function Yi(e,t){return JSON.stringify(e.map(r=>Ma(r,t)))}function Ma(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qe(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:y.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ia(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Zi(e):e}function Ia(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zi(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Xi);let t={};for(let r of Object.keys(e))t[r]=Xi(e[r]);return t}function Xi(e){return typeof e=="bigint"?e.toString():Zi(e)}var _a=/^(\s*alter\s)/i,eo=ee("prisma:client");function qr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&_a.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var jr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:yt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=zi(r),i={values:yt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?eo(`prisma.${e}(${n}, ${i.values})`):eo(`prisma.${e}(${n})`),{query:n,parameters:i}},to={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},ro={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();m();p();d();l();function Qr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=no(r(o)):no(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function no(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();m();p();d();l();var io={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Jr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??io}};function oo(e){return e.includes("tracing")?new Jr:io}u();c();m();p();d();l();function so(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();m();p();d();l();var Da=["$connect","$disconnect","$on","$transaction","$use","$extends"],ao=Da;u();c();m();p();d();l();function lo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}u();c();m();p();d();l();var tr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};u();c();m();p();d();l();var co=_e(Bn());u();c();m();p();d();l();function rr(e){return typeof e.batchRequestIdx=="number"}u();c();m();p();d();l();l();function nr(e){return e===null?e:Array.isArray(e)?e.map(nr):typeof e=="object"?Fa(e)?Na(e):Ue(e,nr):e}function Fa(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Na({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return y.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:ke(t,"Unknown tagged value")}}u();c();m();p();d();l();function uo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wr(e.query.arguments)),t.push(Wr(e.query.selection)),t.join("")}function Wr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wr(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Ua={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Gr(e){return Ua[e]}u();c();m();p();d();l();var ir=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(T=>T.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),v=n.some(T=>Gr(T.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:$a(o),containsWrite:v,customDataProxyFetch:i})).map((T,O)=>{if(T instanceof Error)return T;try{return this.mapQueryEngineResult(n[O],T)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?mo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Gr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:uo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(Ba(t),Va(t,i)||t instanceof he)throw t;if(t instanceof Q&&qa(t)){let f=po(t.meta);er({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=Ke({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new Q(a,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ye(a,this.client._clientVersion);if(t instanceof J)throw new J(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(a,this.client._clientVersion);if(t instanceof ye)throw new ye(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,co.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=nr(_r(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function $a(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:mo(e)};ke(e,"Unknown transaction kind")}}function mo(e){return{id:e.id,payload:e.payload}}function Va(e,t){return rr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function qa(e){return e.code==="P2009"||e.code==="P2012"}function po(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(po)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();m();p();d();l();var fo="5.15.0";var go=fo;u();c();m();p();d();l();l();function ho(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=yo(t[n]);return r})}function yo({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return y.from(t,"base64");case"decimal":return new ue(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(yo);default:return t}}u();c();m();p();d();l();var xo=_e(Br());u();c();m();p();d();l();var N=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(N,"PrismaClientConstructorValidationError");var bo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],wo=["pretty","colorless","minimal"],Eo=["info","query","warn","error"],Qa={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new N(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=He(r,t)||` Available datasources: ${t.join(", ")}`;throw new N(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new N(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new N('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Ht(t).includes("driverAdapters"))throw new N('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(et()==="binary")throw new N('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new N(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new N(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!wo.includes(e)){let t=He(e,wo);throw new N(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new N(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Eo.includes(r)){let n=He(r,Eo);throw new N(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=He(i,o);throw new N(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new N(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new N(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new N(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new N(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=He(r,t);throw new N(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Po(e,t){for(let[r,n]of Object.entries(e)){if(!bo.includes(r)){let i=He(r,bo);throw new N(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Qa[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new N('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function He(e,t){if(t.length===0||typeof e!="string")return"";let r=Ja(e,t);return r?` Did you mean "${r}"?`:""}function Ja(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,xo.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=v=>{o||(o=!0,r(v))};for(let v=0;v{n[v]=C,a()},C=>{if(!rr(C)){f(C);return}C.batchRequestIdx===v?f(C):(i||(i=C),a())})})}var ve=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Wa={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ga=Symbol.for("prisma.client.transaction.id"),Ka={id:0,nextId(){return++this.id}};function Ao(e){class t{constructor(n){this._originalClient=this;this._middlewares=new tr;this._createPrismaPromise=Qr();this.$extends=pi;e=n?.__internal?.configOverride?.(e)??e,Oi(e),n&&Po(n,e);let i=n?.adapter?Or(n.adapter):void 0,o=new St().on("error",()=>{});this._extensions=Wt.empty(),this._previewFeatures=Ht(e),this._clientVersion=e.clientVersion??go,this._activeProvider=e.activeProvider,this._tracingHelper=oo(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=e.injectableEdgeEnv?.();try{let f=n??{},v=f.__internal??{},C=v.debug===!0;C&&ee.enable("prisma:client");let T=Ze.resolve(e.dirname,e.relativePath);un.existsSync(T)||(T=e.dirname),ve("dirname",e.dirname),ve("relativePath",e.relativePath),ve("cwd",T);let O=v.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:T,dirname:e.dirname,enableDebugLogs:C,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:Ze.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&lo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ki(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Gt,getBatchRequestPayload:_t,prismaGraphQLToJSError:qt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:To.version,clientVersion:e.clientVersion}},ve("clientVersion",e.clientVersion),this._engine=Di(e,this._engineConfig),this._requestHandler=new or(this,o),f.log)for(let R of f.log){let L=typeof R=="string"?R:R.emit==="stdout"?R.level:null;L&&this.$on(L,S=>{rt.log(`${rt.tags[L]??""}`,S.message||S.query)})}this._metrics=new Be(this._engine)}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Sn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:jr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Co(n,i);return qr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new W("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(qr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new W(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Hi,callsite:xe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:jr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(ho)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Co(n,i));throw new W("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Ka.nextId(),s=so(n.length),a=n.map((f,v)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,T={kind:"batch",id:o,index:v,isolationLevel:C,lock:s};return f.requestTransaction?.(T)??f});return vo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let v={kind:"itx",...a};f=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return f}_createItxClient(n){return pt(me(mi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>Qr(n)),H(Ga,()=>n.id),$e(ao)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Wa,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async v=>{let C=this._middlewares.get(++a);if(C)return this._tracingHelper.runInChildSpan(s.middleware,M=>C(v,ne=>(M?.end(),f(ne))));let{runInTransaction:T,args:O,...R}=v,L={...n,...R};O&&(L.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&T===!1&&delete L.transaction;let S=await wi(this,L);return L.model?gi({result:S,modelName:L.model,args:L.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:v,transaction:C,unpacker:T,otelParentCtx:O,customDataProxyFetch:R}){try{n=v?v(n):n;let L={name:"serialize"},S=this._tracingHelper.runInChildSpan(L,()=>Wi({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return ee.enabled("prisma:client")&&(ve("Prisma Client call:"),ve(`prisma.${i}(${ei(n)})`),ve("Generated request:"),ve(JSON.stringify(S,null,2)+` -`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:S,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:T,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:R})}catch(L){throw L.clientVersion=this._clientVersion,L}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new W("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Co(e,t){return Ha(e)?[new X(e,t),to]:[e,ro]}function Ha(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();m();p();d();l();var za=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ro(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!za.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm.js.map diff --git a/src/prisma/client-pg/schema.prisma b/src/prisma/client-pg/schema.prisma deleted file mode 100644 index b394121..0000000 --- a/src/prisma/client-pg/schema.prisma +++ /dev/null @@ -1,48 +0,0 @@ -generator client { - provider = "prisma-client-js" - output = "../src/prisma/client-pg" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model Customer { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - name String? - email String // @unique - address Address? - isActive Boolean @default(false) - // extraInfo Json? - orders Order[] -} - -model Address { - id Int @id @default(autoincrement()) - street String? - city String? - postalCode String? - country String? - customerId Int @unique - customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) -} - -model Order { - id Int @id @default(autoincrement()) - date DateTime - totalAmount Float - customerId Int - customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) - products Product[] @relation("OrderProducts") -} - -model Product { - id Int @id @default(autoincrement()) - name String - price Float - quantity Int - description String? - orders Order[] @relation("OrderProducts") -} diff --git a/src/prisma/client-pg/wasm-edge-light-loader.mjs b/src/prisma/client-pg/wasm-edge-light-loader.mjs new file mode 100644 index 0000000..081d3b7 --- /dev/null +++ b/src/prisma/client-pg/wasm-edge-light-loader.mjs @@ -0,0 +1,4 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +export default import('./query_engine_bg.wasm?module') \ No newline at end of file diff --git a/src/prisma/client-pg/wasm-worker-loader.mjs b/src/prisma/client-pg/wasm-worker-loader.mjs new file mode 100644 index 0000000..d38c773 --- /dev/null +++ b/src/prisma/client-pg/wasm-worker-loader.mjs @@ -0,0 +1,4 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +export default import('./query_engine_bg.wasm') \ No newline at end of file diff --git a/src/prisma/client-pg/wasm.d.ts b/src/prisma/client-pg/wasm.d.ts deleted file mode 100644 index 34c6161..0000000 --- a/src/prisma/client-pg/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index' \ No newline at end of file diff --git a/src/prisma/client-pg/wasm.js b/src/prisma/client-pg/wasm.js deleted file mode 100644 index a094a4b..0000000 --- a/src/prisma/client-pg/wasm.js +++ /dev/null @@ -1,206 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.15.0 - * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 - */ -Prisma.prismaVersion = { - client: "5.15.0", - engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.NotFoundError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.CustomerScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - name: 'name', - email: 'email', - isActive: 'isActive' -}; - -exports.Prisma.AddressScalarFieldEnum = { - id: 'id', - street: 'street', - city: 'city', - postalCode: 'postalCode', - country: 'country', - customerId: 'customerId' -}; - -exports.Prisma.OrderScalarFieldEnum = { - id: 'id', - date: 'date', - totalAmount: 'totalAmount', - customerId: 'customerId' -}; - -exports.Prisma.ProductScalarFieldEnum = { - id: 'id', - name: 'name', - price: 'price', - quantity: 'quantity', - description: 'description' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Customer: 'Customer', - Address: 'Address', - Order: 'Order', - Product: 'Product' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/src/prisma/prisma-pg.ts b/src/prisma/prisma-pg.ts index e878f01..b4ac158 100644 --- a/src/prisma/prisma-pg.ts +++ b/src/prisma/prisma-pg.ts @@ -1,223 +1,225 @@ -import { PrismaClient } from "./client-pg"; -import measure from "../lib/measure"; -import { QueryResult } from "../lib/types"; +import measure from '../lib/measure'; +import { QueryResult } from '../lib/types'; +import { PrismaClient } from './client-pg/client'; export async function prismaPg(databaseUrl: string): Promise { - console.log(`Run prisma benchmarks: `, databaseUrl); - - const prisma = new PrismaClient({ - datasourceUrl: databaseUrl, - }); - - await prisma.$connect(); - - const results: QueryResult[] = []; - - /** - * findMany - */ - - results.push(await measure("prisma-findMany", prisma.customer.findMany())); - - results.push( - await measure( - "prisma-findMany-filter-paginate-order", - prisma.customer.findMany({ - where: { isActive: true }, - orderBy: { createdAt: "desc" }, - skip: 0, - take: 10, - }) - ) - ); - - results.push( - await measure( - "prisma-findMany-1-level-nesting", - prisma.customer.findMany({ - include: { - orders: true, - }, - }) - ) - ); - - /** - * findFirst - */ - - results.push(await measure("prisma-findFirst", prisma.customer.findFirst())); - - results.push( - await measure( - "prisma-findFirst-1-level-nesting", - prisma.customer.findFirst({ - include: { - orders: true, - }, - }) - ) - ); - - /** - * findUnique - */ - - results.push( - await measure( - "prisma-findUnique", - prisma.customer.findUnique({ - where: { id: 1 }, - }) - ) - ); - - results.push( - await measure( - "prisma-findUnique-1-level-nesting", - prisma.customer.findUnique({ - where: { id: 1 }, - include: { - orders: true, - }, - }) - ) - ); - - /** - * create - */ - - results.push( - await measure( - "prisma-create", - prisma.customer.create({ - data: { - name: "John Doe", - email: "john.doe@example.com", - }, - }) - ) - ); - - results.push( - await measure( - "prisma-nested-create", - prisma.customer.create({ - data: { - name: "John Doe", - email: "john.doe@example.com", - isActive: false, - orders: { - create: { - date: new Date(), - totalAmount: 100.5, - products: { - connect: [{ id: 1 }, { id: 2 }], // Assuming products with IDs 1 and 2 already exist - }, - }, - }, - }, - }) - ) - ); - - /** - * update - */ - - results.push( - await measure( - "prisma-update", - prisma.customer.update({ - where: { id: 1 }, - data: { - name: "John Doe Updated", - }, - }) - ) - ); - - results.push( - await measure( - "prisma-nested-update", - prisma.customer.update({ - where: { id: 1 }, - data: { - name: "John Doe Updated", - address: { - update: { - street: "456 New St", - }, - }, - }, - }) - ) - ); - - /** - * upsert - */ - - results.push( - await measure( - "prisma-upsert", - prisma.customer.upsert({ - where: { id: 1 }, - update: { - name: "John Doe Upserted", - }, - create: { - name: "John Doe", - email: "john.doe@example.com", - }, - }) - ) - ); - - results.push( - await measure( - "prisma-nested-upsert", - prisma.customer.upsert({ - where: { id: 1 }, - update: { - name: "John Doe Upserted", - address: { - update: { - street: "456 New St", - }, - }, - }, - create: { - name: "John Doe", - email: "john.doe@example.com", - address: { - create: { - street: "456 New St", - city: "Anytown", - postalCode: "12345", - country: "Country", - }, - }, - }, - }) - ) - ); - - /** - * delete - */ - - results.push( - await measure( - "prisma-delete", - prisma.customer.delete({ - where: { id: 1 }, - }) - ) - ); - - await prisma.$disconnect(); - - return results; -} \ No newline at end of file + console.log(`Run prisma benchmarks: `, databaseUrl); + + const prisma = new PrismaClient({ + datasourceUrl: databaseUrl, + }); + + await prisma.$connect(); + + const results: QueryResult[] = []; + + /** + * findMany + */ + + results.push(await measure('prisma-findMany', prisma.customer.findMany())); + + results.push( + await measure( + 'prisma-findMany-filter-paginate-order', + prisma.customer.findMany({ + where: { isActive: true }, + orderBy: { createdAt: 'desc' }, + skip: 0, + take: 10, + }) + ) + ); + + results.push( + await measure( + 'prisma-findMany-1-level-nesting', + prisma.customer.findMany({ + include: { + orders: true, + }, + }) + ) + ); + + /** + * findFirst + */ + + results.push( + await measure('prisma-findFirst', prisma.customer.findFirst()) + ); + + results.push( + await measure( + 'prisma-findFirst-1-level-nesting', + prisma.customer.findFirst({ + include: { + orders: true, + }, + }) + ) + ); + + /** + * findUnique + */ + + results.push( + await measure( + 'prisma-findUnique', + prisma.customer.findUnique({ + where: { id: 1 }, + }) + ) + ); + + results.push( + await measure( + 'prisma-findUnique-1-level-nesting', + prisma.customer.findUnique({ + where: { id: 1 }, + include: { + orders: true, + }, + }) + ) + ); + + /** + * create + */ + + results.push( + await measure( + 'prisma-create', + prisma.customer.create({ + data: { + name: 'John Doe', + email: 'john.doe@example.com', + }, + }) + ) + ); + + results.push( + await measure( + 'prisma-nested-create', + prisma.customer.create({ + data: { + name: 'John Doe', + email: 'john.doe@example.com', + isActive: false, + orders: { + create: { + date: new Date(), + totalAmount: 100.5, + products: { + connect: [{ id: 1 }, { id: 2 }], // Assuming products with IDs 1 and 2 already exist + }, + }, + }, + }, + }) + ) + ); + + /** + * update + */ + + results.push( + await measure( + 'prisma-update', + prisma.customer.update({ + where: { id: 1 }, + data: { + name: 'John Doe Updated', + }, + }) + ) + ); + + results.push( + await measure( + 'prisma-nested-update', + prisma.customer.update({ + where: { id: 1 }, + data: { + name: 'John Doe Updated', + address: { + update: { + street: '456 New St', + }, + }, + }, + }) + ) + ); + + /** + * upsert + */ + + results.push( + await measure( + 'prisma-upsert', + prisma.customer.upsert({ + where: { id: 1 }, + update: { + name: 'John Doe Upserted', + }, + create: { + name: 'John Doe', + email: 'john.doe@example.com', + }, + }) + ) + ); + + results.push( + await measure( + 'prisma-nested-upsert', + prisma.customer.upsert({ + where: { id: 1 }, + update: { + name: 'John Doe Upserted', + address: { + update: { + street: '456 New St', + }, + }, + }, + create: { + name: 'John Doe', + email: 'john.doe@example.com', + address: { + create: { + street: '456 New St', + city: 'Anytown', + postalCode: '12345', + country: 'Country', + }, + }, + }, + }) + ) + ); + + /** + * delete + */ + + results.push( + await measure( + 'prisma-delete', + prisma.customer.delete({ + where: { id: 1 }, + }) + ) + ); + + await prisma.$disconnect(); + + return results; +} diff --git a/src/run-benchmarks-pg.ts b/src/run-benchmarks-pg.ts index ed6743f..4e0b80a 100644 --- a/src/run-benchmarks-pg.ts +++ b/src/run-benchmarks-pg.ts @@ -1,51 +1,96 @@ -import { preparePg } from "./lib/prepare-pg-native"; // seed via `pg_restore` +import { drizzlePg } from './drizzle/drizzle-pg'; +import { compareResults } from './lib/compare-results'; +import { preparePg } from './lib/prepare-pg-native'; // seed via `pg_restore` // import { preparePg } from "./lib/prepare-pg-prisma"; // seed via `createMany` -import writeResults from "./lib/write-results"; -import { BenchmarkOptions, MultipleBenchmarkRunResults,} from "./lib/types"; -import { prismaPg } from "./prisma/prisma-pg"; -import { typeormPg } from "./typeorm/typeorm-pg"; -import { drizzlePg } from "./drizzle/drizzle-pg"; -import { compareResults } from "./lib/compare-results"; +import { BenchmarkOptions, MultipleBenchmarkRunResults } from './lib/types'; +import writeResults from './lib/write-results'; +import { prismaPg } from './prisma/prisma-pg'; +import { writeComparisonSummary } from './summary'; +import { typeormPg } from './typeorm/typeorm-pg'; +import { zenstackPg } from './zenstack/zenstack-pg'; export default async function runBenchmarksPg( - benchmarkOptions: BenchmarkOptions + benchmarkOptions: BenchmarkOptions ) { - const { databaseUrl, iterations, size, fakerSeed } = benchmarkOptions; - - const resultsDirectoryTimestamp = Date.now().toString(); - - const prismaResults: MultipleBenchmarkRunResults = []; - for (let i = 0; i < iterations; i++) { - await preparePg({ databaseUrl, size, fakerSeed }); - const results = await prismaPg(databaseUrl); - prismaResults.push(results); - } - writeResults("prisma", "postgresql", prismaResults, benchmarkOptions, resultsDirectoryTimestamp); - - const drizzleResults: MultipleBenchmarkRunResults = []; - for (let i = 0; i < iterations; i++) { - await preparePg({ databaseUrl, size, fakerSeed }); - const results = await drizzlePg(databaseUrl); - drizzleResults.push(results); - } - writeResults("drizzle", "postgresql", drizzleResults, benchmarkOptions, resultsDirectoryTimestamp); - - const typeormResults: MultipleBenchmarkRunResults = []; - for (let i = 0; i < iterations; i++) { - await preparePg({ databaseUrl, size, fakerSeed }); - const results = await typeormPg(databaseUrl); - typeormResults.push(results); - } - writeResults("typeorm", "postgresql", typeormResults, benchmarkOptions, resultsDirectoryTimestamp); - - // Optionally compare results - if (process.env.DEBUG === 'benchmarks:compare-results') { - compareResults({ - prismaResults, - drizzleResults, - typeormResults - }); - - } + const { databaseUrl, iterations, size, fakerSeed } = benchmarkOptions; + const resultsDirectoryTimestamp = Date.now().toString(); + + const zenstackResults: MultipleBenchmarkRunResults = []; + for (let i = 0; i < iterations; i++) { + await preparePg({ databaseUrl, size, fakerSeed }); + const results = await zenstackPg(databaseUrl); + zenstackResults.push(results); + } + writeResults( + 'zenstack', + 'postgresql', + zenstackResults, + benchmarkOptions, + resultsDirectoryTimestamp + ); + + const prismaResults: MultipleBenchmarkRunResults = []; + for (let i = 0; i < iterations; i++) { + await preparePg({ databaseUrl, size, fakerSeed }); + const results = await prismaPg(databaseUrl); + prismaResults.push(results); + } + writeResults( + 'prisma', + 'postgresql', + prismaResults, + benchmarkOptions, + resultsDirectoryTimestamp + ); + + const drizzleResults: MultipleBenchmarkRunResults = []; + for (let i = 0; i < iterations; i++) { + await preparePg({ databaseUrl, size, fakerSeed }); + const results = await drizzlePg(databaseUrl); + drizzleResults.push(results); + } + writeResults( + 'drizzle', + 'postgresql', + drizzleResults, + benchmarkOptions, + resultsDirectoryTimestamp + ); + + const typeormResults: MultipleBenchmarkRunResults = []; + for (let i = 0; i < iterations; i++) { + await preparePg({ databaseUrl, size, fakerSeed }); + const results = await typeormPg(databaseUrl); + typeormResults.push(results); + } + writeResults( + 'typeorm', + 'postgresql', + typeormResults, + benchmarkOptions, + resultsDirectoryTimestamp + ); + + writeComparisonSummary( + { + zenstack: zenstackResults, + prisma: prismaResults, + drizzle: drizzleResults, + typeorm: typeormResults, + }, + 'postgresql', + benchmarkOptions, + resultsDirectoryTimestamp + ); + + // Optionally compare results + if (process.env.DEBUG === 'benchmarks:compare-results') { + compareResults({ + prismaResults, + drizzleResults, + typeormResults, + zenstackResults, + }); + } } diff --git a/src/summary.ts b/src/summary.ts new file mode 100644 index 0000000..bd77c1a --- /dev/null +++ b/src/summary.ts @@ -0,0 +1,106 @@ +import { + BenchmarkOptions, + Database, + MultipleBenchmarkRunResults, +} from './lib/types'; +import fs from 'fs'; +import path from 'path'; + +export function writeComparisonSummary( + ormResults: Record, + db: Database, + benchmarkOptions: BenchmarkOptions, + resultsDirectoryTimestamp: string +) { + const zenstackResult = ormResults['zenstack']; + if (!zenstackResult) { + console.warn('No zenstack results found for comparison summary.'); + return; + } + + const queries = zenstackResult[0].map((r) => formatQuery(r.query)); + + const medians = Object.entries(ormResults).map(([orm, result]) => { + return { + orm, + median: aggregateMedian(result), + }; + }); + + const zenstackMedian = medians.find((m) => m.orm === 'zenstack'); + if (!zenstackMedian) { + console.warn('No zenstack results found for comparison summary.'); + return; + } + + let content = `# Performance Comparison + +Iteration count: ${benchmarkOptions.iterations} +Dataset size: ${benchmarkOptions.size} + +|ORM|${queries.join('|')}| +|---|${queries.map(() => '---').join('|')}| +`; + + content += `|zenstack|${queries + .map((q) => zenstackMedian.median[q].toFixed(2)) + .join('|')}|\n`; + + for (const { orm, median } of medians) { + if (orm === 'zenstack') continue; + content += `|${orm}|${queries + .map( + (q) => + median[q].toFixed(2) + + ' ' + + diffPercentage(median[q], zenstackMedian.median[q]) + ) + .join('|')}|\n`; + } + + fs.writeFileSync( + path.join( + '.', + `results/${db}-${benchmarkOptions.size}-${benchmarkOptions.iterations}-${resultsDirectoryTimestamp}/comparison.md` + ), + content + ); +} + +function aggregateMedian( + ormResult: MultipleBenchmarkRunResults +): Record { + const series: Record = {}; + + for (const run of ormResult) { + for (const result of run) { + const q = formatQuery(result.query); + if (!series[q]) { + series[q] = []; + } + series[q].push(result.time); + } + } + + // map series to median + const medians = Object.entries(series).map(([query, times]) => { + times.sort((a, b) => a - b); + const mid = Math.floor(times.length / 2); + const median = + times.length % 2 !== 0 + ? times[mid] + : (times[mid - 1] + times[mid]) / 2; + return [query, median]; + }); + + return Object.fromEntries(medians); +} + +function formatQuery(query: string) { + return query.split('-').slice(1).join('-'); +} +function diffPercentage(value: number, baseline: number) { + const diff = value - baseline; + const percent = (diff / baseline) * 100; + return diff > 0 ? `(+${percent.toFixed(2)}%)` : `(${percent.toFixed(2)}%)`; +} diff --git a/src/typeorm/typeorm-pg.ts b/src/typeorm/typeorm-pg.ts index d1c97b6..aec7942 100644 --- a/src/typeorm/typeorm-pg.ts +++ b/src/typeorm/typeorm-pg.ts @@ -1,216 +1,236 @@ -import { DataSource } from "typeorm"; -import { Customer } from "./entities/Customer"; -import { Order } from "./entities/Order"; -import { Address } from "./entities/Address"; -import { Product } from "./entities/Product"; -import measure from "../lib/measure"; -import { QueryResult } from "../lib/types"; +import { DataSource } from 'typeorm'; +import measure from '../lib/measure'; +import { QueryResult } from '../lib/types'; +import { Address } from './entities/Address'; +import { Customer } from './entities/Customer'; +import { Order } from './entities/Order'; +import { Product } from './entities/Product'; export async function typeormPg(databaseUrl: string): Promise { - const AppDataSource = new DataSource({ - type: "postgres", - url: databaseUrl, - logging: false, - entities: [Customer, Order, Address, Product], - ssl: databaseUrl.includes("localhost") ? undefined : { rejectUnauthorized: false }, - }); - - console.log(`Run typeorm benchmarks: `, databaseUrl); - - await AppDataSource.initialize(); - - const results: QueryResult[] = []; - - /** - * findMany - */ - results.push(await measure("typeorm-findMany", AppDataSource.getRepository(Customer).find())); - - results.push( - await measure( - "typeorm-findMany-filter-paginate-order", - AppDataSource.getRepository(Customer).find({ - where: { isActive: true }, - order: { createdAt: "DESC" }, - skip: 0, - take: 10, - }) - ) - ); - - results.push( - await measure( - "typeorm-findMany-1-level-nesting", - AppDataSource.getRepository(Customer).find({ relations: ["orders"] }) - ) - ); - - /** - * findFirst - */ - - results.push( - await measure( - // not using `findOne()` because of: - // Error: You must provide selection conditions in order to find a single row. - "typeorm-findFirst", - AppDataSource.getRepository(Customer).find({ - take: 1 - }) - ) - ); - - results.push( - await measure( - // not using `findOne({ relations: ["orders"] })` because of: - // Error: You must provide selection conditions in order to find a single row. - "typeorm-findFirst-1-level-nesting", - AppDataSource.getRepository(Customer).find({ - take: 1, - relations: ["orders"], - }) - ) - ); - - /** - * findUnique - */ - results.push( - await measure("typeorm-findUnique", AppDataSource.getRepository(Customer).findOne({ where: { id: 1 } })) - ); - - results.push( - await measure( - "typeorm-findUnique-1-level-nesting", - AppDataSource.getRepository(Customer).findOne({ - where: { id: 1 }, - relations: ["orders"], - }) - ) - ); - - /** - * create - */ - results.push( - await measure( - "typeorm-create", - AppDataSource.getRepository(Customer).save({ - name: "John Doe", - email: "john.doe@example.com", - isActive: false, - }) - ) - ); - - const nestedCreate = AppDataSource.transaction(async (transactionalEntityManager) => { - // Insert customer - const customer = await transactionalEntityManager.save(Customer, { - name: "John Doe", - email: "john.doe@example.com", - isActive: false, + const AppDataSource = new DataSource({ + type: 'postgres', + url: databaseUrl, + logging: false, + entities: [Customer, Order, Address, Product], + ssl: databaseUrl.includes('localhost') + ? undefined + : { rejectUnauthorized: false }, }); - // Insert order with the associated customerId - const order = await transactionalEntityManager.save(Order, { - customer: customer, - date: new Date(), - totalAmount: 100.5, - }); + console.log(`Run typeorm benchmarks: `, databaseUrl); - // Insert products with the associated orderId - await transactionalEntityManager - .createQueryBuilder() - .insert() - .into("_OrderProducts") - .values([ - { A: order.id, B: 1 }, - { A: order.id, B: 2 }, - ]) - .execute(); - }); - results.push(await measure("typeorm-nested-create", nestedCreate)); - - /** - * update - */ - results.push( - await measure( - "typeorm-update", - AppDataSource - .getRepository(Customer) - .update( - { id: 1 }, - { name: "John Doe Updated" } - ) - ) - ); - - results.push( - await measure( - "typeorm-nested-update", - AppDataSource.transaction(async (transactionalEntityManager) => { - // Update customer name - await transactionalEntityManager - .update(Customer, { id: 1 }, { name: "John Doe Updated" }); - - // Update address - await transactionalEntityManager - .update(Address, { customer: { id: 1 } }, { street: "456 New St" }); - }) - ) - ); - - /** - * upsert - */ - results.push( - await measure( - "typeorm-upsert", - AppDataSource - .getRepository(Customer) - .save({ - id: 1, - name: "John Doe Upserted", - email: "john.doe@example.com", - isActive: false, - }) - ) - ); - - // Nested upsert operation using transaction - const nestedUpsert = AppDataSource.transaction(async (transactionalEntityManager) => { - // Upsert Customer - const customer = await transactionalEntityManager.save(Customer, { - id: 1, // Set the ID if you want to update an existing record - name: "John Doe Upserted", - email: "john.doe@example.com", - isActive: false, - }); + await AppDataSource.initialize(); - // Upsert Address - await transactionalEntityManager.save(Address, { - id: 1, // Set the ID if you want to update an existing record - customer: customer, - street: "456 New St", - city: "Anytown", - postalCode: "12345", - country: "Country", - }); - }); - results.push(await measure("typeorm-nested-upsert", nestedUpsert)); + const results: QueryResult[] = []; - /** - * delete - */ - results.push(await measure( - "typeorm-delete", - AppDataSource.getRepository(Customer).delete({ id: 1 })) - ); + /** + * findMany + */ + results.push( + await measure( + 'typeorm-findMany', + AppDataSource.getRepository(Customer).find() + ) + ); + + results.push( + await measure( + 'typeorm-findMany-filter-paginate-order', + AppDataSource.getRepository(Customer).find({ + where: { isActive: true }, + order: { createdAt: 'DESC' }, + skip: 0, + take: 10, + }) + ) + ); + + results.push( + await measure( + 'typeorm-findMany-1-level-nesting', + AppDataSource.getRepository(Customer).find({ + relations: ['orders'], + }) + ) + ); + + /** + * findFirst + */ + + results.push( + await measure( + // not using `findOne()` because of: + // Error: You must provide selection conditions in order to find a single row. + 'typeorm-findFirst', + AppDataSource.getRepository(Customer).find({ + take: 1, + }) + ) + ); + + results.push( + await measure( + // not using `findOne({ relations: ["orders"] })` because of: + // Error: You must provide selection conditions in order to find a single row. + 'typeorm-findFirst-1-level-nesting', + AppDataSource.getRepository(Customer).find({ + take: 1, + relations: ['orders'], + }) + ) + ); + + /** + * findUnique + */ + results.push( + await measure( + 'typeorm-findUnique', + AppDataSource.getRepository(Customer).findOne({ where: { id: 1 } }) + ) + ); + + results.push( + await measure( + 'typeorm-findUnique-1-level-nesting', + AppDataSource.getRepository(Customer).findOne({ + where: { id: 1 }, + relations: ['orders'], + }) + ) + ); + + /** + * create + */ + results.push( + await measure( + 'typeorm-create', + AppDataSource.getRepository(Customer).save({ + name: 'John Doe', + email: 'john.doe@example.com', + isActive: false, + }) + ) + ); + + const nestedCreate = AppDataSource.transaction( + async (transactionalEntityManager) => { + // Insert customer + const customer = await transactionalEntityManager.save(Customer, { + name: 'John Doe', + email: 'john.doe@example.com', + isActive: false, + }); + + // Insert order with the associated customerId + const order = await transactionalEntityManager.save(Order, { + customer: customer, + date: new Date(), + totalAmount: 100.5, + }); + + // Insert products with the associated orderId + await transactionalEntityManager + .createQueryBuilder() + .insert() + .into('_OrderProducts') + .values([ + { A: order.id, B: 1 }, + { A: order.id, B: 2 }, + ]) + .execute(); + } + ); + results.push(await measure('typeorm-nested-create', nestedCreate)); + + /** + * update + */ + results.push( + await measure( + 'typeorm-update', + AppDataSource.getRepository(Customer).update( + { id: 1 }, + { name: 'John Doe Updated' } + ) + ) + ); + + results.push( + await measure( + 'typeorm-nested-update', + AppDataSource.transaction(async (transactionalEntityManager) => { + // Update customer name + await transactionalEntityManager.update( + Customer, + { id: 1 }, + { name: 'John Doe Updated' } + ); + + // Update address + await transactionalEntityManager.update( + Address, + { customer: { id: 1 } }, + { street: '456 New St' } + ); + }) + ) + ); + + /** + * upsert + */ + results.push( + await measure( + 'typeorm-upsert', + AppDataSource.getRepository(Customer).save({ + id: 1, + name: 'John Doe Upserted', + email: 'john.doe@example.com', + isActive: false, + }) + ) + ); + + // Nested upsert operation using transaction + const nestedUpsert = AppDataSource.transaction( + async (transactionalEntityManager) => { + // Upsert Customer + const customer = await transactionalEntityManager.save(Customer, { + id: 1, // Set the ID if you want to update an existing record + name: 'John Doe Upserted', + email: 'john.doe@example.com', + isActive: false, + }); + + // Upsert Address + await transactionalEntityManager.save(Address, { + id: 1, // Set the ID if you want to update an existing record + customer: customer, + street: '456 New St', + city: 'Anytown', + postalCode: '12345', + country: 'Country', + }); + } + ); + results.push(await measure('typeorm-nested-upsert', nestedUpsert)); + + /** + * delete + */ + results.push( + await measure( + 'typeorm-delete', + AppDataSource.getRepository(Customer).delete({ id: 1 }) + ) + ); - await AppDataSource.destroy(); + await AppDataSource.destroy(); - return results; + return results; } // export async function closeTypeORMPg() { diff --git a/src/zenstack/schema/input.ts b/src/zenstack/schema/input.ts new file mode 100644 index 0000000..ecc66d1 --- /dev/null +++ b/src/zenstack/schema/input.ts @@ -0,0 +1,90 @@ +////////////////////////////////////////////////////////////////////////////////////////////// +// DO NOT MODIFY THIS FILE // +// This file is automatically generated by ZenStack CLI and should not be manually updated. // +////////////////////////////////////////////////////////////////////////////////////////////// + +/* eslint-disable */ + +import { type SchemaType as $Schema } from "./schema"; +import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput } from "@zenstackhq/runtime"; +import type { SimplifiedModelResult as $SimplifiedModelResult, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/runtime"; +export type CustomerFindManyArgs = $FindManyArgs<$Schema, "Customer">; +export type CustomerFindUniqueArgs = $FindUniqueArgs<$Schema, "Customer">; +export type CustomerFindFirstArgs = $FindFirstArgs<$Schema, "Customer">; +export type CustomerCreateArgs = $CreateArgs<$Schema, "Customer">; +export type CustomerCreateManyArgs = $CreateManyArgs<$Schema, "Customer">; +export type CustomerCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Customer">; +export type CustomerUpdateArgs = $UpdateArgs<$Schema, "Customer">; +export type CustomerUpdateManyArgs = $UpdateManyArgs<$Schema, "Customer">; +export type CustomerUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Customer">; +export type CustomerUpsertArgs = $UpsertArgs<$Schema, "Customer">; +export type CustomerDeleteArgs = $DeleteArgs<$Schema, "Customer">; +export type CustomerDeleteManyArgs = $DeleteManyArgs<$Schema, "Customer">; +export type CustomerCountArgs = $CountArgs<$Schema, "Customer">; +export type CustomerAggregateArgs = $AggregateArgs<$Schema, "Customer">; +export type CustomerGroupByArgs = $GroupByArgs<$Schema, "Customer">; +export type CustomerWhereInput = $WhereInput<$Schema, "Customer">; +export type CustomerSelect = $SelectInput<$Schema, "Customer">; +export type CustomerInclude = $IncludeInput<$Schema, "Customer">; +export type CustomerOmit = $OmitInput<$Schema, "Customer">; +export type CustomerGetPayload> = $SimplifiedModelResult<$Schema, "Customer", Args>; +export type AddressFindManyArgs = $FindManyArgs<$Schema, "Address">; +export type AddressFindUniqueArgs = $FindUniqueArgs<$Schema, "Address">; +export type AddressFindFirstArgs = $FindFirstArgs<$Schema, "Address">; +export type AddressCreateArgs = $CreateArgs<$Schema, "Address">; +export type AddressCreateManyArgs = $CreateManyArgs<$Schema, "Address">; +export type AddressCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Address">; +export type AddressUpdateArgs = $UpdateArgs<$Schema, "Address">; +export type AddressUpdateManyArgs = $UpdateManyArgs<$Schema, "Address">; +export type AddressUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Address">; +export type AddressUpsertArgs = $UpsertArgs<$Schema, "Address">; +export type AddressDeleteArgs = $DeleteArgs<$Schema, "Address">; +export type AddressDeleteManyArgs = $DeleteManyArgs<$Schema, "Address">; +export type AddressCountArgs = $CountArgs<$Schema, "Address">; +export type AddressAggregateArgs = $AggregateArgs<$Schema, "Address">; +export type AddressGroupByArgs = $GroupByArgs<$Schema, "Address">; +export type AddressWhereInput = $WhereInput<$Schema, "Address">; +export type AddressSelect = $SelectInput<$Schema, "Address">; +export type AddressInclude = $IncludeInput<$Schema, "Address">; +export type AddressOmit = $OmitInput<$Schema, "Address">; +export type AddressGetPayload> = $SimplifiedModelResult<$Schema, "Address", Args>; +export type OrderFindManyArgs = $FindManyArgs<$Schema, "Order">; +export type OrderFindUniqueArgs = $FindUniqueArgs<$Schema, "Order">; +export type OrderFindFirstArgs = $FindFirstArgs<$Schema, "Order">; +export type OrderCreateArgs = $CreateArgs<$Schema, "Order">; +export type OrderCreateManyArgs = $CreateManyArgs<$Schema, "Order">; +export type OrderCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Order">; +export type OrderUpdateArgs = $UpdateArgs<$Schema, "Order">; +export type OrderUpdateManyArgs = $UpdateManyArgs<$Schema, "Order">; +export type OrderUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Order">; +export type OrderUpsertArgs = $UpsertArgs<$Schema, "Order">; +export type OrderDeleteArgs = $DeleteArgs<$Schema, "Order">; +export type OrderDeleteManyArgs = $DeleteManyArgs<$Schema, "Order">; +export type OrderCountArgs = $CountArgs<$Schema, "Order">; +export type OrderAggregateArgs = $AggregateArgs<$Schema, "Order">; +export type OrderGroupByArgs = $GroupByArgs<$Schema, "Order">; +export type OrderWhereInput = $WhereInput<$Schema, "Order">; +export type OrderSelect = $SelectInput<$Schema, "Order">; +export type OrderInclude = $IncludeInput<$Schema, "Order">; +export type OrderOmit = $OmitInput<$Schema, "Order">; +export type OrderGetPayload> = $SimplifiedModelResult<$Schema, "Order", Args>; +export type ProductFindManyArgs = $FindManyArgs<$Schema, "Product">; +export type ProductFindUniqueArgs = $FindUniqueArgs<$Schema, "Product">; +export type ProductFindFirstArgs = $FindFirstArgs<$Schema, "Product">; +export type ProductCreateArgs = $CreateArgs<$Schema, "Product">; +export type ProductCreateManyArgs = $CreateManyArgs<$Schema, "Product">; +export type ProductCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Product">; +export type ProductUpdateArgs = $UpdateArgs<$Schema, "Product">; +export type ProductUpdateManyArgs = $UpdateManyArgs<$Schema, "Product">; +export type ProductUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Product">; +export type ProductUpsertArgs = $UpsertArgs<$Schema, "Product">; +export type ProductDeleteArgs = $DeleteArgs<$Schema, "Product">; +export type ProductDeleteManyArgs = $DeleteManyArgs<$Schema, "Product">; +export type ProductCountArgs = $CountArgs<$Schema, "Product">; +export type ProductAggregateArgs = $AggregateArgs<$Schema, "Product">; +export type ProductGroupByArgs = $GroupByArgs<$Schema, "Product">; +export type ProductWhereInput = $WhereInput<$Schema, "Product">; +export type ProductSelect = $SelectInput<$Schema, "Product">; +export type ProductInclude = $IncludeInput<$Schema, "Product">; +export type ProductOmit = $OmitInput<$Schema, "Product">; +export type ProductGetPayload> = $SimplifiedModelResult<$Schema, "Product", Args>; diff --git a/src/zenstack/schema/models.ts b/src/zenstack/schema/models.ts new file mode 100644 index 0000000..49be93f --- /dev/null +++ b/src/zenstack/schema/models.ts @@ -0,0 +1,13 @@ +////////////////////////////////////////////////////////////////////////////////////////////// +// DO NOT MODIFY THIS FILE // +// This file is automatically generated by ZenStack CLI and should not be manually updated. // +////////////////////////////////////////////////////////////////////////////////////////////// + +/* eslint-disable */ + +import { type SchemaType as $Schema } from "./schema"; +import { type ModelResult as $ModelResult } from "@zenstackhq/runtime"; +export type Customer = $ModelResult<$Schema, "Customer">; +export type Address = $ModelResult<$Schema, "Address">; +export type Order = $ModelResult<$Schema, "Order">; +export type Product = $ModelResult<$Schema, "Product">; diff --git a/src/zenstack/schema/schema.ts b/src/zenstack/schema/schema.ts new file mode 100644 index 0000000..602a62c --- /dev/null +++ b/src/zenstack/schema/schema.ts @@ -0,0 +1,202 @@ +////////////////////////////////////////////////////////////////////////////////////////////// +// DO NOT MODIFY THIS FILE // +// This file is automatically generated by ZenStack CLI and should not be manually updated. // +////////////////////////////////////////////////////////////////////////////////////////////// + +/* eslint-disable */ + +import { type SchemaDef, ExpressionUtils } from "@zenstackhq/runtime/schema"; +export const schema = { + provider: { + type: "postgresql" + }, + models: { + Customer: { + name: "Customer", + fields: { + id: { + name: "id", + type: "Int", + id: true, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }], + default: ExpressionUtils.call("autoincrement") + }, + createdAt: { + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }], + default: ExpressionUtils.call("now") + }, + name: { + name: "name", + type: "String", + optional: true + }, + email: { + name: "email", + type: "String" + }, + address: { + name: "address", + type: "Address", + optional: true, + relation: { opposite: "customer" } + }, + isActive: { + name: "isActive", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }], + default: false + }, + orders: { + name: "orders", + type: "Order", + array: true, + relation: { opposite: "customer" } + } + }, + idFields: ["id"], + uniqueFields: { + id: { type: "Int" } + } + }, + Address: { + name: "Address", + fields: { + id: { + name: "id", + type: "Int", + id: true, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }], + default: ExpressionUtils.call("autoincrement") + }, + street: { + name: "street", + type: "String", + optional: true + }, + city: { + name: "city", + type: "String", + optional: true + }, + postalCode: { + name: "postalCode", + type: "String", + optional: true + }, + country: { + name: "country", + type: "String", + optional: true + }, + customerId: { + name: "customerId", + type: "Int", + unique: true, + attributes: [{ name: "@unique" }], + foreignKeyFor: [ + "customer" + ] + }, + customer: { + name: "customer", + type: "Customer", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array([ExpressionUtils.field("customerId")]) }, { name: "references", value: ExpressionUtils.array([ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }], + relation: { opposite: "address", fields: ["customerId"], references: ["id"], onDelete: "Cascade" } + } + }, + idFields: ["id"], + uniqueFields: { + id: { type: "Int" }, + customerId: { type: "Int" } + } + }, + Order: { + name: "Order", + fields: { + id: { + name: "id", + type: "Int", + id: true, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }], + default: ExpressionUtils.call("autoincrement") + }, + date: { + name: "date", + type: "DateTime" + }, + totalAmount: { + name: "totalAmount", + type: "Float" + }, + customerId: { + name: "customerId", + type: "Int", + foreignKeyFor: [ + "customer" + ] + }, + customer: { + name: "customer", + type: "Customer", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array([ExpressionUtils.field("customerId")]) }, { name: "references", value: ExpressionUtils.array([ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }], + relation: { opposite: "orders", fields: ["customerId"], references: ["id"], onDelete: "Cascade" } + }, + products: { + name: "products", + type: "Product", + array: true, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("OrderProducts") }] }], + relation: { opposite: "orders", name: "OrderProducts" } + } + }, + idFields: ["id"], + uniqueFields: { + id: { type: "Int" } + } + }, + Product: { + name: "Product", + fields: { + id: { + name: "id", + type: "Int", + id: true, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }], + default: ExpressionUtils.call("autoincrement") + }, + name: { + name: "name", + type: "String" + }, + price: { + name: "price", + type: "Float" + }, + quantity: { + name: "quantity", + type: "Int" + }, + description: { + name: "description", + type: "String", + optional: true + }, + orders: { + name: "orders", + type: "Order", + array: true, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("OrderProducts") }] }], + relation: { opposite: "products", name: "OrderProducts" } + } + }, + idFields: ["id"], + uniqueFields: { + id: { type: "Int" } + } + } + }, + plugins: {} +} as const satisfies SchemaDef; +export type SchemaType = typeof schema; diff --git a/src/zenstack/schema/schema.zmodel b/src/zenstack/schema/schema.zmodel new file mode 100644 index 0000000..98405ff --- /dev/null +++ b/src/zenstack/schema/schema.zmodel @@ -0,0 +1,43 @@ +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model Customer { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + name String? + email String // @unique + address Address? + isActive Boolean @default(false) + // extraInfo Json? + orders Order[] +} + +model Address { + id Int @id @default(autoincrement()) + street String? + city String? + postalCode String? + country String? + customerId Int @unique + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) +} + +model Order { + id Int @id @default(autoincrement()) + date DateTime + totalAmount Float + customerId Int + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + products Product[] @relation("OrderProducts") +} + +model Product { + id Int @id @default(autoincrement()) + name String + price Float + quantity Int + description String? + orders Order[] @relation("OrderProducts") +} \ No newline at end of file diff --git a/src/zenstack/zenstack-pg.ts b/src/zenstack/zenstack-pg.ts new file mode 100644 index 0000000..54b384d --- /dev/null +++ b/src/zenstack/zenstack-pg.ts @@ -0,0 +1,230 @@ +import { ZenStackClient } from '@zenstackhq/runtime'; +import { PostgresDialect } from 'kysely'; +import { Pool } from 'pg'; +import measure from '../lib/measure'; +import { QueryResult } from '../lib/types'; +import { schema } from './schema/schema'; + +export async function zenstackPg(databaseUrl: string): Promise { + console.log(`Run zenstack benchmarks: `, databaseUrl); + + const db = new ZenStackClient(schema, { + dialect: new PostgresDialect({ + pool: new Pool({ + connectionString: databaseUrl, + }), + }), + }); + + await db.$connect(); + + const results: QueryResult[] = []; + + /** + * findMany + */ + + results.push(await measure('zenstack-findMany', db.customer.findMany())); + + results.push( + await measure( + 'zenstack-findMany-filter-paginate-order', + db.customer.findMany({ + where: { isActive: true }, + orderBy: { createdAt: 'desc' }, + skip: 0, + take: 10, + }) + ) + ); + + results.push( + await measure( + 'zenstack-findMany-1-level-nesting', + db.customer.findMany({ + include: { + orders: true, + }, + }) + ) + ); + + /** + * findFirst + */ + + results.push(await measure('zenstack-findFirst', db.customer.findFirst())); + + results.push( + await measure( + 'zenstack-findFirst-1-level-nesting', + db.customer.findFirst({ + include: { + orders: true, + }, + }) + ) + ); + + /** + * findUnique + */ + + results.push( + await measure( + 'zenstack-findUnique', + db.customer.findUnique({ + where: { id: 1 }, + }) + ) + ); + + results.push( + await measure( + 'zenstack-findUnique-1-level-nesting', + db.customer.findUnique({ + where: { id: 1 }, + include: { + orders: true, + }, + }) + ) + ); + + /** + * create + */ + + results.push( + await measure( + 'zenstack-create', + db.customer.create({ + data: { + name: 'John Doe', + email: 'john.doe@example.com', + }, + }) + ) + ); + + results.push( + await measure( + 'zenstack-nested-create', + db.customer.create({ + data: { + name: 'John Doe', + email: 'john.doe@example.com', + isActive: false, + orders: { + create: { + date: new Date(), + totalAmount: 100.5, + products: { + connect: [{ id: 1 }, { id: 2 }], // Assuming products with IDs 1 and 2 already exist + }, + }, + }, + }, + }) + ) + ); + + /** + * update + */ + + results.push( + await measure( + 'zenstack-update', + db.customer.update({ + where: { id: 1 }, + data: { + name: 'John Doe Updated', + }, + }) + ) + ); + + results.push( + await measure( + 'zenstack-nested-update', + db.customer.update({ + where: { id: 1 }, + data: { + name: 'John Doe Updated', + address: { + update: { + street: '456 New St', + }, + }, + }, + }) + ) + ); + + /** + * upsert + */ + + results.push( + await measure( + 'zenstack-upsert', + db.customer.upsert({ + where: { id: 1 }, + update: { + name: 'John Doe Upserted', + }, + create: { + name: 'John Doe', + email: 'john.doe@example.com', + }, + }) + ) + ); + + results.push( + await measure( + 'zenstack-nested-upsert', + db.customer.upsert({ + where: { id: 1 }, + update: { + name: 'John Doe Upserted', + address: { + update: { + street: '456 New St', + }, + }, + }, + create: { + name: 'John Doe', + email: 'john.doe@example.com', + address: { + create: { + street: '456 New St', + city: 'Anytown', + postalCode: '12345', + country: 'Country', + }, + }, + }, + }) + ) + ); + + /** + * delete + */ + + results.push( + await measure( + 'zenstack-delete', + db.customer.delete({ + where: { id: 1 }, + }) + ) + ); + + await db.$disconnect(); + + return results; +} diff --git a/tsconfig.json b/tsconfig.json index 807c488..78c654e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,14 @@ { - "compilerOptions": { - "sourceMap": true, - "outDir": "dist", - "strict": true, - "lib": ["esnext"], - "esModuleInterop": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false - } + "compilerOptions": { + "module": "nodenext", + "moduleResolution": "nodenext", + "sourceMap": true, + "outDir": "dist", + "strict": true, + "lib": ["esnext"], + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false + } }