diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c560cb44..cac33514a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,9 @@ on: push: branches: - '*' + pull_request: + branches: + - main workflow_dispatch: @@ -22,5 +25,26 @@ jobs: node-version: '20' cache: 'npm' - run: npm install - - run: npm run test + - name: Run tests + run: npm run test -- ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && '--force' || '' }} + env: + CI: true + - name: Show test summary + if: always() + run: | + echo "Test run complete. Check logs above for details." + if [ "${{ github.ref }}" = "refs/heads/main" ] || [ "${{ github.base_ref }}" = "main" ]; then + echo "✅ Ran with --force (no cache) for main branch accuracy" + else + echo "✅ Used cache for faster feedback" + fi + - name: Upload test results on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ github.run_id }} + path: | + packages/*/coverage/ + packages/*/.tmp/ + retention-days: 7 - run: npm run lint diff --git a/apps/cli/CHANGELOG.md b/apps/cli/CHANGELOG.md new file mode 100644 index 000000000..ba81b7b13 --- /dev/null +++ b/apps/cli/CHANGELOG.md @@ -0,0 +1,59 @@ +# walkeros + +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/cli@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/cli@0.4.0 + +## 0.3.6 + +### Patch Changes + +- port path and name +- Updated dependencies +- Updated dependencies [df4b2a1] + - @walkeros/cli@0.3.6 + +## 0.3.5 + +### Patch Changes + +- cli usage +- Updated dependencies + - @walkeros/cli@0.3.5 + +## 0.3.4 + +### Patch Changes + +- Updated dependencies + - @walkeros/cli@0.3.4 + +## 0.3.3 + +### Patch Changes + +- Updated dependencies + - @walkeros/cli@0.3.3 + +## 0.3.2 + +### Patch Changes + +- walkeros cli with docker +- Updated dependencies + - @walkeros/cli@0.3.2 diff --git a/apps/cli/README.md b/apps/cli/README.md new file mode 100644 index 000000000..f74c9e43a --- /dev/null +++ b/apps/cli/README.md @@ -0,0 +1,50 @@ +# runneros + +Shorthand command for walkerOS CLI. + +## Usage + +Instead of typing: + +```bash +npx @walkeros/cli bundle +``` + +You can now use: + +```bash +npx runneros bundle +``` + +## Commands + +All commands from `@walkeros/cli` are available: + +```bash +# Bundle walkerOS components +npx runneros bundle + +# Simulate event processing +npx runneros simulate + +# Run collector/server +npx runneros run collect +npx runneros run serve +``` + +## Installation + +```bash +npm install -g runneros +``` + +Or use directly with npx: + +```bash +npx runneros --help +``` + +## Documentation + +For full documentation, see the +[walkerOS CLI documentation](https://github.com/elbwalker/walkerOS/tree/main/packages/cli). diff --git a/apps/cli/package-lock.json b/apps/cli/package-lock.json new file mode 100644 index 000000000..211be4578 --- /dev/null +++ b/apps/cli/package-lock.json @@ -0,0 +1,5980 @@ +{ + "name": "runneros", + "version": "0.3.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "runneros", + "version": "0.3.1", + "license": "MIT", + "dependencies": { + "@walkeros/cli": "^0.3.1" + }, + "bin": { + "runneros": "dist/index.js" + }, + "devDependencies": { + "tsup": "^8.4.0", + "typescript": "^5.8.2" + } + }, + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", + "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "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" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", + "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "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" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", + "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "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" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "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==", + "license": "ISC", + "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/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/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==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui/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==", + "license": "MIT", + "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/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/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==", + "license": "MIT", + "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/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/agent/node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/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==", + "license": "ISC" + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.8.tgz", + "integrity": "sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ==", + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^7.0.0", + "ini": "^4.1.3", + "lru-cache": "^10.0.1", + "npm-pick-manifest": "^9.0.0", + "proc-log": "^4.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/git/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==", + "license": "ISC" + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", + "integrity": "sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w==", + "license": "ISC", + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "bin/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.1.tgz", + "integrity": "sha512-f7zYC6kQautXHvNbLEWgD/uGu1+xCn9izgqBfgItWSx22U0ZDekxN08A1vM8cTxj/cRVe0Q94Ode+tdoYmIOOQ==", + "license": "ISC", + "dependencies": { + "@npmcli/git": "^5.0.0", + "glob": "^10.2.2", + "hosted-git-info": "^7.0.0", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "proc-log": "^4.0.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "license": "ISC", + "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/@npmcli/promise-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz", + "integrity": "sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==", + "license": "ISC", + "dependencies": { + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/redact": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-1.1.0.tgz", + "integrity": "sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ==", + "license": "ISC", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.4.tgz", + "integrity": "sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg==", + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^5.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "node-gyp": "^10.0.0", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "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==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", + "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", + "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", + "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", + "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", + "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", + "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", + "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", + "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", + "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", + "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", + "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", + "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", + "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", + "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", + "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", + "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", + "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", + "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", + "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", + "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", + "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", + "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sigstore/bundle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz", + "integrity": "sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.1.0.tgz", + "integrity": "sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==", + "license": "Apache-2.0", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.3.tgz", + "integrity": "sha512-RpacQhBlwpBWd7KEJsRKcBQalbV28fvkxwTOJIqhIuDysMMaJW47V4OqW30iJB9uRpqOSxxEAQFdr8tTattReQ==", + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.3.2.tgz", + "integrity": "sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "make-fetch-happen": "^13.0.1", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.4.tgz", + "integrity": "sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2", + "tuf-js": "^2.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.2.1.tgz", + "integrity": "sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.1.0", + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@swc/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.2.tgz", + "integrity": "sha512-OQm+yJdXxvSjqGeaWhP6Ia264ogifwAO7Q12uTDVYj/Ks4jBTI4JknlcjDRAXtRhqbWsfbZyK/5RtuIPyptk3w==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.25" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.15.2", + "@swc/core-darwin-x64": "1.15.2", + "@swc/core-linux-arm-gnueabihf": "1.15.2", + "@swc/core-linux-arm64-gnu": "1.15.2", + "@swc/core-linux-arm64-musl": "1.15.2", + "@swc/core-linux-x64-gnu": "1.15.2", + "@swc/core-linux-x64-musl": "1.15.2", + "@swc/core-win32-arm64-msvc": "1.15.2", + "@swc/core-win32-ia32-msvc": "1.15.2", + "@swc/core-win32-x64-msvc": "1.15.2" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.2.tgz", + "integrity": "sha512-Ghyz4RJv4zyXzrUC1B2MLQBbppIB5c4jMZJybX2ebdEQAvryEKp3gq1kBksCNsatKGmEgXul88SETU19sMWcrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.2.tgz", + "integrity": "sha512-7n/PGJOcL2QoptzL42L5xFFfXY5rFxLHnuz1foU+4ruUTG8x2IebGhtwVTpaDN8ShEv2UZObBlT1rrXTba15Zw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.2.tgz", + "integrity": "sha512-ZUQVCfRJ9wimuxkStRSlLwqX4TEDmv6/J+E6FicGkQ6ssLMWoKDy0cAo93HiWt/TWEee5vFhFaSQYzCuBEGO6A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.2.tgz", + "integrity": "sha512-GZh3pYBmfnpQ+JIg+TqLuz+pM+Mjsk5VOzi8nwKn/m+GvQBsxD5ectRtxuWUxMGNG8h0lMy4SnHRqdK3/iJl7A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.2.tgz", + "integrity": "sha512-5av6VYZZeneiYIodwzGMlnyVakpuYZryGzFIbgu1XP8wVylZxduEzup4eP8atiMDFmIm+s4wn8GySJmYqeJC0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.2.tgz", + "integrity": "sha512-1nO/UfdCLuT/uE/7oB3EZgTeZDCIa6nL72cFEpdegnqpJVNDI6Qb8U4g/4lfVPkmHq2lvxQ0L+n+JdgaZLhrRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.2.tgz", + "integrity": "sha512-Ksfrb0Tx310kr+TLiUOvB/I80lyZ3lSOp6cM18zmNRT/92NB4mW8oX2Jo7K4eVEI2JWyaQUAFubDSha2Q+439A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.2.tgz", + "integrity": "sha512-IzUb5RlMUY0r1A9IuJrQ7Tbts1wWb73/zXVXT8VhewbHGoNlBKE0qUhKMED6Tv4wDF+pmbtUJmKXDthytAvLmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.2.tgz", + "integrity": "sha512-kCATEzuY2LP9AlbU2uScjcVhgnCAkRdu62vbce17Ro5kxEHxYWcugkveyBRS3AqZGtwAKYbMAuNloer9LS/hpw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.2.tgz", + "integrity": "sha512-iJaHeYCF4jTn7OEKSa3KRiuVFIVYts8jYjNmCdyz1u5g8HRyTDISD76r8+ljEOgm36oviRQvcXaw6LFp1m0yyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true + }, + "node_modules/@swc/types": { + "version": "0.1.25", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", + "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "license": "MIT", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.1.tgz", + "integrity": "sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg==", + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@walkeros/cli": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@walkeros/cli/-/cli-0.3.1.tgz", + "integrity": "sha512-OYA+J8dbooxwYGWR2fDeyZ1CjG57ivBac96qYtQClNlSqx210sWJ2HDQUSPL8/xVGgQH/9pFLivCq7+uqxzFIQ==", + "license": "MIT", + "dependencies": { + "@walkeros/core": "^0.3.1", + "@walkeros/docker": "*", + "chalk": "^5.3.0", + "commander": "^11.0.0", + "esbuild": "^0.19.0", + "fs-extra": "^11.0.0", + "handlebars": "^4.7.8", + "jsdom": "^22.1.0", + "pacote": "^17.0.0", + "zod": "^3.23.8" + }, + "bin": { + "walkeros": "dist/index.js" + } + }, + "node_modules/@walkeros/core": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@walkeros/core/-/core-0.3.1.tgz", + "integrity": "sha512-8yjV0yMpYE7X1HGklJEF2qLMmIWM8k9FsLl8QdDrDVqf578faceSFhzGaT5PwbUuiGrEGHXr+4/kf6/kF8o+bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/elbwalker" + } + ], + "license": "MIT", + "dependencies": { + "zod": "^4.1.12" + } + }, + "node_modules/@walkeros/core/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", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/@walkeros/docker": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@walkeros/docker/-/docker-0.1.1.tgz", + "integrity": "sha512-r2LFyHQMs/+KaWXFIjtGO0SVw/LoWxEnjViJcR2NdZPq/Be0oD/EsVrzlPRVKh3K0lkY2OXw35FJccHNDYuDLA==", + "license": "MIT", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "zod": "^3.23.8" + } + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "deprecated": "Use your platform's native atob() and btoa() methods instead", + "license": "BSD-3-Clause" + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "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==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cacache": { + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "license": "ISC", + "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/cacache/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==", + "license": "ISC" + }, + "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": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": 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==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssstyle": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "license": "MIT", + "dependencies": { + "rrweb-cssom": "^0.6.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/data-urls": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "license": "MIT", + "dependencies": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "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/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "deprecated": "Use your platform's native DOMException instead", + "license": "MIT", + "dependencies": { + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/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==", + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "license": "MIT" + }, + "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/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "hasInstallScript": true, + "license": "MIT", + "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/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "license": "Apache-2.0" + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/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==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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/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.13.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", + "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "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/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "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/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/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==", + "license": "ISC" + }, + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-walk": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.5.tgz", + "integrity": "sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==", + "license": "ISC", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "license": "MIT" + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "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==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/jsdom": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", + "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "license": "MIT", + "dependencies": { + "abab": "^2.0.6", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", + "domexception": "^4.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.4", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "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/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minipass-json-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.2.tgz", + "integrity": "sha512-myxeeTm57lYs8pH2nxPzmEEg8DGIgW+9mv6D4JZD2pa81I/OBjeU7PtICXV6c9eRGTA5JMDsuIPUZRCyBMYNhg==", + "license": "MIT", + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-json-stream/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" + } + }, + "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/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT" + }, + "node_modules/node-gyp": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.3.1.tgz", + "integrity": "sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ==", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/node-gyp/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "license": "ISC", + "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/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-bundled": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", + "integrity": "sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ==", + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-install-checks": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz", + "integrity": "sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==", + "license": "ISC", + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^4.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", + "integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==", + "license": "ISC", + "dependencies": { + "ignore-walk": "^6.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.1.0.tgz", + "integrity": "sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA==", + "license": "ISC", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^11.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "16.2.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.2.1.tgz", + "integrity": "sha512-8l+7jxhim55S85fjiDGJ1rZXBWGtRLi1OSb4Z3BPLObPuIaeKRlPRiYMSHU4/81ck3t71Z+UwDDl47gcpmfQQA==", + "license": "ISC", + "dependencies": { + "@npmcli/redact": "^1.1.0", + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/nwsapi": { + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/pacote": { + "version": "17.0.7", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.7.tgz", + "integrity": "sha512-sgvnoUMlkv9xHwDUKjKQFXVyUi8dtJGKp3vg6sYy+TxbDic5RjZCHF3ygv0EJgNRZ2GfRONjlKPUfokJ9lDpwQ==", + "license": "ISC", + "dependencies": { + "@npmcli/git": "^5.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^7.0.0", + "cacache": "^18.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^11.0.0", + "npm-packlist": "^8.0.0", + "npm-pick-manifest": "^9.0.0", + "npm-registry-fetch": "^16.0.0", + "proc-log": "^4.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^7.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^2.2.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "BlueOak-1.0.0", + "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==", + "license": "ISC" + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "license": "ISC" + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-package-json": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.1.tgz", + "integrity": "sha512-8PcDiZ8DXUjLf687Ol4BR8Bpm2umR7vhoZOzNRt+uxD9GpBh/K+CAAALVIiYFknmvlmyg7hM7BSNUXPaCCqd0Q==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "license": "ISC", + "dependencies": { + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "license": "ISC", + "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/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" + }, + "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, + "license": "MIT", + "optional": true, + "peer": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/rollup": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", + "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.53.2", + "@rollup/rollup-android-arm64": "4.53.2", + "@rollup/rollup-darwin-arm64": "4.53.2", + "@rollup/rollup-darwin-x64": "4.53.2", + "@rollup/rollup-freebsd-arm64": "4.53.2", + "@rollup/rollup-freebsd-x64": "4.53.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", + "@rollup/rollup-linux-arm-musleabihf": "4.53.2", + "@rollup/rollup-linux-arm64-gnu": "4.53.2", + "@rollup/rollup-linux-arm64-musl": "4.53.2", + "@rollup/rollup-linux-loong64-gnu": "4.53.2", + "@rollup/rollup-linux-ppc64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-musl": "4.53.2", + "@rollup/rollup-linux-s390x-gnu": "4.53.2", + "@rollup/rollup-linux-x64-gnu": "4.53.2", + "@rollup/rollup-linux-x64-musl": "4.53.2", + "@rollup/rollup-openharmony-arm64": "4.53.2", + "@rollup/rollup-win32-arm64-msvc": "4.53.2", + "@rollup/rollup-win32-ia32-msvc": "4.53.2", + "@rollup/rollup-win32-x64-gnu": "4.53.2", + "@rollup/rollup-win32-x64-msvc": "4.53.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "license": "MIT" + }, + "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" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sigstore": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.3.1.tgz", + "integrity": "sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "@sigstore/sign": "^2.3.2", + "@sigstore/tuf": "^2.3.4", + "@sigstore/verify": "^1.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "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==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", + "license": "CC0-1.0" + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "license": "MIT", + "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": { + "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==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "dev": true, + "license": "ISC", + "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/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "license": "MIT" + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", + "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.0.tgz", + "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", + "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.0.tgz", + "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", + "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", + "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", + "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", + "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", + "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", + "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", + "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-loong64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", + "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", + "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", + "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", + "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-s390x": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", + "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", + "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", + "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", + "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/sunos-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", + "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", + "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", + "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", + "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/esbuild": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", + "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.0", + "@esbuild/android-arm": "0.27.0", + "@esbuild/android-arm64": "0.27.0", + "@esbuild/android-x64": "0.27.0", + "@esbuild/darwin-arm64": "0.27.0", + "@esbuild/darwin-x64": "0.27.0", + "@esbuild/freebsd-arm64": "0.27.0", + "@esbuild/freebsd-x64": "0.27.0", + "@esbuild/linux-arm": "0.27.0", + "@esbuild/linux-arm64": "0.27.0", + "@esbuild/linux-ia32": "0.27.0", + "@esbuild/linux-loong64": "0.27.0", + "@esbuild/linux-mips64el": "0.27.0", + "@esbuild/linux-ppc64": "0.27.0", + "@esbuild/linux-riscv64": "0.27.0", + "@esbuild/linux-s390x": "0.27.0", + "@esbuild/linux-x64": "0.27.0", + "@esbuild/netbsd-arm64": "0.27.0", + "@esbuild/netbsd-x64": "0.27.0", + "@esbuild/openbsd-arm64": "0.27.0", + "@esbuild/openbsd-x64": "0.27.0", + "@esbuild/openharmony-arm64": "0.27.0", + "@esbuild/sunos-x64": "0.27.0", + "@esbuild/win32-arm64": "0.27.0", + "@esbuild/win32-ia32": "0.27.0", + "@esbuild/win32-x64": "0.27.0" + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/tsx": { + "version": "4.20.6", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz", + "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/tuf-js": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", + "integrity": "sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==", + "license": "MIT", + "dependencies": { + "@tufjs/models": "2.0.1", + "debug": "^4.3.4", + "make-fetch-happen": "^13.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "license": "MIT", + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding/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==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", + "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "license": "MIT", + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "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-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "license": "Apache-2.0", + "engines": { + "node": ">=12" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "license": "MIT" + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/apps/cli/package.json b/apps/cli/package.json new file mode 100644 index 000000000..2b6d30f0e --- /dev/null +++ b/apps/cli/package.json @@ -0,0 +1,40 @@ +{ + "name": "walkeros", + "version": "0.4.1", + "description": "walkerOS CLI - Bundle and deploy walkerOS components", + "license": "MIT", + "type": "module", + "bin": { + "walkeros": "dist/index.js" + }, + "files": [ + "dist/**", + "README.md" + ], + "scripts": { + "build": "tsup", + "dev": "tsx src/index.ts", + "start": "node dist/index.js", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist" + }, + "dependencies": { + "@walkeros/cli": "0.4.1" + }, + "devDependencies": { + "tsup": "^8.4.0", + "typescript": "^5.8.2" + }, + "repository": { + "url": "git+https://github.com/elbwalker/walkerOS.git", + "directory": "apps/cli" + }, + "author": "elbwalker ", + "homepage": "https://github.com/elbwalker/walkerOS#readme", + "keywords": [ + "walkeros", + "cli", + "shorthand", + "analytics", + "event-tracking" + ] +} diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts new file mode 100644 index 000000000..e6cca1887 --- /dev/null +++ b/apps/cli/src/index.ts @@ -0,0 +1,13 @@ +import { spawn } from 'child_process'; +import { createRequire } from 'module'; + +const require = createRequire(import.meta.url); +const cliPath = require.resolve('@walkeros/cli'); + +const child = spawn('node', [cliPath, ...process.argv.slice(2)], { + stdio: 'inherit', +}); + +child.on('exit', (code) => { + process.exit(code || 0); +}); diff --git a/apps/cli/tsconfig.json b/apps/cli/tsconfig.json new file mode 100644 index 000000000..32ad69243 --- /dev/null +++ b/apps/cli/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020"], + "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/apps/cli/tsup.config.ts b/apps/cli/tsup.config.ts new file mode 100644 index 000000000..2508610d8 --- /dev/null +++ b/apps/cli/tsup.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm'], + dts: false, + clean: true, + minify: false, + bundle: true, + platform: 'node', + target: 'node18', + banner: { + js: '#!/usr/bin/env node', + }, +}); diff --git a/apps/demos/destination/CHANGELOG.md b/apps/demos/destination/CHANGELOG.md new file mode 100644 index 000000000..8e5bd81b5 --- /dev/null +++ b/apps/demos/destination/CHANGELOG.md @@ -0,0 +1,33 @@ +# @walkeros/destination-demo + +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + +## 0.3.5 + +### Patch Changes + +- cli usage + +## 0.3.4 + +### Patch Changes + +- command +- walkeros cli with docker diff --git a/apps/demos/destination/package.json b/apps/demos/destination/package.json index 697c9e882..5e26f6432 100644 --- a/apps/demos/destination/package.json +++ b/apps/demos/destination/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/destination-demo", "description": "Demo destination for walkerOS - logs events to console", - "version": "0.3.2", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -24,7 +24,7 @@ "test": "jest" }, "dependencies": { - "@walkeros/core": "0.3.0" + "@walkeros/core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/apps/demos/source/CHANGELOG.md b/apps/demos/source/CHANGELOG.md new file mode 100644 index 000000000..e24e97edd --- /dev/null +++ b/apps/demos/source/CHANGELOG.md @@ -0,0 +1,32 @@ +# @walkeros/source-demo + +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + +## 0.3.4 + +### Patch Changes + +- cli usage + +## 0.3.3 + +### Patch Changes + +- walkeros cli with docker diff --git a/apps/demos/source/package.json b/apps/demos/source/package.json index 363bf008e..f7fb40b9d 100644 --- a/apps/demos/source/package.json +++ b/apps/demos/source/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/source-demo", "description": "Demo source for walkerOS - generates events from config", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -24,7 +24,7 @@ "test": "jest" }, "dependencies": { - "@walkeros/core": "0.3.0" + "@walkeros/core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/apps/quickstart/CHANGELOG.md b/apps/quickstart/CHANGELOG.md index 95405c5a9..9307fae5d 100644 --- a/apps/quickstart/CHANGELOG.md +++ b/apps/quickstart/CHANGELOG.md @@ -1,5 +1,47 @@ # @walkeros/quickstart +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-destination-gtag@0.4.1 + - @walkeros/web-destination-api@0.4.1 + - @walkeros/web-source-browser@0.4.1 + - @walkeros/collector@0.4.1 + - @walkeros/web-core@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-destination-gtag@0.4.0 + - @walkeros/web-destination-api@0.4.0 + - @walkeros/web-source-browser@0.4.0 + - @walkeros/collector@0.4.0 + - @walkeros/web-core@0.4.0 + - @walkeros/core@0.4.0 + +## 0.3.3 + +### Patch Changes + +- cli usage + +## 0.3.2 + +### Patch Changes + +- Updated dependencies + - @walkeros/web-source-browser@0.3.2 + ## 0.3.1 ### Patch Changes diff --git a/apps/quickstart/package.json b/apps/quickstart/package.json index f708d08f3..714fed670 100644 --- a/apps/quickstart/package.json +++ b/apps/quickstart/package.json @@ -1,6 +1,6 @@ { "name": "@walkeros/quickstart", - "version": "0.3.1", + "version": "0.4.1", "private": true, "description": "Verified code examples for walkerOS documentation", "license": "MIT", @@ -13,12 +13,12 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/collector": "0.3.1", - "@walkeros/web-core": "0.3.1", - "@walkeros/web-source-browser": "0.3.1", - "@walkeros/web-destination-gtag": "0.3.1", - "@walkeros/web-destination-api": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/collector": "0.4.1", + "@walkeros/web-core": "0.4.1", + "@walkeros/web-source-browser": "0.4.1", + "@walkeros/web-destination-gtag": "0.4.1", + "@walkeros/web-destination-api": "0.4.1" }, "devDependencies": { "@swc/jest": "^0.2.36", diff --git a/apps/quickstart/src/web-basic.ts b/apps/quickstart/src/web-basic.ts index 937920485..3e2c16e1a 100644 --- a/apps/quickstart/src/web-basic.ts +++ b/apps/quickstart/src/web-basic.ts @@ -42,7 +42,7 @@ export async function setupWebBasic(): Promise<{ type: 'console', config: {}, push(event: WalkerOS.Event) { - console.log('📊 Event captured:', { + console.log('Console:', { name: event.name, data: event.data, timing: event.timing, @@ -67,7 +67,7 @@ export async function setupWebBasic(): Promise<{ env: { // Mock sendWeb function sendWeb: (url: unknown, body: unknown, options: unknown) => { - console.log('📡 API Call:', { url, body, options }); + console.log('API:', { url, body, options }); }, }, }, @@ -126,7 +126,7 @@ export async function setupWebBasic(): Promise<{ env: { window: { gtag: (...args: unknown[]) => { - console.log('🎯 Gtag Call:', args); + console.log('Gtag:', args); }, }, }, diff --git a/apps/walkerjs/CHANGELOG.md b/apps/walkerjs/CHANGELOG.md index ea404469d..084d298d3 100644 --- a/apps/walkerjs/CHANGELOG.md +++ b/apps/walkerjs/CHANGELOG.md @@ -1,5 +1,45 @@ # @walkeros/walker.js +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-source-datalayer@0.4.1 + - @walkeros/web-source-browser@0.4.1 + - @walkeros/collector@0.4.1 + - @walkeros/web-core@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-source-datalayer@0.4.0 + - @walkeros/web-source-browser@0.4.0 + - @walkeros/collector@0.4.0 + - @walkeros/web-core@0.4.0 + - @walkeros/core@0.4.0 + +## 0.3.3 + +### Patch Changes + +- cli usage + +## 0.3.2 + +### Patch Changes + +- Updated dependencies + - @walkeros/web-source-browser@0.3.2 + ## 0.3.1 ### Patch Changes diff --git a/apps/walkerjs/package.json b/apps/walkerjs/package.json index 6fc7c5f0d..4151b9d7b 100644 --- a/apps/walkerjs/package.json +++ b/apps/walkerjs/package.json @@ -1,6 +1,6 @@ { "name": "@walkeros/walker.js", - "version": "0.3.1", + "version": "0.4.1", "description": "Ready-to-use walkerOS bundle with browser source, collector, and dataLayer support", "license": "MIT", "main": "./dist/index.js", @@ -19,11 +19,13 @@ "types": "./dist/index.d.ts", "default": "./dist/index.es5.js" }, - "./src/schemas": "./src/schemas.ts" + "./src/schemas": "./src/schemas.ts", + "./src/dev": "./src/dev.ts" }, "files": [ "dist/**", "src/schemas.ts", + "src/dev.ts", "README.md", "CHANGELOG.md" ], @@ -36,11 +38,11 @@ "preview": "npm run build && npx serve -l 3333 examples" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/collector": "0.3.1", - "@walkeros/web-core": "0.3.1", - "@walkeros/web-source-browser": "0.3.1", - "@walkeros/web-source-datalayer": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/collector": "0.4.1", + "@walkeros/web-core": "0.4.1", + "@walkeros/web-source-browser": "0.4.1", + "@walkeros/web-source-datalayer": "0.4.1" }, "devDependencies": { "@swc/jest": "^0.2.36", diff --git a/apps/walkerjs/src/dev.ts b/apps/walkerjs/src/dev.ts new file mode 100644 index 000000000..34c86dfa7 --- /dev/null +++ b/apps/walkerjs/src/dev.ts @@ -0,0 +1,8 @@ +export * as schemas from './schemas'; + +export { + settings, + browserConfig, + dataLayerConfig, + collectorConfig, +} from './schemas'; diff --git a/package-lock.json b/package-lock.json index 3cf189d8a..68fcb634d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,10 @@ "packages/web/sources/*", "apps/quickstart", "apps/walkerjs", + "apps/cli", "apps/storybook-addon", + "apps/demos/destination", + "apps/demos/source", "apps/demos/react", "apps/demos/storybook", "website" @@ -36,6 +39,29 @@ "node": ">=20.0" } }, + "apps/cli": { + "name": "walkeros", + "version": "0.4.1", + "license": "MIT", + "dependencies": { + "@walkeros/cli": "0.4.1" + }, + "bin": { + "walkeros": "dist/index.js" + }, + "devDependencies": { + "tsup": "^8.4.0", + "typescript": "^5.8.2" + } + }, + "apps/demos/destination": { + "name": "@walkeros/destination-demo", + "version": "0.4.1", + "license": "MIT", + "dependencies": { + "@walkeros/core": "0.4.1" + } + }, "apps/demos/react": { "name": "walkeros-demo-react", "version": "1.2.0", @@ -86,30 +112,10 @@ "vite": "^7.1.12" } }, - "apps/demos/react/node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "apps/demos/react/node_modules/@eslint/js": { "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -117,51 +123,31 @@ } }, "apps/demos/react/node_modules/@types/react": { - "version": "18.3.24", + "version": "18.3.27", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz", + "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==", "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", - "csstype": "^3.0.2" + "csstype": "^3.2.2" } }, "apps/demos/react/node_modules/@types/react-dom": { "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "dev": true, "license": "MIT", "peerDependencies": { "@types/react": "^18.0.0" } }, - "apps/demos/react/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "apps/demos/react/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "apps/demos/react/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "apps/demos/react/node_modules/eslint": { "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { @@ -216,6 +202,8 @@ }, "apps/demos/react/node_modules/eslint-plugin-react-hooks": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "license": "MIT", "engines": { @@ -225,91 +213,10 @@ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" } }, - "apps/demos/react/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "apps/demos/react/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "apps/demos/react/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "apps/demos/react/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/demos/react/node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "apps/demos/react/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "apps/demos/react/node_modules/globals": { "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -322,90 +229,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "apps/demos/react/node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "apps/demos/react/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "apps/demos/react/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/demos/react/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "apps/demos/react/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/demos/react/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/demos/react/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "apps/demos/react/node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -431,56 +254,12 @@ "react": "^18.3.1" } }, - "apps/demos/react/node_modules/react-router": { - "version": "6.30.1", - "license": "MIT", - "dependencies": { - "@remix-run/router": "1.23.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "apps/demos/react/node_modules/react-router-dom": { - "version": "6.30.1", + "apps/demos/source": { + "name": "@walkeros/source-demo", + "version": "0.4.1", "license": "MIT", "dependencies": { - "@remix-run/router": "1.23.0", - "react-router": "6.30.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "apps/demos/react/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/demos/react/node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@walkeros/core": "0.4.1" } }, "apps/demos/storybook": { @@ -531,15 +310,15 @@ }, "apps/quickstart": { "name": "@walkeros/quickstart", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "dependencies": { - "@walkeros/collector": "0.3.1", - "@walkeros/core": "0.3.1", - "@walkeros/web-core": "0.3.1", - "@walkeros/web-destination-api": "0.3.1", - "@walkeros/web-destination-gtag": "0.3.1", - "@walkeros/web-source-browser": "0.3.1" + "@walkeros/collector": "0.4.1", + "@walkeros/core": "0.4.1", + "@walkeros/web-core": "0.4.1", + "@walkeros/web-destination-api": "0.4.1", + "@walkeros/web-destination-gtag": "0.4.1", + "@walkeros/web-source-browser": "0.4.1" }, "devDependencies": { "@swc/jest": "^0.2.36", @@ -588,74 +367,27 @@ "storybook": "^9.0.0" } }, - "apps/storybook-addon/node_modules/@types/node": { - "version": "22.18.0", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, "apps/storybook-addon/node_modules/@types/react": { - "version": "18.3.24", + "version": "18.3.27", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz", + "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==", "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", - "csstype": "^3.0.2" + "csstype": "^3.2.2" } }, "apps/storybook-addon/node_modules/@types/react-dom": { "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "dev": true, "license": "MIT", "peerDependencies": { "@types/react": "^18.0.0" } }, - "apps/storybook-addon/node_modules/boxen": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.1", - "chalk": "^5.2.0", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.1.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/storybook-addon/node_modules/camelcase": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/storybook-addon/node_modules/chalk": { - "version": "5.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "apps/storybook-addon/node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -683,32 +415,16 @@ "react": "^18.3.1" } }, - "apps/storybook-addon/node_modules/type-fest": { - "version": "2.19.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "apps/storybook-addon/node_modules/undici-types": { - "version": "6.21.0", - "dev": true, - "license": "MIT" - }, "apps/walkerjs": { "name": "@walkeros/walker.js", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "dependencies": { - "@walkeros/collector": "0.3.1", - "@walkeros/core": "0.3.1", - "@walkeros/web-core": "0.3.1", - "@walkeros/web-source-browser": "0.3.1", - "@walkeros/web-source-datalayer": "0.3.1" + "@walkeros/collector": "0.4.1", + "@walkeros/core": "0.4.1", + "@walkeros/web-core": "0.4.1", + "@walkeros/web-source-browser": "0.4.1", + "@walkeros/web-source-datalayer": "0.4.1" }, "devDependencies": { "@swc/jest": "^0.2.36", @@ -717,66 +433,6 @@ "jest-environment-jsdom": "^29.7.0" } }, - "explorer": { - "name": "@walkeros/explorer", - "version": "0.3.0", - "extraneous": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/elbwalker" - } - ], - "license": "MIT", - "dependencies": { - "@monaco-editor/react": "^4.7.0", - "@rjsf/core": "^5.24.13", - "@rjsf/utils": "^5.24.13", - "@rjsf/validator-ajv8": "^5.24.13", - "clsx": "^2.1.1", - "monaco-editor": "^0.54.0", - "tailwind-merge": "^2.5.5" - }, - "devDependencies": { - "@changesets/cli": "^2.29.7", - "@storybook/addon-docs": "^10.0.4", - "@storybook/react-vite": "^10.0.4", - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.1.0", - "@testing-library/user-event": "^14.5.2", - "@types/react": "^19.0.2", - "@types/react-dom": "^19.0.2", - "@vitejs/plugin-react": "^5.1.0", - "@walkeros/collector": "^0.3.0", - "@walkeros/config": "^0.1.3", - "@walkeros/core": "^0.3.0", - "@walkeros/web-destination-gtag": "^0.3.0", - "@walkeros/web-source-browser": "^0.3.0", - "eslint-plugin-storybook": "^10.0.4", - "husky": "^9.1.7", - "identity-obj-proxy": "^3.0.0", - "lint-staged": "^16.2.6", - "prettier": "^3.6.2", - "rehype-external-links": "^3.0.0", - "rehype-slug": "^6.0.0", - "sass": "^1.93.2", - "storybook": "^10.0.4", - "vite": "^7.1.12" - }, - "peerDependencies": { - "@walkeros/core": "^0.3.0", - "react": ">=18.0.0", - "react-dom": ">=18.0.0" - }, - "peerDependenciesMeta": { - "@walkeros/collector": { - "optional": true - }, - "@walkeros/web-source-browser": { - "optional": true - } - } - }, "node_modules/@adobe/css-tools": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz", @@ -785,14 +441,14 @@ "license": "MIT" }, "node_modules/@ai-sdk/gateway": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-2.0.3.tgz", - "integrity": "sha512-/vCoMKtod+A74/BbkWsaAflWKz1ovhX5lmJpIaXQXtd6gyexZncjotBTbFM8rVJT9LKJ/Kx7iVVo3vh+KT+IJg==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-2.0.15.tgz", + "integrity": "sha512-i1YVKzC1dg9LGvt+GthhD7NlRhz9J4+ZRj3KELU14IZ/MHPsOBiFeEoCCIDLR+3tqT8/+5nIsK3eZ7DFRfMfdw==", "license": "Apache-2.0", "dependencies": { "@ai-sdk/provider": "2.0.0", - "@ai-sdk/provider-utils": "3.0.14", - "@vercel/oidc": "3.0.3" + "@ai-sdk/provider-utils": "3.0.17", + "@vercel/oidc": "3.0.5" }, "engines": { "node": ">=18" @@ -814,14 +470,14 @@ } }, "node_modules/@ai-sdk/provider-utils": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-3.0.14.tgz", - "integrity": "sha512-CYRU6L7IlR7KslSBVxvlqlybQvXJln/PI57O8swhOaDIURZbjRP2AY3igKgUsrmWqqnFFUHP+AwTN8xqJAknnA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-3.0.17.tgz", + "integrity": "sha512-TR3Gs4I3Tym4Ll+EPdzRdvo/rc8Js6c4nVhFLuvGLX/Y4V9ZcQMa/HTiYsHEgmYrf1zVi6Q145UEZUfleOwOjw==", "license": "Apache-2.0", "dependencies": { "@ai-sdk/provider": "2.0.0", "@standard-schema/spec": "^1.0.0", - "eventsource-parser": "^3.0.5" + "eventsource-parser": "^3.0.6" }, "engines": { "node": ">=18" @@ -831,13 +487,13 @@ } }, "node_modules/@ai-sdk/react": { - "version": "2.0.82", - "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-2.0.82.tgz", - "integrity": "sha512-InaGqykKGFq/XA6Vhh2Hyy38nzeMpqp8eWxjTNEQA5Gwcal0BVNuZyTbTIL5t5VNXV+pQPDhe9ak1+mc9qxjog==", + "version": "2.0.101", + "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-2.0.101.tgz", + "integrity": "sha512-Cq9InVVGBs2Dw3FiqImsuGZK86HZnNp562+jygJfUtPpp5JUOwWBblCQcli7X8aDg9QsitdM0ZJpbVZQ+fwH6w==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/provider-utils": "3.0.14", - "ai": "5.0.82", + "@ai-sdk/provider-utils": "3.0.17", + "ai": "5.0.101", "swr": "^2.2.5", "throttleit": "2.1.0" }, @@ -855,15 +511,15 @@ } }, "node_modules/@algolia/abtesting": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.7.0.tgz", - "integrity": "sha512-hOEItTFOvNLI6QX6TSGu7VE4XcUcdoKZT8NwDY+5mWwu87rGhkjlY7uesKTInlg6Sh8cyRkDBYRumxbkoBbBhA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.11.0.tgz", + "integrity": "sha512-a7oQ8dwiyoyVmzLY0FcuBqyqcNSq78qlcOtHmNBumRlHCSnXDcuoYGBGPN1F6n8JoGhviDDsIaF/oQrzTzs6Lg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" @@ -902,99 +558,99 @@ } }, "node_modules/@algolia/client-abtesting": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.41.0.tgz", - "integrity": "sha512-iRuvbEyuHCAhIMkyzG3tfINLxTS7mSKo7q8mQF+FbQpWenlAlrXnfZTN19LRwnVjx0UtAdZq96ThMWGS6cQ61A==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.45.0.tgz", + "integrity": "sha512-WTW0VZA8xHMbzuQD5b3f41ovKZ0MNTIXkWfm0F2PU+XGcLxmxX15UqODzF2sWab0vSbi3URM1xLhJx+bXbd1eQ==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-analytics": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.41.0.tgz", - "integrity": "sha512-OIPVbGfx/AO8l1V70xYTPSeTt/GCXPEl6vQICLAXLCk9WOUbcLGcy6t8qv0rO7Z7/M/h9afY6Af8JcnI+FBFdQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.45.0.tgz", + "integrity": "sha512-I3g7VtvG/QJOH3tQO7E7zWTwBfK/nIQXShFLR8RvPgWburZ626JNj332M3wHCYcaAMivN9WJG66S2JNXhm6+Xg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-common": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.41.0.tgz", - "integrity": "sha512-8Mc9niJvfuO8dudWN5vSUlYkz7U3M3X3m1crDLc9N7FZrIVoNGOUETPk3TTHviJIh9y6eKZKbq1hPGoGY9fqPA==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.45.0.tgz", + "integrity": "sha512-/nTqm1tLiPtbUr+8kHKyFiCOfhRfgC+JxLvOCq471gFZZOlsh6VtFRiKI60/zGmHTojFC6B0mD80PB7KeK94og==", "license": "MIT", "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-insights": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.41.0.tgz", - "integrity": "sha512-vXzvCGZS6Ixxn+WyzGUVDeR3HO/QO5POeeWy1kjNJbEf6f+tZSI+OiIU9Ha+T3ntV8oXFyBEuweygw4OLmgfiQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.45.0.tgz", + "integrity": "sha512-suQTx/1bRL1g/K2hRtbK3ANmbzaZCi13487sxxmqok+alBDKKw0/TI73ZiHjjFXM2NV52inwwcmW4fUR45206Q==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-personalization": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.41.0.tgz", - "integrity": "sha512-tkymXhmlcc7w/HEvLRiHcpHxLFcUB+0PnE9FcG6hfFZ1ZXiWabH+sX+uukCVnluyhfysU9HRU2kUmUWfucx1Dg==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.45.0.tgz", + "integrity": "sha512-CId/dbjpzI3eoUhPU6rt/z4GrRsDesqFISEMOwrqWNSrf4FJhiUIzN42Ac+Gzg69uC0RnzRYy60K1y4Na5VSMw==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-query-suggestions": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.41.0.tgz", - "integrity": "sha512-vyXDoz3kEZnosNeVQQwf0PbBt5IZJoHkozKRIsYfEVm+ylwSDFCW08qy2YIVSHdKy69/rWN6Ue/6W29GgVlmKQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.45.0.tgz", + "integrity": "sha512-tjbBKfA8fjAiFtvl9g/MpIPiD6pf3fj7rirVfh1eMIUi8ybHP4ovDzIaE216vHuRXoePQVCkMd2CokKvYq1CLw==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.41.0.tgz", - "integrity": "sha512-G9I2atg1ShtFp0t7zwleP6aPS4DcZvsV4uoQOripp16aR6VJzbEnKFPLW4OFXzX7avgZSpYeBAS+Zx4FOgmpPw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.45.0.tgz", + "integrity": "sha512-nxuCid+Nszs4xqwIMDw11pRJPes2c+Th1yup/+LtpjFH8QWXkr3SirNYSD3OXAeM060HgWWPLA8/Fxk+vwxQOA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" @@ -1007,81 +663,81 @@ "license": "MIT" }, "node_modules/@algolia/ingestion": { - "version": "1.41.0", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.41.0.tgz", - "integrity": "sha512-sxU/ggHbZtmrYzTkueTXXNyifn+ozsLP+Wi9S2hOBVhNWPZ8uRiDTDcFyL7cpCs1q72HxPuhzTP5vn4sUl74cQ==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.45.0.tgz", + "integrity": "sha512-t+1doBzhkQTeOOjLHMlm4slmXBhvgtEGQhOmNpMPTnIgWOyZyESWdm+XD984qM4Ej1i9FRh8VttOGrdGnAjAng==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/monitoring": { - "version": "1.41.0", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.41.0.tgz", - "integrity": "sha512-UQ86R6ixraHUpd0hn4vjgTHbViNO8+wA979gJmSIsRI3yli2v89QSFF/9pPcADR6PbtSio/99PmSNxhZy+CR3Q==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.45.0.tgz", + "integrity": "sha512-IaX3ZX1A/0wlgWZue+1BNWlq5xtJgsRo7uUk/aSiYD7lPbJ7dFuZ+yTLFLKgbl4O0QcyHTj1/mSBj9ryF1Lizg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/recommend": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.41.0.tgz", - "integrity": "sha512-DxP9P8jJ8whJOnvmyA5mf1wv14jPuI0L25itGfOHSU6d4ZAjduVfPjTS3ROuUN5CJoTdlidYZE+DtfWHxJwyzQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.45.0.tgz", + "integrity": "sha512-1jeMLoOhkgezCCPsOqkScwYzAAc1Jr5T2hisZl0s32D94ZV7d1OHozBukgOjf8Dw+6Hgi6j52jlAdUWTtkX9Mg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "@algolia/client-common": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.41.0.tgz", - "integrity": "sha512-C21J+LYkE48fDwtLX7YXZd2Fn7Fe0/DOEtvohSfr/ODP8dGDhy9faaYeWB0n1AvmZltugjkjAXT7xk0CYNIXsQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.45.0.tgz", + "integrity": "sha512-46FIoUkQ9N7wq4/YkHS5/W9Yjm4Ab+q5kfbahdyMpkBPJ7IBlwuNEGnWUZIQ6JfUZuJVojRujPRHMihX4awUMg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0" + "@algolia/client-common": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-fetch": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.41.0.tgz", - "integrity": "sha512-FhJy/+QJhMx1Hajf2LL8og4J7SqOAHiAuUXq27cct4QnPhSIuIGROzeRpfDNH5BUbq22UlMuGd44SeD4HRAqvA==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.45.0.tgz", + "integrity": "sha512-XFTSAtCwy4HdBhSReN2rhSyH/nZOM3q3qe5ERG2FLbYId62heIlJBGVyAPRbltRwNlotlydbvSJ+SQ0ruWC2cw==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0" + "@algolia/client-common": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-node-http": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.41.0.tgz", - "integrity": "sha512-tYv3rGbhBS0eZ5D8oCgV88iuWILROiemk+tQ3YsAKZv2J4kKUNvKkrX/If/SreRy4MGP2uJzMlyKcfSfO2mrsQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.45.0.tgz", + "integrity": "sha512-8mTg6lHx5i44raCU52APsu0EqMsdm4+7Hch/e4ZsYZw0hzwkuaMFh826ngnkYf9XOl58nHoou63aZ874m8AbpQ==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.41.0" + "@algolia/client-common": "5.45.0" }, "engines": { "node": ">= 14.0.0" @@ -1129,9 +785,9 @@ } }, "node_modules/@auto-it/bot-list": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/bot-list/-/bot-list-11.3.0.tgz", - "integrity": "sha512-+izoqAyOSiDVt3WcjVkSvLBV9c82VXLSf3oSWWcCeoxW/YDQ2AoInQ3M3EEyuBP+Yw9KQwGTTYHqpR7ZFkZpDQ==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/bot-list/-/bot-list-11.3.6.tgz", + "integrity": "sha512-BtFOhGv+V47TAYr77uiFz0l807g655Wcui/1KOJpqUYvF07MjG3+D8Ob4sMl8ewDQfgtAMTJKJF3S7AUdKPQng==", "dev": true, "license": "MIT", "engines": { @@ -1139,13 +795,13 @@ } }, "node_modules/@auto-it/core": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/core/-/core-11.3.0.tgz", - "integrity": "sha512-3i7ooAhQJulVDG3gmdOioTXLhpFoS75Z/OsLV8ZkrEaEH/sfxlslqFx20VjWva7gMLl2iO8IjbRnlLhkXy5geg==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/core/-/core-11.3.6.tgz", + "integrity": "sha512-OE7feN8pbpcSCiWaOHYah+oXsinhJ6OfDrsLyPywNSfEPjal4q18ss2iQX1zTmrFIEjDSmptdjqlmwx+dm/8wQ==", "dev": true, "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.3.0", + "@auto-it/bot-list": "11.3.6", "@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2", "@octokit/core": "^3.5.1", "@octokit/plugin-enterprise-compatibility": "1.3.0", @@ -1219,6 +875,19 @@ "dev": true, "license": "0BSD" }, + "node_modules/@auto-it/core/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@auto-it/core/node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -1230,19 +899,19 @@ } }, "node_modules/@auto-it/npm": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/npm/-/npm-11.3.0.tgz", - "integrity": "sha512-II7u1trzi2hSd1Vww635DmvHqHlgtVPqr4VPJlq1M7zqPwi9+FcaMW5J/DSqlwJgWRWviWqepIhasUQhj69p0A==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/npm/-/npm-11.3.6.tgz", + "integrity": "sha512-yKYvlBcIRIOlFLJFpAq2ipdGihqyxAf5KZ9YeDxF/xN54XUV5A5kQqohSpAckxpWKBwxPIKODdLyY5Y0Tm0qfQ==", "dev": true, "license": "MIT", "dependencies": { - "@auto-it/core": "11.3.0", - "@auto-it/package-json-utils": "11.3.0", + "@auto-it/core": "11.3.6", + "@auto-it/package-json-utils": "11.3.6", "await-to-js": "^3.0.0", "endent": "^2.1.0", "env-ci": "^5.0.1", "fp-ts": "^2.5.3", - "get-monorepo-packages": "^1.1.0", + "get-monorepo-packages": "^1.3.0", "io-ts": "^2.1.2", "registry-url": "^5.1.0", "semver": "^7.0.0", @@ -1260,9 +929,9 @@ "license": "0BSD" }, "node_modules/@auto-it/package-json-utils": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/package-json-utils/-/package-json-utils-11.3.0.tgz", - "integrity": "sha512-wZQLfxYCzqNTlqgYhgm1mZaasA35tuOhGl0npWMZlq0HJ4rbNvUYnjb8bXlyfm/dxTYtYp70IhoV5kv1NmPX8Q==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/package-json-utils/-/package-json-utils-11.3.6.tgz", + "integrity": "sha512-j1GT9alk4kJoyyuAxqqHD7okHQjJuJXeAMTMRt4ZpjDjElPuPbxvzjM+QZNuxaMTyjxRoT2YbFyx0uIt7pqXlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1274,14 +943,14 @@ } }, "node_modules/@auto-it/released": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/released/-/released-11.3.0.tgz", - "integrity": "sha512-8Aw8WGuTi3giKU9+KEutebLhhX+4eNVa7SmVLaRIFECUxI/+PS20yMbWsYjsyk5qju1MdpEQGPOW/4U5OZ6Bdw==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/released/-/released-11.3.6.tgz", + "integrity": "sha512-mhe1QjEylUjONE24LUij3A0BCXvadABhbyPS+Jxq6hFS5Rh/gkOmxSuCa1HpO6DSsVdM0gOSF8ZYhUJ/9vHT8A==", "dev": true, "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.3.0", - "@auto-it/core": "11.3.0", + "@auto-it/bot-list": "11.3.6", + "@auto-it/core": "11.3.6", "deepmerge": "^4.0.0", "fp-ts": "^2.5.3", "io-ts": "^2.1.2", @@ -1296,13 +965,13 @@ "license": "0BSD" }, "node_modules/@auto-it/version-file": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/@auto-it/version-file/-/version-file-11.3.0.tgz", - "integrity": "sha512-+ax5/oXKLc5moXrSJuGm3eC10YFapWFwS5MEVwdspPM2YJn1ImuhagXOq5FJ1XK8aeHILZI+2iA+YB5wI1bcLA==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@auto-it/version-file/-/version-file-11.3.6.tgz", + "integrity": "sha512-dtf2T02ryIdX1GWQ9jeLW7EQj1IOBNFQX4BGS2uAddjszsd65hYNoRFMzQ+T/tr7j5Fn9RDaxXLamwYfaSPn9Q==", "dev": true, "license": "MIT", "dependencies": { - "@auto-it/core": "11.3.0", + "@auto-it/core": "11.3.6", "fp-ts": "^2.5.3", "io-ts": "^2.1.2", "semver": "^7.0.0", @@ -1442,48 +1111,48 @@ } }, "node_modules/@aws-sdk/client-firehose": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-firehose/-/client-firehose-3.919.0.tgz", - "integrity": "sha512-tEx1fxGiAB4zAPZhE78V2WEcy26+LG6p8XBKd14yLtsAMwUHPeynHfyc7MIAA4WTE9fjSbtRdfZXsDN1y9MAeA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-firehose/-/client-firehose-3.936.0.tgz", + "integrity": "sha512-1QVCLcZSb4gC6k8rKxBGW7cANI1sIqZKMY2g3FrBEyAflStJALOtbCdVQfeXAlORoQpOOFAkjgjLBZxEmlGcDQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.916.0", - "@aws-sdk/credential-provider-node": "3.919.0", - "@aws-sdk/middleware-host-header": "3.914.0", - "@aws-sdk/middleware-logger": "3.914.0", - "@aws-sdk/middleware-recursion-detection": "3.919.0", - "@aws-sdk/middleware-user-agent": "3.916.0", - "@aws-sdk/region-config-resolver": "3.914.0", - "@aws-sdk/types": "3.914.0", - "@aws-sdk/util-endpoints": "3.916.0", - "@aws-sdk/util-user-agent-browser": "3.914.0", - "@aws-sdk/util-user-agent-node": "3.916.0", - "@smithy/config-resolver": "^4.4.0", - "@smithy/core": "^3.17.1", - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/hash-node": "^4.2.3", - "@smithy/invalid-dependency": "^4.2.3", - "@smithy/middleware-content-length": "^4.2.3", - "@smithy/middleware-endpoint": "^4.3.5", - "@smithy/middleware-retry": "^4.4.5", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/middleware-stack": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/node-http-handler": "^4.4.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/credential-provider-node": "3.936.0", + "@aws-sdk/middleware-host-header": "3.936.0", + "@aws-sdk/middleware-logger": "3.936.0", + "@aws-sdk/middleware-recursion-detection": "3.936.0", + "@aws-sdk/middleware-user-agent": "3.936.0", + "@aws-sdk/region-config-resolver": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@aws-sdk/util-endpoints": "3.936.0", + "@aws-sdk/util-user-agent-browser": "3.936.0", + "@aws-sdk/util-user-agent-node": "3.936.0", + "@smithy/config-resolver": "^4.4.3", + "@smithy/core": "^3.18.5", + "@smithy/fetch-http-handler": "^5.3.6", + "@smithy/hash-node": "^4.2.5", + "@smithy/invalid-dependency": "^4.2.5", + "@smithy/middleware-content-length": "^4.2.5", + "@smithy/middleware-endpoint": "^4.3.12", + "@smithy/middleware-retry": "^4.4.12", + "@smithy/middleware-serde": "^4.2.6", + "@smithy/middleware-stack": "^4.2.5", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/node-http-handler": "^4.4.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.4", - "@smithy/util-defaults-mode-node": "^4.2.6", - "@smithy/util-endpoints": "^3.2.3", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-retry": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.11", + "@smithy/util-defaults-mode-node": "^4.2.14", + "@smithy/util-endpoints": "^3.2.5", + "@smithy/util-middleware": "^4.2.5", + "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, @@ -1492,47 +1161,47 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.919.0.tgz", - "integrity": "sha512-9DVw/1DCzZ9G7Jofnhpg/XDC3wdJ3NAJdNWY1TrgE5ZcpTM+UTIQMGyaljCv9rgxggutHBgmBI5lP3YMcPk9ZQ==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.936.0.tgz", + "integrity": "sha512-0G73S2cDqYwJVvqL08eakj79MZG2QRaB56Ul8/Ps9oQxllr7DMI1IQ/N3j3xjxgpq/U36pkoFZ8aK1n7Sbr3IQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.916.0", - "@aws-sdk/middleware-host-header": "3.914.0", - "@aws-sdk/middleware-logger": "3.914.0", - "@aws-sdk/middleware-recursion-detection": "3.919.0", - "@aws-sdk/middleware-user-agent": "3.916.0", - "@aws-sdk/region-config-resolver": "3.914.0", - "@aws-sdk/types": "3.914.0", - "@aws-sdk/util-endpoints": "3.916.0", - "@aws-sdk/util-user-agent-browser": "3.914.0", - "@aws-sdk/util-user-agent-node": "3.916.0", - "@smithy/config-resolver": "^4.4.0", - "@smithy/core": "^3.17.1", - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/hash-node": "^4.2.3", - "@smithy/invalid-dependency": "^4.2.3", - "@smithy/middleware-content-length": "^4.2.3", - "@smithy/middleware-endpoint": "^4.3.5", - "@smithy/middleware-retry": "^4.4.5", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/middleware-stack": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/node-http-handler": "^4.4.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/middleware-host-header": "3.936.0", + "@aws-sdk/middleware-logger": "3.936.0", + "@aws-sdk/middleware-recursion-detection": "3.936.0", + "@aws-sdk/middleware-user-agent": "3.936.0", + "@aws-sdk/region-config-resolver": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@aws-sdk/util-endpoints": "3.936.0", + "@aws-sdk/util-user-agent-browser": "3.936.0", + "@aws-sdk/util-user-agent-node": "3.936.0", + "@smithy/config-resolver": "^4.4.3", + "@smithy/core": "^3.18.5", + "@smithy/fetch-http-handler": "^5.3.6", + "@smithy/hash-node": "^4.2.5", + "@smithy/invalid-dependency": "^4.2.5", + "@smithy/middleware-content-length": "^4.2.5", + "@smithy/middleware-endpoint": "^4.3.12", + "@smithy/middleware-retry": "^4.4.12", + "@smithy/middleware-serde": "^4.2.6", + "@smithy/middleware-stack": "^4.2.5", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/node-http-handler": "^4.4.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.4", - "@smithy/util-defaults-mode-node": "^4.2.6", - "@smithy/util-endpoints": "^3.2.3", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-retry": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.11", + "@smithy/util-defaults-mode-node": "^4.2.14", + "@smithy/util-endpoints": "^3.2.5", + "@smithy/util-middleware": "^4.2.5", + "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, @@ -1541,22 +1210,22 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.916.0.tgz", - "integrity": "sha512-1JHE5s6MD5PKGovmx/F1e01hUbds/1y3X8rD+Gvi/gWVfdg5noO7ZCerpRsWgfzgvCMZC9VicopBqNHCKLykZA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.936.0.tgz", + "integrity": "sha512-eGJ2ySUMvgtOziHhDRDLCrj473RJoL4J1vPjVM3NrKC/fF3/LoHjkut8AAnKmrW6a2uTzNKubigw8dEnpmpERw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@aws-sdk/xml-builder": "3.914.0", - "@smithy/core": "^3.17.1", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/signature-v4": "^5.3.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@aws-sdk/xml-builder": "3.930.0", + "@smithy/core": "^3.18.5", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/signature-v4": "^5.3.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", - "@smithy/util-middleware": "^4.2.3", + "@smithy/util-middleware": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, @@ -1565,15 +1234,15 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.916.0.tgz", - "integrity": "sha512-3gDeqOXcBRXGHScc6xb7358Lyf64NRG2P08g6Bu5mv1Vbg9PKDyCAZvhKLkG7hkdfAM8Yc6UJNhbFxr1ud/tCQ==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.936.0.tgz", + "integrity": "sha512-dKajFuaugEA5i9gCKzOaVy9uTeZcApE+7Z5wdcZ6j40523fY1a56khDAUYkCfwqa7sHci4ccmxBkAo+fW1RChA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/types": "3.914.0", - "@smithy/property-provider": "^4.2.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1581,20 +1250,20 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.916.0.tgz", - "integrity": "sha512-NmooA5Z4/kPFJdsyoJgDxuqXC1C6oPMmreJjbOPqcwo6E/h2jxaG8utlQFgXe5F9FeJsMx668dtxVxSYnAAqHQ==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.936.0.tgz", + "integrity": "sha512-5FguODLXG1tWx/x8fBxH+GVrk7Hey2LbXV5h9SFzYCx/2h50URBm0+9hndg0Rd23+xzYe14F6SI9HA9c1sPnjg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/types": "3.914.0", - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", - "@smithy/util-stream": "^4.5.4", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/fetch-http-handler": "^5.3.6", + "@smithy/node-http-handler": "^4.4.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", + "@smithy/util-stream": "^4.5.6", "tslib": "^2.6.2" }, "engines": { @@ -1602,23 +1271,43 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.919.0.tgz", - "integrity": "sha512-fAWVfh0P54UFbyAK4tmIPh/X3COFAyXYSp8b2Pc1R6GRwDDMvrAigwGJuyZS4BmpPlXij1gB0nXbhM5Yo4MMMA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.936.0.tgz", + "integrity": "sha512-TbUv56ERQQujoHcLMcfL0Q6bVZfYF83gu/TjHkVkdSlHPOIKaG/mhE2XZSQzXv1cud6LlgeBbfzVAxJ+HPpffg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/credential-provider-env": "3.916.0", - "@aws-sdk/credential-provider-http": "3.916.0", - "@aws-sdk/credential-provider-process": "3.916.0", - "@aws-sdk/credential-provider-sso": "3.919.0", - "@aws-sdk/credential-provider-web-identity": "3.919.0", - "@aws-sdk/nested-clients": "3.919.0", - "@aws-sdk/types": "3.914.0", - "@smithy/credential-provider-imds": "^4.2.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/credential-provider-env": "3.936.0", + "@aws-sdk/credential-provider-http": "3.936.0", + "@aws-sdk/credential-provider-login": "3.936.0", + "@aws-sdk/credential-provider-process": "3.936.0", + "@aws-sdk/credential-provider-sso": "3.936.0", + "@aws-sdk/credential-provider-web-identity": "3.936.0", + "@aws-sdk/nested-clients": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/credential-provider-imds": "^4.2.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-login": { + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.936.0.tgz", + "integrity": "sha512-8DVrdRqPyUU66gfV7VZNToh56ZuO5D6agWrkLQE/xbLJOm2RbeRgh6buz7CqV8ipRd6m+zCl9mM4F3osQLZn8Q==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.936.0", + "@aws-sdk/nested-clients": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1626,22 +1315,22 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.919.0.tgz", - "integrity": "sha512-GL5filyxYS+eZq8ZMQnY5hh79Wxor7Rljo0SUJxZVwEj8cf3zY0MMuwoXU1HQrVabvYtkPDOWSreX8GkIBtBCw==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.936.0.tgz", + "integrity": "sha512-rk/2PCtxX9xDsQW8p5Yjoca3StqmQcSfkmD7nQ61AqAHL1YgpSQWqHE+HjfGGiHDYKG7PvE33Ku2GyA7lEIJAw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "3.916.0", - "@aws-sdk/credential-provider-http": "3.916.0", - "@aws-sdk/credential-provider-ini": "3.919.0", - "@aws-sdk/credential-provider-process": "3.916.0", - "@aws-sdk/credential-provider-sso": "3.919.0", - "@aws-sdk/credential-provider-web-identity": "3.919.0", - "@aws-sdk/types": "3.914.0", - "@smithy/credential-provider-imds": "^4.2.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/credential-provider-env": "3.936.0", + "@aws-sdk/credential-provider-http": "3.936.0", + "@aws-sdk/credential-provider-ini": "3.936.0", + "@aws-sdk/credential-provider-process": "3.936.0", + "@aws-sdk/credential-provider-sso": "3.936.0", + "@aws-sdk/credential-provider-web-identity": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/credential-provider-imds": "^4.2.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1649,16 +1338,16 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.916.0.tgz", - "integrity": "sha512-SXDyDvpJ1+WbotZDLJW1lqP6gYGaXfZJrgFSXIuZjHb75fKeNRgPkQX/wZDdUvCwdrscvxmtyJorp2sVYkMcvA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.936.0.tgz", + "integrity": "sha512-GpA4AcHb96KQK2PSPUyvChvrsEKiLhQ5NWjeef2IZ3Jc8JoosiedYqp6yhZR+S8cTysuvx56WyJIJc8y8OTrLA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/types": "3.914.0", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1666,18 +1355,18 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.919.0.tgz", - "integrity": "sha512-oN1XG/frOc2K2KdVwRQjLTBLM1oSFJLtOhuV/6g9N0ASD+44uVJai1CF9JJv5GjHGV+wsqAt+/Dzde0tZEXirA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.936.0.tgz", + "integrity": "sha512-wHlEAJJvtnSyxTfNhN98JcU4taA1ED2JvuI2eePgawqBwS/Tzi0mhED1lvNIaWOkjfLd+nHALwszGrtJwEq4yQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/client-sso": "3.919.0", - "@aws-sdk/core": "3.916.0", - "@aws-sdk/token-providers": "3.919.0", - "@aws-sdk/types": "3.914.0", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/client-sso": "3.936.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/token-providers": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1685,17 +1374,17 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.919.0.tgz", - "integrity": "sha512-Wi7RmyWA8kUJ++/8YceC7U5r4LyvOHGCnJLDHliP8rOC8HLdSgxw/Upeq3WmC+RPw1zyGOtEDRS/caop2xLXEA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.936.0.tgz", + "integrity": "sha512-v3qHAuoODkoRXsAF4RG+ZVO6q2P9yYBT4GMpMEfU9wXVNn7AIfwZgTwzSUfnjNiGva5BKleWVpRpJ9DeuLFbUg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/nested-clients": "3.919.0", - "@aws-sdk/types": "3.914.0", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/nested-clients": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1703,14 +1392,14 @@ } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.914.0.tgz", - "integrity": "sha512-7r9ToySQ15+iIgXMF/h616PcQStByylVkCshmQqcdeynD/lCn2l667ynckxW4+ql0Q+Bo/URljuhJRxVJzydNA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.936.0.tgz", + "integrity": "sha512-tAaObaAnsP1XnLGndfkGWFuzrJYuk9W0b/nLvol66t8FZExIAf/WdkT2NNAWOYxljVs++oHnyHBCxIlaHrzSiw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1718,13 +1407,13 @@ } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.914.0.tgz", - "integrity": "sha512-/gaW2VENS5vKvJbcE1umV4Ag3NuiVzpsANxtrqISxT3ovyro29o1RezW/Avz/6oJqjnmgz8soe9J1t65jJdiNg==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.936.0.tgz", + "integrity": "sha512-aPSJ12d3a3Ea5nyEnLbijCaaYJT2QjQ9iW+zGh5QcZYXmOGWbKVyPSxmVOboZQG+c1M8t6d2O7tqrwzIq8L8qw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1732,15 +1421,15 @@ } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.919.0.tgz", - "integrity": "sha512-q3MAUxLQve4rTfAannUCx2q1kAHkBBsxt6hVUpzi63KC4lBLScc1ltr7TI+hDxlfGRWGo54jRegb2SsY9Jm+Mw==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.936.0.tgz", + "integrity": "sha512-l4aGbHpXM45YNgXggIux1HgsCVAvvBoqHPkqLnqMl9QVapfuSTjJHfDYDsx1Xxct6/m7qSMUzanBALhiaGO2fA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@aws/lambda-invoke-store": "^0.1.1", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@aws/lambda-invoke-store": "^0.2.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1748,17 +1437,17 @@ } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.916.0.tgz", - "integrity": "sha512-mzF5AdrpQXc2SOmAoaQeHpDFsK2GE6EGcEACeNuoESluPI2uYMpuuNMYrUufdnIAIyqgKlis0NVxiahA5jG42w==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.936.0.tgz", + "integrity": "sha512-YB40IPa7K3iaYX0lSnV9easDOLPLh+fJyUDF3BH8doX4i1AOSsYn86L4lVldmOaSX+DwiaqKHpvk4wPBdcIPWw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/types": "3.914.0", - "@aws-sdk/util-endpoints": "3.916.0", - "@smithy/core": "^3.17.1", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@aws-sdk/util-endpoints": "3.936.0", + "@smithy/core": "^3.18.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1766,47 +1455,47 @@ } }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.919.0.tgz", - "integrity": "sha512-5D9OQsMPkbkp4KHM7JZv/RcGCpr3E1L7XX7U9sCxY+sFGeysltoviTmaIBXsJ2IjAJbBULtf0G/J+2cfH5OP+w==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.936.0.tgz", + "integrity": "sha512-eyj2tz1XmDSLSZQ5xnB7cLTVKkSJnYAEoNDSUNhzWPxrBDYeJzIbatecOKceKCU8NBf8gWWZCK/CSY0mDxMO0A==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.916.0", - "@aws-sdk/middleware-host-header": "3.914.0", - "@aws-sdk/middleware-logger": "3.914.0", - "@aws-sdk/middleware-recursion-detection": "3.919.0", - "@aws-sdk/middleware-user-agent": "3.916.0", - "@aws-sdk/region-config-resolver": "3.914.0", - "@aws-sdk/types": "3.914.0", - "@aws-sdk/util-endpoints": "3.916.0", - "@aws-sdk/util-user-agent-browser": "3.914.0", - "@aws-sdk/util-user-agent-node": "3.916.0", - "@smithy/config-resolver": "^4.4.0", - "@smithy/core": "^3.17.1", - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/hash-node": "^4.2.3", - "@smithy/invalid-dependency": "^4.2.3", - "@smithy/middleware-content-length": "^4.2.3", - "@smithy/middleware-endpoint": "^4.3.5", - "@smithy/middleware-retry": "^4.4.5", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/middleware-stack": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/node-http-handler": "^4.4.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/middleware-host-header": "3.936.0", + "@aws-sdk/middleware-logger": "3.936.0", + "@aws-sdk/middleware-recursion-detection": "3.936.0", + "@aws-sdk/middleware-user-agent": "3.936.0", + "@aws-sdk/region-config-resolver": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@aws-sdk/util-endpoints": "3.936.0", + "@aws-sdk/util-user-agent-browser": "3.936.0", + "@aws-sdk/util-user-agent-node": "3.936.0", + "@smithy/config-resolver": "^4.4.3", + "@smithy/core": "^3.18.5", + "@smithy/fetch-http-handler": "^5.3.6", + "@smithy/hash-node": "^4.2.5", + "@smithy/invalid-dependency": "^4.2.5", + "@smithy/middleware-content-length": "^4.2.5", + "@smithy/middleware-endpoint": "^4.3.12", + "@smithy/middleware-retry": "^4.4.12", + "@smithy/middleware-serde": "^4.2.6", + "@smithy/middleware-stack": "^4.2.5", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/node-http-handler": "^4.4.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.4", - "@smithy/util-defaults-mode-node": "^4.2.6", - "@smithy/util-endpoints": "^3.2.3", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-retry": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.11", + "@smithy/util-defaults-mode-node": "^4.2.14", + "@smithy/util-endpoints": "^3.2.5", + "@smithy/util-middleware": "^4.2.5", + "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, @@ -1815,14 +1504,15 @@ } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.914.0.tgz", - "integrity": "sha512-KlmHhRbn1qdwXUdsdrJ7S/MAkkC1jLpQ11n+XvxUUUCGAJd1gjC7AjxPZUM7ieQ2zcb8bfEzIU7al+Q3ZT0u7Q==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.936.0.tgz", + "integrity": "sha512-wOKhzzWsshXGduxO4pqSiNyL9oUtk4BEvjWm9aaq6Hmfdoydq6v6t0rAGHWPjFwy9z2haovGRi3C8IxdMB4muw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@smithy/config-resolver": "^4.4.0", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@smithy/config-resolver": "^4.4.3", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1830,17 +1520,17 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.919.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.919.0.tgz", - "integrity": "sha512-6aFv4lzXbfbkl0Pv37Us8S/ZkqplOQZIEgQg7bfMru7P96Wv2jVnDGsEc5YyxMnnRyIB90naQ5JgslZ4rkpknw==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.936.0.tgz", + "integrity": "sha512-vvw8+VXk0I+IsoxZw0mX9TMJawUJvEsg3EF7zcCSetwhNPAU8Xmlhv7E/sN/FgSmm7b7DsqKoW6rVtQiCs1PWQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.916.0", - "@aws-sdk/nested-clients": "3.919.0", - "@aws-sdk/types": "3.914.0", - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.936.0", + "@aws-sdk/nested-clients": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1848,12 +1538,12 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.914.0.tgz", - "integrity": "sha512-kQWPsRDmom4yvAfyG6L1lMmlwnTzm1XwMHOU+G5IFlsP4YEaMtXidDzW/wiivY0QFrhfCz/4TVmu0a2aPU57ug==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.936.0.tgz", + "integrity": "sha512-uz0/VlMd2pP5MepdrHizd+T+OKfyK4r3OA9JI+L/lPKg0YFQosdJNCKisr6o70E3dh8iMpFYxF1UN/4uZsyARg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1861,15 +1551,15 @@ } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.916.0.tgz", - "integrity": "sha512-bAgUQwvixdsiGNcuZSDAOWbyHlnPtg8G8TyHD6DTfTmKTHUW6tAn+af/ZYJPXEzXhhpwgJqi58vWnsiDhmr7NQ==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.936.0.tgz", + "integrity": "sha512-0Zx3Ntdpu+z9Wlm7JKUBOzS9EunwKAb4KdGUQQxDqh5Lc3ta5uBoub+FgmVuzwnmBu9U1Os8UuwVTH0Lgu+P5w==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "@smithy/util-endpoints": "^3.2.3", + "@aws-sdk/types": "3.936.0", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", + "@smithy/util-endpoints": "^3.2.5", "tslib": "^2.6.2" }, "engines": { @@ -1889,27 +1579,27 @@ } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.914.0.tgz", - "integrity": "sha512-rMQUrM1ECH4kmIwlGl9UB0BtbHy6ZuKdWFrIknu8yGTRI/saAucqNTh5EI1vWBxZ0ElhK5+g7zOnUuhSmVQYUA==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.936.0.tgz", + "integrity": "sha512-eZ/XF6NxMtu+iCma58GRNRxSq4lHo6zHQLOZRIeL/ghqYJirqHdenMOwrzPettj60KWlv827RVebP9oNVrwZbw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.914.0", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.936.0", + "@smithy/types": "^4.9.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.916.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.916.0.tgz", - "integrity": "sha512-CwfWV2ch6UdjuSV75ZU99N03seEUb31FIUrXBnwa6oONqj/xqXwrxtlUMLx6WH3OJEE4zI3zt5PjlTdGcVwf4g==", + "version": "3.936.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.936.0.tgz", + "integrity": "sha512-XOEc7PF9Op00pWV2AYCGDSu5iHgYjIO53Py2VUQTIvP7SRCaCsXmA33mjBvC2Ms6FhSyWNa4aK4naUGIz0hQcw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/middleware-user-agent": "3.916.0", - "@aws-sdk/types": "3.914.0", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/middleware-user-agent": "3.936.0", + "@aws-sdk/types": "3.936.0", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -1925,12 +1615,12 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.914.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.914.0.tgz", - "integrity": "sha512-k75evsBD5TcIjedycYS7QXQ98AmOtbnxRJOPtCo0IwYRmy7UvqgS/gBL5SmrIqeV6FDSYRQMgdBxSMp6MLmdew==", + "version": "3.930.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.930.0.tgz", + "integrity": "sha512-YIfkD17GocxdmlUVc3ia52QhcWuRIUJonbF8A2CYfcWNV3HzvAqpcPeC0bYUhkK+8e8YO1ARnLKZQE0TlwzorA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "fast-xml-parser": "5.2.5", "tslib": "^2.6.2" }, @@ -1939,9 +1629,9 @@ } }, "node_modules/@aws/lambda-invoke-store": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.1.1.tgz", - "integrity": "sha512-RcLam17LdlbSOSp9VxmUu1eI6Mwxp+OwhD2QhiSNmNCzoDb0EeUXTD2n/WbcnrAYMGlmf05th6QYq23VqvJqpA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.1.tgz", + "integrity": "sha512-sIyFcoPZkTtNu9xFeEoynMef3bPJIAbOfUh+ueYcfhVl6xm2VRtMcMclSxmZCMnHHd4hlYKJeq/aggmBEWynww==", "license": "Apache-2.0", "engines": { "node": ">=18.0.0" @@ -3905,6 +3595,31 @@ "semver": "^7.5.3" } }, + "node_modules/@changesets/apply-release-plan/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/@changesets/apply-release-plan/node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -3921,6 +3636,16 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/@changesets/apply-release-plan/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@changesets/assemble-release-plan": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.9.tgz", @@ -3986,6 +3711,41 @@ "changeset": "bin.js" } }, + "node_modules/@changesets/cli/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/cli/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/cli/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@changesets/config": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.1.tgz", @@ -4002,6 +3762,41 @@ "micromatch": "^4.0.8" } }, + "node_modules/@changesets/config/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/config/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/config/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@changesets/errors": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", @@ -4082,6 +3877,30 @@ "js-yaml": "^3.13.1" } }, + "node_modules/@changesets/parse/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@changesets/pre": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", @@ -4095,6 +3914,41 @@ "fs-extra": "^7.0.1" } }, + "node_modules/@changesets/pre/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/pre/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/pre/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@changesets/read": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.5.tgz", @@ -4111,6 +3965,41 @@ "picocolors": "^1.1.0" } }, + "node_modules/@changesets/read/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/read/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/read/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@changesets/should-skip-package": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", @@ -4142,6 +4031,31 @@ "prettier": "^2.7.1" } }, + "node_modules/@changesets/write/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/write/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/@changesets/write/node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -4158,6 +4072,16 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/@changesets/write/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "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", @@ -4442,10 +4366,10 @@ "postcss": "^8.4" } }, - "node_modules/@csstools/postcss-cascade-layers/node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "node_modules/@csstools/postcss-color-function": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-4.0.12.tgz", + "integrity": "sha512-yx3cljQKRaSBc2hfh8rMZFZzChaFgwmO2JfFgFr1vMcF3C/uyy5I4RFIBOIWGq1D+XbKCG789CGkG6zzkLpagA==", "funding": [ { "type": "github", @@ -4457,59 +4381,24 @@ } ], "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, "engines": { "node": ">=18" }, "peerDependencies": { - "postcss-selector-parser": "^7.0.0" - } - }, - "node_modules/@csstools/postcss-cascade-layers/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" + "postcss": "^8.4" } }, - "node_modules/@csstools/postcss-color-function": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-4.0.12.tgz", - "integrity": "sha512-yx3cljQKRaSBc2hfh8rMZFZzChaFgwmO2JfFgFr1vMcF3C/uyy5I4RFIBOIWGq1D+XbKCG789CGkG6zzkLpagA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/utilities": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-color-function-display-p3-linear": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function-display-p3-linear/-/postcss-color-function-display-p3-linear-1.0.1.tgz", - "integrity": "sha512-E5qusdzhlmO1TztYzDIi8XPdPoYOjoTY6HBYBCYSj+Gn4gQRBlvjgPQXzfzuPQqt8EhkC/SzPKObg4Mbn8/xMg==", + "node_modules/@csstools/postcss-color-function-display-p3-linear": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function-display-p3-linear/-/postcss-color-function-display-p3-linear-1.0.1.tgz", + "integrity": "sha512-E5qusdzhlmO1TztYzDIi8XPdPoYOjoTY6HBYBCYSj+Gn4gQRBlvjgPQXzfzuPQqt8EhkC/SzPKObg4Mbn8/xMg==", "funding": [ { "type": "github", @@ -4863,41 +4752,6 @@ "postcss": "^8.4" } }, - "node_modules/@csstools/postcss-is-pseudo-class/node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^7.0.0" - } - }, - "node_modules/@csstools/postcss-is-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@csstools/postcss-light-dark-function": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-2.0.11.tgz", @@ -5284,19 +5138,6 @@ "postcss": "^8.4" } }, - "node_modules/@csstools/postcss-scope-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@csstools/postcss-sign-functions": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@csstools/postcss-sign-functions/-/postcss-sign-functions-1.1.4.tgz", @@ -5426,6 +5267,50 @@ "postcss": "^8.4" } }, + "node_modules/@csstools/selector-resolve-nested": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.1.0.tgz", + "integrity": "sha512-mf1LEW0tJLKfWyvn5KdDrhpxHyuxpbNwTIwOYLIvsTffeyOf85j5oIzfG0yosxDgx/sswlqBnESYUcQH0vgZ0g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, "node_modules/@csstools/utilities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@csstools/utilities/-/utilities-2.0.0.tgz", @@ -5457,21 +5342,44 @@ "node": ">=10.0.0" } }, + "node_modules/@docsearch/core": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@docsearch/core/-/core-4.3.1.tgz", + "integrity": "sha512-ktVbkePE+2h9RwqCUMbWXOoebFyDOxHqImAqfs+lC8yOU+XwEW4jgvHGJK079deTeHtdhUNj0PXHSnhJINvHzQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": ">= 16.8.0 < 20.0.0", + "react": ">= 16.8.0 < 20.0.0", + "react-dom": ">= 16.8.0 < 20.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/@docsearch/css": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.2.0.tgz", - "integrity": "sha512-65KU9Fw5fGsPPPlgIghonMcndyx1bszzrDQYLfierN+Ha29yotMHzVS94bPkZS6On9LS8dE4qmW4P/fGjtCf/g==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.3.2.tgz", + "integrity": "sha512-K3Yhay9MgkBjJJ0WEL5MxnACModX9xuNt3UlQQkDEDZJZ0+aeWKtOkxHNndMRkMBnHdYvQjxkm6mdlneOtU1IQ==", "license": "MIT" }, "node_modules/@docsearch/react": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-4.2.0.tgz", - "integrity": "sha512-zSN/KblmtBcerf7Z87yuKIHZQmxuXvYc6/m0+qnjyNu+Ir67AVOagTa1zBqcxkVUVkmBqUExdcyrdo9hbGbqTw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-4.3.2.tgz", + "integrity": "sha512-74SFD6WluwvgsOPqifYOviEEVwDxslxfhakTlra+JviaNcs7KK/rjsPj89kVEoQc9FUxRkAofaJnHIR7pb4TSQ==", "license": "MIT", "dependencies": { "@ai-sdk/react": "^2.0.30", "@algolia/autocomplete-core": "1.19.2", - "@docsearch/css": "4.2.0", + "@docsearch/core": "4.3.1", + "@docsearch/css": "4.3.2", "ai": "^5.0.30", "algoliasearch": "^5.28.0", "marked": "^16.3.0", @@ -5524,41 +5432,6 @@ "node": ">=20.0" } }, - "node_modules/@docusaurus/babel/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/babel/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/babel/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/bundler": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.9.2.tgz", @@ -5698,39 +5571,65 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/core/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "node_modules/@docusaurus/core/node_modules/boxen": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz", + "integrity": "sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==", "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "ansi-align": "^3.0.1", + "camelcase": "^6.2.0", + "chalk": "^4.1.2", + "cli-boxes": "^3.0.0", + "string-width": "^5.0.1", + "type-fest": "^2.5.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" }, "engines": { - "node": ">=14.14" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@docusaurus/core/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "node_modules/@docusaurus/core/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@docusaurus/core/node_modules/react-router-dom": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.4.tgz", + "integrity": "sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==", "license": "MIT", "dependencies": { - "universalify": "^2.0.0" + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.3.4", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "peerDependencies": { + "react": ">=15" } }, - "node_modules/@docusaurus/core/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", + "node_modules/@docusaurus/core/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">= 10.0.0" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@docusaurus/cssnano-preset": { @@ -5800,41 +5699,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/mdx-loader/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/mdx-loader/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/mdx-loader/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/module-type-aliases": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.9.2.tgz", @@ -5888,41 +5752,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-content-blog/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/plugin-content-blog/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/plugin-content-blog/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/plugin-content-docs": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", @@ -5956,59 +5785,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/plugin-content-pages": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.9.2.tgz", @@ -6032,41 +5808,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-content-pages/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/plugin-content-pages/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/plugin-content-pages/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/plugin-css-cascade-layers": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-css-cascade-layers/-/plugin-css-cascade-layers-3.9.2.tgz", @@ -6104,41 +5845,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-debug/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/plugin-debug/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/plugin-debug/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/plugin-google-analytics": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.9.2.tgz", @@ -6221,41 +5927,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-sitemap/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/plugin-sitemap/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/plugin-sitemap/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/plugin-svgr": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-svgr/-/plugin-svgr-3.9.2.tgz", @@ -6349,6 +6020,24 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, + "node_modules/@docusaurus/theme-classic/node_modules/react-router-dom": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.4.tgz", + "integrity": "sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.3.4", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, "node_modules/@docusaurus/theme-common": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.9.2.tgz", @@ -6401,41 +6090,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/theme-live-codeblock/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/theme-live-codeblock/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/theme-live-codeblock/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/theme-mermaid": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.9.2.tgz", @@ -6495,41 +6149,6 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/theme-translations": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.9.2.tgz", @@ -6543,41 +6162,6 @@ "node": ">=20.0" } }, - "node_modules/@docusaurus/theme-translations/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/theme-translations/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/theme-translations/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@docusaurus/tsconfig": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.9.2.tgz", @@ -6607,6 +6191,15 @@ "react-dom": "^18.0.0 || ^19.0.0" } }, + "node_modules/@docusaurus/types/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/@docusaurus/types/node_modules/webpack-merge": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", @@ -6685,112 +6278,6 @@ "node": ">=20.0" } }, - "node_modules/@docusaurus/utils-validation/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/@docusaurus/utils-validation/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/utils-validation/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@docusaurus/utils-validation/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/utils-validation/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@docusaurus/utils/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/@docusaurus/utils/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@docusaurus/utils/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@docusaurus/utils/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@docusaurus/utils/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz", @@ -6866,298 +6353,281 @@ } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", + "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", "cpu": [ "arm64" ], @@ -7172,26 +6642,25 @@ } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", + "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", "cpu": [ "arm64" ], @@ -7206,26 +6675,25 @@ } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", + "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", "cpu": [ "arm64" ], @@ -7240,71 +6708,67 @@ } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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" + "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, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "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==", + "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, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@eslint-community/eslint-utils": { @@ -7351,30 +6815,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/config-helpers": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", @@ -7388,7 +6828,7 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/config-helpers/node_modules/@eslint/core": { + "node_modules/@eslint/core": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", @@ -7401,30 +6841,17 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", - "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -7432,83 +6859,32 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=18" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/js": { - "version": "9.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", - "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, "license": "MIT", "engines": { @@ -7542,19 +6918,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@google-cloud/bigquery": { "version": "7.9.4", "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-7.9.4.tgz", @@ -7623,6 +6986,152 @@ "node": ">=14.0.0" } }, + "node_modules/@google-cloud/common/node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@google-cloud/common/node_modules/gaxios": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/common/node_modules/gcp-metadata": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", + "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^6.1.1", + "google-logging-utils": "^0.0.2", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/common/node_modules/google-auth-library": { + "version": "9.15.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", + "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", + "gtoken": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/common/node_modules/google-logging-utils": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", + "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/common/node_modules/gtoken": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "license": "MIT", + "dependencies": { + "gaxios": "^6.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/common/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@google-cloud/common/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@google-cloud/common/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/@google-cloud/common/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" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@google-cloud/common/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/@google-cloud/common/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/@google-cloud/functions-framework": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/@google-cloud/functions-framework/-/functions-framework-3.5.1.tgz", @@ -7752,30 +7261,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -7813,9 +7298,9 @@ } }, "node_modules/@iconify/react": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@iconify/react/-/react-5.2.1.tgz", - "integrity": "sha512-37GDR3fYDZmnmUn9RagyaX+zca24jfVOMY8E1IXTqJuE8pxNtN51KWPQe3VODOWvuUurq7q9uUu3CFrpqj5Iqg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@iconify/react/-/react-6.0.2.tgz", + "integrity": "sha512-SMmC2sactfpJD427WJEDN6PMyznTFMhByK9yLW0gOTtnjzzbsi/Ke/XqsumsavFPwNiXs8jSiYeZTmLCLwO+Fg==", "license": "MIT", "dependencies": { "@iconify/types": "^2.0.0" @@ -7862,13 +7347,13 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", - "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", "dev": true, "license": "MIT", "dependencies": { - "chardet": "^2.1.0", + "chardet": "^2.1.1", "iconv-lite": "^0.7.0" }, "engines": { @@ -7944,6 +7429,16 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -7954,6 +7449,60 @@ "node": ">=6" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -8451,17 +8000,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@jest/reporters/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -8484,19 +8022,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@jest/reporters/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@jest/schemas": { "version": "30.0.5", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", @@ -8915,6 +8440,20 @@ "dev": true, "license": "MIT" }, + "node_modules/@manypkg/find-root/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@manypkg/find-root/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -8930,6 +8469,52 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/@manypkg/find-root/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@manypkg/find-root/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@manypkg/get-packages": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", @@ -8967,6 +8552,26 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/@manypkg/get-packages/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@manypkg/get-packages/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@mdx-js/mdx": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.1.tgz", @@ -9031,9 +8636,9 @@ } }, "node_modules/@monaco-editor/loader": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.6.1.tgz", - "integrity": "sha512-w3tEnj9HYEC73wtjdpR089AqkUPskFRcdkxsiSFt3SoUc3OHpmu+leP94CXBm4mHfefmhsdfI0ZQu6qJ0wgtPg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.7.0.tgz", + "integrity": "sha512-gIwR1HrJrrx+vfyOhYmCZ0/JcWqG5kbfG7+d3f/C1LXk2EvzAbHSg3MQ5lO2sMlo9izoAZ04shohfKLVT6crVA==", "license": "MIT", "dependencies": { "state-local": "^1.0.6" @@ -9181,16 +8786,6 @@ "node": ">=8" } }, - "node_modules/@npmcli/config/node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@npmcli/fs": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", @@ -9223,15 +8818,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@npmcli/git/node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@npmcli/git/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", @@ -9294,6 +8880,32 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@npmcli/name-from-folder": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz", @@ -9331,47 +8943,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@npmcli/package-json/node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/package-json/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==", - "license": "ISC" - }, - "node_modules/@npmcli/package-json/node_modules/normalize-package-data": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", - "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/@npmcli/promise-spawn": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz", @@ -10193,9 +9764,9 @@ "license": "MIT" }, "node_modules/@remix-run/router": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.0.tgz", - "integrity": "sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==", + "version": "1.23.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.1.tgz", + "integrity": "sha512-vDbaOzF7yT2Qs4vO6XV1MHcJv+3dgR1sT+l3B8xxOVhUC336prMvqrvsLL/9Dnw2xr6Qhz4J0dmS0llNAbnUmQ==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -10286,9 +9857,9 @@ "license": "MIT" }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-beta.43", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.43.tgz", - "integrity": "sha512-5Uxg7fQUCmfhax7FJke2+8B6cqgeUJUD9o2uXIKXhD+mG0mL6NObmVoi9wXEU1tY89mZKgAYA6fTbftx3q2ZPQ==", + "version": "1.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.51.tgz", + "integrity": "sha512-51/8cNXMrqWqX3o8DZidhwz1uYq0BhHDDSfVygAND1Skx5s1TDw3APSSxCMcFFedwgqGcx34gRouwY+m404BBQ==", "dev": true, "license": "MIT" }, @@ -10323,9 +9894,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz", - "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz", + "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==", "cpu": [ "arm" ], @@ -10337,9 +9908,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz", - "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz", + "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==", "cpu": [ "arm64" ], @@ -10351,9 +9922,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz", - "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz", + "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==", "cpu": [ "arm64" ], @@ -10365,9 +9936,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz", - "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz", + "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==", "cpu": [ "x64" ], @@ -10379,9 +9950,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz", - "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz", + "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==", "cpu": [ "arm64" ], @@ -10393,9 +9964,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz", - "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz", + "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==", "cpu": [ "x64" ], @@ -10407,9 +9978,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz", - "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz", + "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==", "cpu": [ "arm" ], @@ -10421,9 +9992,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz", - "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz", + "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==", "cpu": [ "arm" ], @@ -10435,9 +10006,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz", - "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz", + "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==", "cpu": [ "arm64" ], @@ -10449,9 +10020,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz", - "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz", + "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==", "cpu": [ "arm64" ], @@ -10463,9 +10034,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz", - "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz", + "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==", "cpu": [ "loong64" ], @@ -10477,9 +10048,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz", - "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz", + "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==", "cpu": [ "ppc64" ], @@ -10491,9 +10062,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz", - "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz", + "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==", "cpu": [ "riscv64" ], @@ -10505,9 +10076,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz", - "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz", + "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==", "cpu": [ "riscv64" ], @@ -10519,9 +10090,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz", - "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz", + "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==", "cpu": [ "s390x" ], @@ -10533,9 +10104,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", - "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz", + "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==", "cpu": [ "x64" ], @@ -10547,9 +10118,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz", - "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz", + "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==", "cpu": [ "x64" ], @@ -10561,9 +10132,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz", - "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz", + "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==", "cpu": [ "arm64" ], @@ -10575,9 +10146,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz", - "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz", + "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==", "cpu": [ "arm64" ], @@ -10589,9 +10160,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz", - "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz", + "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==", "cpu": [ "ia32" ], @@ -10603,9 +10174,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz", - "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz", + "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==", "cpu": [ "x64" ], @@ -10617,9 +10188,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz", - "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz", + "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==", "cpu": [ "x64" ], @@ -10776,12 +10347,12 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.5.tgz", + "integrity": "sha512-j7HwVkBw68YW8UmFRcjZOmssE77Rvk0GWAIN1oFBhsaovQmZWYCIcGa9/pwRB0ExI8Sk9MWNALTjftjHZea7VA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10789,16 +10360,16 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.0.tgz", - "integrity": "sha512-Kkmz3Mup2PGp/HNJxhCWkLNdlajJORLSjwkcfrj0E7nu6STAEdcMR1ir5P9/xOmncx8xXfru0fbUYLlZog/cFg==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.3.tgz", + "integrity": "sha512-ezHLe1tKLUxDJo2LHtDuEDyWXolw8WGOR92qb4bQdWq/zKenO5BvctZGrVJBK08zjezSk7bmbKFOXIVyChvDLw==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/types": "^4.9.0", "@smithy/util-config-provider": "^4.2.0", - "@smithy/util-endpoints": "^3.2.3", - "@smithy/util-middleware": "^4.2.3", + "@smithy/util-endpoints": "^3.2.5", + "@smithy/util-middleware": "^4.2.5", "tslib": "^2.6.2" }, "engines": { @@ -10806,18 +10377,18 @@ } }, "node_modules/@smithy/core": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.1.tgz", - "integrity": "sha512-V4Qc2CIb5McABYfaGiIYLTmo/vwNIK7WXI5aGveBd9UcdhbOMwcvIMxIw/DJj1S9QgOMa/7FBkarMdIC0EOTEQ==", + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.18.5.tgz", + "integrity": "sha512-6gnIz3h+PEPQGDj8MnRSjDvKBah042jEoPgjFGJ4iJLBE78L4lY/n98x14XyPF4u3lN179Ub/ZKFY5za9GeLQw==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@smithy/middleware-serde": "^4.2.6", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.4", + "@smithy/util-middleware": "^4.2.5", + "@smithy/util-stream": "^4.5.6", "@smithy/util-utf8": "^4.2.0", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" @@ -10827,15 +10398,15 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.3.tgz", - "integrity": "sha512-hA1MQ/WAHly4SYltJKitEsIDVsNmXcQfYBRv2e+q04fnqtAX5qXaybxy/fhUeAMCnQIdAjaGDb04fMHQefWRhw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.5.tgz", + "integrity": "sha512-BZwotjoZWn9+36nimwm/OLIcVe+KYRwzMjfhd4QT7QxPm9WY0HiOV8t/Wlh+HVUif0SBVV7ksq8//hPaBC/okQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", "tslib": "^2.6.2" }, "engines": { @@ -10843,14 +10414,14 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.6.tgz", + "integrity": "sha512-3+RG3EA6BBJ/ofZUeTFJA7mHfSYrZtQIrDP9dI8Lf7X6Jbos2jptuLrAAteDiFVrmbEmLSuRG/bUKzfAXk7dhg==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/querystring-builder": "^4.2.5", + "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "tslib": "^2.6.2" }, @@ -10859,12 +10430,12 @@ } }, "node_modules/@smithy/hash-node": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.3.tgz", - "integrity": "sha512-6+NOdZDbfuU6s1ISp3UOk5Rg953RJ2aBLNLLBEcamLjHAg1Po9Ha7QIB5ZWhdRUVuOUrT8BVFR+O2KIPmw027g==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.5.tgz", + "integrity": "sha512-DpYX914YOfA3UDT9CN1BM787PcHfWRBB43fFGCYrZFUH0Jv+5t8yYl+Pd5PW4+QzoGEDvn5d5QIO4j2HyYZQSA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" @@ -10874,12 +10445,12 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.3.tgz", - "integrity": "sha512-Cc9W5DwDuebXEDMpOpl4iERo8I0KFjTnomK2RMdhhR87GwrSmUmwMxS4P5JdRf+LsjOdIqumcerwRgYMr/tZ9Q==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.5.tgz", + "integrity": "sha512-2L2erASEro1WC5nV+plwIMxrTXpvpfzl4e+Nre6vBVRR2HKeGGcvpJyyL3/PpiSg+cJG2KpTmZmq934Olb6e5A==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10899,13 +10470,13 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.3.tgz", - "integrity": "sha512-/atXLsT88GwKtfp5Jr0Ks1CSa4+lB+IgRnkNrrYP0h1wL4swHNb0YONEvTceNKNdZGJsye+W2HH8W7olbcPUeA==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.5.tgz", + "integrity": "sha512-Y/RabVa5vbl5FuHYV2vUCwvh/dqzrEY/K2yWPSqvhFUwIY0atLqO4TienjBXakoy4zrKAMCZwg+YEqmH7jaN7A==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10913,18 +10484,18 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.5.tgz", - "integrity": "sha512-SIzKVTvEudFWJbxAaq7f2GvP3jh2FHDpIFI6/VAf4FOWGFZy0vnYMPSRj8PGYI8Hjt29mvmwSRgKuO3bK4ixDw==", + "version": "4.3.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.12.tgz", + "integrity": "sha512-9pAX/H+VQPzNbouhDhkW723igBMLgrI8OtX+++M7iKJgg/zY/Ig3i1e6seCcx22FWhE6Q/S61BRdi2wXBORT+A==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.17.1", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "@smithy/util-middleware": "^4.2.3", + "@smithy/core": "^3.18.5", + "@smithy/middleware-serde": "^4.2.6", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", + "@smithy/url-parser": "^4.2.5", + "@smithy/util-middleware": "^4.2.5", "tslib": "^2.6.2" }, "engines": { @@ -10932,18 +10503,18 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.5.tgz", - "integrity": "sha512-DCaXbQqcZ4tONMvvdz+zccDE21sLcbwWoNqzPLFlZaxt1lDtOE2tlVpRSwcTOJrjJSUThdgEYn7HrX5oLGlK9A==", + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.12.tgz", + "integrity": "sha512-S4kWNKFowYd0lID7/DBqWHOQxmxlsf0jBaos9chQZUWTVOjSW1Ogyh8/ib5tM+agFDJ/TCxuCTvrnlc+9cIBcQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/service-error-classification": "^4.2.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-retry": "^4.2.3", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/service-error-classification": "^4.2.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", + "@smithy/util-middleware": "^4.2.5", + "@smithy/util-retry": "^4.2.5", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, @@ -10952,13 +10523,13 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.6.tgz", + "integrity": "sha512-VkLoE/z7e2g8pirwisLz8XJWedUSY8my/qrp81VmAdyrhi94T+riBfwP+AOEEFR9rFTSonC/5D2eWNmFabHyGQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10966,12 +10537,12 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.3.tgz", - "integrity": "sha512-iGuOJkH71faPNgOj/gWuEGS6xvQashpLwWB1HjHq1lNNiVfbiJLpZVbhddPuDbx9l4Cgl0vPLq5ltRfSaHfspA==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.5.tgz", + "integrity": "sha512-bYrutc+neOyWxtZdbB2USbQttZN0mXaOyYLIsaTbJhFsfpXyGWUxJpEuO1rJ8IIJm2qH4+xJT0mxUSsEDTYwdQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10979,14 +10550,14 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.5.tgz", + "integrity": "sha512-UTurh1C4qkVCtqggI36DGbLB2Kv8UlcFdMXDcWMbqVY2uRg0XmT9Pb4Vj6oSQ34eizO1fvR0RnFV4Axw4IrrAg==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/shared-ini-file-loader": "^4.4.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -10994,15 +10565,15 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.3.tgz", - "integrity": "sha512-MAwltrDB0lZB/H6/2M5PIsISSwdI5yIh6DaBB9r0Flo9nx3y0dzl/qTMJPd7tJvPdsx6Ks/cwVzheGNYzXyNbQ==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.5.tgz", + "integrity": "sha512-CMnzM9R2WqlqXQGtIlsHMEZfXKJVTIrqCNoSd/QpAyp+Dw0a1Vps13l6ma1fH8g7zSPNsA59B/kWgeylFuA/lw==", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/abort-controller": "^4.2.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/querystring-builder": "^4.2.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11010,12 +10581,12 @@ } }, "node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.5.tgz", + "integrity": "sha512-8iLN1XSE1rl4MuxvQ+5OSk/Zb5El7NJZ1td6Tn+8dQQHIjp59Lwl6bd0+nzw6SKm2wSSriH2v/I9LPzUic7EOg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11023,12 +10594,12 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.5.tgz", + "integrity": "sha512-RlaL+sA0LNMp03bf7XPbFmT5gN+w3besXSWMkA8rcmxLSVfiEXElQi4O2IWwPfxzcHkxqrwBFMbngB8yx/RvaQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11036,12 +10607,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.5.tgz", + "integrity": "sha512-y98otMI1saoajeik2kLfGyRp11e5U/iJYH/wLCh3aTV/XutbGT9nziKGkgCaMD1ghK7p6htHMm6b6scl9JRUWg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" }, @@ -11050,12 +10621,12 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.5.tgz", + "integrity": "sha512-031WCTdPYgiQRYNPXznHXof2YM0GwL6SeaSyTH/P72M1Vz73TvCNH2Nq8Iu2IEPq9QP2yx0/nrw5YmSeAi/AjQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11063,24 +10634,24 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.3.tgz", - "integrity": "sha512-NkxsAxFWwsPsQiwFG2MzJ/T7uIR6AQNh1SzcxSUnmmIqIQMlLRQDKhc17M7IYjiuBXhrQRjQTo3CxX+DobS93g==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.5.tgz", + "integrity": "sha512-8fEvK+WPE3wUAcDvqDQG1Vk3ANLR8Px979te96m84CbKAjBVf25rPYSzb4xU4hlTyho7VhOGnh5i62D/JVF0JQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0" + "@smithy/types": "^4.9.0" }, "engines": { "node": ">=18.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.0.tgz", + "integrity": "sha512-5WmZ5+kJgJDjwXXIzr1vDTG+RhF9wzSODQBfkrQ2VVkYALKGvZX1lgVSxEkgicSAFnFhPj5rudJV0zoinqS0bA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11088,16 +10659,16 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.3.tgz", - "integrity": "sha512-CmSlUy+eEYbIEYN5N3vvQTRfqt0lJlQkaQUIf+oizu7BbDut0pozfDjBGecfcfWf7c62Yis4JIEgqQ/TCfodaA==", + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.5.tgz", + "integrity": "sha512-xSUfMu1FT7ccfSXkoLl/QRQBi2rOvi3tiBZU2Tdy3I6cgvZ6SEi9QNey+lqps/sJRnogIS+lq+B1gxxbra2a/w==", "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^4.2.0", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", + "@smithy/util-middleware": "^4.2.5", "@smithy/util-uri-escape": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" @@ -11107,17 +10678,17 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.1.tgz", - "integrity": "sha512-Ngb95ryR5A9xqvQFT5mAmYkCwbXvoLavLFwmi7zVg/IowFPCfiqRfkOKnbc/ZRL8ZKJ4f+Tp6kSu6wjDQb8L/g==", + "version": "4.9.8", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.8.tgz", + "integrity": "sha512-8xgq3LgKDEFoIrLWBho/oYKyWByw9/corz7vuh1upv7ZBm0ZMjGYBhbn6v643WoIqA9UTcx5A5htEp/YatUwMA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.17.1", - "@smithy/middleware-endpoint": "^4.3.5", - "@smithy/middleware-stack": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-stream": "^4.5.4", + "@smithy/core": "^3.18.5", + "@smithy/middleware-endpoint": "^4.3.12", + "@smithy/middleware-stack": "^4.2.5", + "@smithy/protocol-http": "^5.3.5", + "@smithy/types": "^4.9.0", + "@smithy/util-stream": "^4.5.6", "tslib": "^2.6.2" }, "engines": { @@ -11125,9 +10696,9 @@ } }, "node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.9.0.tgz", + "integrity": "sha512-MvUbdnXDTwykR8cB1WZvNNwqoWVaTRA0RLlLmf/cIFNMM2cKWz01X4Ly6SMC4Kks30r8tT3Cty0jmeWfiuyHTA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -11137,13 +10708,13 @@ } }, "node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.5.tgz", + "integrity": "sha512-VaxMGsilqFnK1CeBX+LXnSuaMx4sTL/6znSZh2829txWieazdVxr54HmiyTsIbpOTLcf5nYpq9lpzmwRdxj6rQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/querystring-parser": "^4.2.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11214,14 +10785,14 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.4.tgz", - "integrity": "sha512-qI5PJSW52rnutos8Bln8nwQZRpyoSRN6k2ajyoUHNMUzmWqHnOJCnDELJuV6m5PML0VkHI+XcXzdB+6awiqYUw==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.11.tgz", + "integrity": "sha512-yHv+r6wSQXEXTPVCIQTNmXVWs7ekBTpMVErjqZoWkYN75HIFN5y9+/+sYOejfAuvxWGvgzgxbTHa/oz61YTbKw==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", + "@smithy/property-provider": "^4.2.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11229,17 +10800,17 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.6.tgz", - "integrity": "sha512-c6M/ceBTm31YdcFpgfgQAJaw3KbaLuRKnAz91iMWFLSrgxRpYm03c3bu5cpYojNMfkV9arCUelelKA7XQT36SQ==", + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.14.tgz", + "integrity": "sha512-ljZN3iRvaJUgulfvobIuG97q1iUuCMrvXAlkZ4msY+ZuVHQHDIqn7FKZCEj+bx8omz6kF5yQXms/xhzjIO5XiA==", "license": "Apache-2.0", "dependencies": { - "@smithy/config-resolver": "^4.4.0", - "@smithy/credential-provider-imds": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/smithy-client": "^4.9.1", - "@smithy/types": "^4.8.0", + "@smithy/config-resolver": "^4.4.3", + "@smithy/credential-provider-imds": "^4.2.5", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/property-provider": "^4.2.5", + "@smithy/smithy-client": "^4.9.8", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11247,13 +10818,13 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.3.tgz", - "integrity": "sha512-aCfxUOVv0CzBIkU10TubdgKSx5uRvzH064kaiPEWfNIvKOtNpu642P4FP1hgOFkjQIkDObrfIDnKMKkeyrejvQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.5.tgz", + "integrity": "sha512-3O63AAWu2cSNQZp+ayl9I3NapW1p1rR5mlVHcF6hAB1dPZUQFfRPYtplWX/3xrzWthPGj5FqB12taJJCfH6s8A==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/node-config-provider": "^4.3.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11273,12 +10844,12 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.5.tgz", + "integrity": "sha512-6Y3+rvBF7+PZOc40ybeZMcGln6xJGVeY60E7jy9Mv5iKpMJpHgRE6dKy9ScsVxvfAYuEX4Q9a65DQX90KaQ3bA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11286,13 +10857,13 @@ } }, "node_modules/@smithy/util-retry": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.3.tgz", - "integrity": "sha512-lLPWnakjC0q9z+OtiXk+9RPQiYPNAovt2IXD3CP4LkOnd9NpUsxOjMx1SnoUVB7Orb7fZp67cQMtTBKMFDvOGg==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.5.tgz", + "integrity": "sha512-GBj3+EZBbN4NAqJ/7pAhsXdfzdlznOh8PydUijy6FpNIMnHPSMO2/rP4HKu+UFeikJxShERk528oy7GT79YiJg==", "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/service-error-classification": "^4.2.5", + "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "engines": { @@ -11300,14 +10871,14 @@ } }, "node_modules/@smithy/util-stream": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.4.tgz", - "integrity": "sha512-+qDxSkiErejw1BAIXUFBSfM5xh3arbz1MmxlbMCKanDDZtVEQ7PSKW9FQS0Vud1eI/kYn0oCTVKyNzRlq+9MUw==", + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.6.tgz", + "integrity": "sha512-qWw/UM59TiaFrPevefOZ8CNBKbYEP6wBAIlLqxn3VAIo9rgnTNc4ASbVrqDmhuwI87usnjhdQrxodzAGFFzbRQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.3", - "@smithy/types": "^4.8.0", + "@smithy/fetch-http-handler": "^5.3.6", + "@smithy/node-http-handler": "^4.4.5", + "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-hex-encoding": "^4.2.0", @@ -11860,9 +11431,9 @@ } }, "node_modules/@swc/core": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.14.0.tgz", - "integrity": "sha512-oExhY90bes5pDTVrei0xlMVosTxwd/NMafIpqsC4dMbRYZ5KB981l/CX8tMnGsagTplj/RcG9BeRYmV6/J5m3w==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.3.tgz", + "integrity": "sha512-Qd8eBPkUFL4eAONgGjycZXj1jFCBW8Fd+xF0PzdTlBCWQIV1xnUT7B93wUANtW3KGjl3TRcOyxwSx/u/jyKw/Q==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -11878,16 +11449,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.14.0", - "@swc/core-darwin-x64": "1.14.0", - "@swc/core-linux-arm-gnueabihf": "1.14.0", - "@swc/core-linux-arm64-gnu": "1.14.0", - "@swc/core-linux-arm64-musl": "1.14.0", - "@swc/core-linux-x64-gnu": "1.14.0", - "@swc/core-linux-x64-musl": "1.14.0", - "@swc/core-win32-arm64-msvc": "1.14.0", - "@swc/core-win32-ia32-msvc": "1.14.0", - "@swc/core-win32-x64-msvc": "1.14.0" + "@swc/core-darwin-arm64": "1.15.3", + "@swc/core-darwin-x64": "1.15.3", + "@swc/core-linux-arm-gnueabihf": "1.15.3", + "@swc/core-linux-arm64-gnu": "1.15.3", + "@swc/core-linux-arm64-musl": "1.15.3", + "@swc/core-linux-x64-gnu": "1.15.3", + "@swc/core-linux-x64-musl": "1.15.3", + "@swc/core-win32-arm64-msvc": "1.15.3", + "@swc/core-win32-ia32-msvc": "1.15.3", + "@swc/core-win32-x64-msvc": "1.15.3" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" @@ -11899,9 +11470,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.14.0.tgz", - "integrity": "sha512-uHPC8rlCt04nvYNczWzKVdgnRhxCa3ndKTBBbBpResOZsRmiwRAvByIGh599j+Oo6Z5eyTPrgY+XfJzVmXnN7Q==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.3.tgz", + "integrity": "sha512-AXfeQn0CvcQ4cndlIshETx6jrAM45oeUrK8YeEY6oUZU/qzz0Id0CyvlEywxkWVC81Ajpd8TQQ1fW5yx6zQWkQ==", "cpu": [ "arm64" ], @@ -11916,9 +11487,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.14.0.tgz", - "integrity": "sha512-2SHrlpl68vtePRknv9shvM9YKKg7B9T13tcTg9aFCwR318QTYo+FzsKGmQSv9ox/Ua0Q2/5y2BNjieffJoo4nA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.3.tgz", + "integrity": "sha512-p68OeCz1ui+MZYG4wmfJGvcsAcFYb6Sl25H9TxWl+GkBgmNimIiRdnypK9nBGlqMZAcxngNPtnG3kEMNnvoJ2A==", "cpu": [ "x64" ], @@ -11933,9 +11504,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.14.0.tgz", - "integrity": "sha512-SMH8zn01dxt809svetnxpeg/jWdpi6dqHKO3Eb11u4OzU2PK7I5uKS6gf2hx5LlTbcJMFKULZiVwjlQLe8eqtg==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.3.tgz", + "integrity": "sha512-Nuj5iF4JteFgwrai97mUX+xUOl+rQRHqTvnvHMATL/l9xE6/TJfPBpd3hk/PVpClMXG3Uvk1MxUFOEzM1JrMYg==", "cpu": [ "arm" ], @@ -11950,9 +11521,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.14.0.tgz", - "integrity": "sha512-q2JRu2D8LVqGeHkmpVCljVNltG0tB4o4eYg+dElFwCS8l2Mnt9qurMCxIeo9mgoqz0ax+k7jWtIRHktnVCbjvQ==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.3.tgz", + "integrity": "sha512-2Nc/s8jE6mW2EjXWxO/lyQuLKShcmTrym2LRf5Ayp3ICEMX6HwFqB1EzDhwoMa2DcUgmnZIalesq2lG3krrUNw==", "cpu": [ "arm64" ], @@ -11967,9 +11538,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.14.0.tgz", - "integrity": "sha512-uofpVoPCEUjYIv454ZEZ3sLgMD17nIwlz2z7bsn7rl301Kt/01umFA7MscUovFfAK2IRGck6XB+uulMu6aFhKQ==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.3.tgz", + "integrity": "sha512-j4SJniZ/qaZ5g8op+p1G9K1z22s/EYGg1UXIb3+Cg4nsxEpF5uSIGEE4mHUfA70L0BR9wKT2QF/zv3vkhfpX4g==", "cpu": [ "arm64" ], @@ -11984,9 +11555,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.14.0.tgz", - "integrity": "sha512-quTTx1Olm05fBfv66DEBuOsOgqdypnZ/1Bh3yGXWY7ANLFeeRpCDZpljD9BSjdsNdPOlwJmEUZXMHtGm3v1TZQ==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.3.tgz", + "integrity": "sha512-aKttAZnz8YB1VJwPQZtyU8Uk0BfMP63iDMkvjhJzRZVgySmqt/apWSdnoIcZlUoGheBrcqbMC17GGUmur7OT5A==", "cpu": [ "x64" ], @@ -12001,9 +11572,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.14.0.tgz", - "integrity": "sha512-caaNAu+aIqT8seLtCf08i8C3/UC5ttQujUjejhMcuS1/LoCKtNiUs4VekJd2UGt+pyuuSrQ6dKl8CbCfWvWeXw==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.3.tgz", + "integrity": "sha512-oe8FctPu1gnUsdtGJRO2rvOUIkkIIaHqsO9xxN0bTR7dFTlPTGi2Fhk1tnvXeyAvCPxLIcwD8phzKg6wLv9yug==", "cpu": [ "x64" ], @@ -12018,9 +11589,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.14.0.tgz", - "integrity": "sha512-EeW3jFlT3YNckJ6V/JnTfGcX7UHGyh6/AiCPopZ1HNaGiXVCKHPpVQZicmtyr/UpqxCXLrTgjHOvyMke7YN26A==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.3.tgz", + "integrity": "sha512-L9AjzP2ZQ/Xh58e0lTRMLvEDrcJpR7GwZqAtIeNLcTK7JVE+QineSyHp0kLkO1rttCHyCy0U74kDTj0dRz6raA==", "cpu": [ "arm64" ], @@ -12035,9 +11606,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.14.0.tgz", - "integrity": "sha512-dPai3KUIcihV5hfoO4QNQF5HAaw8+2bT7dvi8E5zLtecW2SfL3mUZipzampXq5FHll0RSCLzlrXnSx+dBRZIIQ==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.3.tgz", + "integrity": "sha512-B8UtogMzErUPDWUoKONSVBdsgKYd58rRyv2sHJWKOIMCHfZ22FVXICR4O/VwIYtlnZ7ahERcjayBHDlBZpR0aw==", "cpu": [ "ia32" ], @@ -12052,9 +11623,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.14.0.tgz", - "integrity": "sha512-nm+JajGrTqUA6sEHdghDlHMNfH1WKSiuvljhdmBACW4ta4LC3gKurX2qZuiBARvPkephW9V/i5S8QPY1PzFEqg==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.3.tgz", + "integrity": "sha512-SpZKMR9QBTecHeqpzJdYEfgw30Oo8b/Xl6rjSzBt1g0ZsXyy60KLXrp6IagQyfTYqNYE/caDvwtF2FPn7pomog==", "cpu": [ "x64" ], @@ -12139,9 +11710,9 @@ } }, "node_modules/@tailwindcss/node": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.16.tgz", - "integrity": "sha512-BX5iaSsloNuvKNHRN3k2RcCuTEgASTo77mofW0vmeHkfrDWaoFAFvNHpEgtu0eqyypcyiBkDWzSMxJhp3AUVcw==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz", + "integrity": "sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==", "dev": true, "license": "MIT", "dependencies": { @@ -12149,9 +11720,9 @@ "enhanced-resolve": "^5.18.3", "jiti": "^2.6.1", "lightningcss": "1.30.2", - "magic-string": "^0.30.19", + "magic-string": "^0.30.21", "source-map-js": "^1.2.1", - "tailwindcss": "4.1.16" + "tailwindcss": "4.1.17" } }, "node_modules/@tailwindcss/node/node_modules/jiti": { @@ -12175,40 +11746,40 @@ } }, "node_modules/@tailwindcss/node/node_modules/tailwindcss": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", - "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", + "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", "dev": true, "license": "MIT" }, "node_modules/@tailwindcss/oxide": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.16.tgz", - "integrity": "sha512-2OSv52FRuhdlgyOQqgtQHuCgXnS8nFSYRp2tJ+4WZXKgTxqPy7SMSls8c3mPT5pkZ17SBToGM5LHEJBO7miEdg==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.17.tgz", + "integrity": "sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==", "dev": true, "license": "MIT", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.16", - "@tailwindcss/oxide-darwin-arm64": "4.1.16", - "@tailwindcss/oxide-darwin-x64": "4.1.16", - "@tailwindcss/oxide-freebsd-x64": "4.1.16", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.16", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.16", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.16", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.16", - "@tailwindcss/oxide-linux-x64-musl": "4.1.16", - "@tailwindcss/oxide-wasm32-wasi": "4.1.16", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.16", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.16" + "@tailwindcss/oxide-android-arm64": "4.1.17", + "@tailwindcss/oxide-darwin-arm64": "4.1.17", + "@tailwindcss/oxide-darwin-x64": "4.1.17", + "@tailwindcss/oxide-freebsd-x64": "4.1.17", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.17", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.17", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.17", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.17", + "@tailwindcss/oxide-linux-x64-musl": "4.1.17", + "@tailwindcss/oxide-wasm32-wasi": "4.1.17", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.17", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.17" } }, "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.16.tgz", - "integrity": "sha512-8+ctzkjHgwDJ5caq9IqRSgsP70xhdhJvm+oueS/yhD5ixLhqTw9fSL1OurzMUhBwE5zK26FXLCz2f/RtkISqHA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.17.tgz", + "integrity": "sha512-BMqpkJHgOZ5z78qqiGE6ZIRExyaHyuxjgrJ6eBO5+hfrfGkuya0lYfw8fRHG77gdTjWkNWEEm+qeG2cDMxArLQ==", "cpu": [ "arm64" ], @@ -12223,9 +11794,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.16.tgz", - "integrity": "sha512-C3oZy5042v2FOALBZtY0JTDnGNdS6w7DxL/odvSny17ORUnaRKhyTse8xYi3yKGyfnTUOdavRCdmc8QqJYwFKA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.17.tgz", + "integrity": "sha512-EquyumkQweUBNk1zGEU/wfZo2qkp/nQKRZM8bUYO0J+Lums5+wl2CcG1f9BgAjn/u9pJzdYddHWBiFXJTcxmOg==", "cpu": [ "arm64" ], @@ -12240,9 +11811,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.16.tgz", - "integrity": "sha512-vjrl/1Ub9+JwU6BP0emgipGjowzYZMjbWCDqwA2Z4vCa+HBSpP4v6U2ddejcHsolsYxwL5r4bPNoamlV0xDdLg==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.17.tgz", + "integrity": "sha512-gdhEPLzke2Pog8s12oADwYu0IAw04Y2tlmgVzIN0+046ytcgx8uZmCzEg4VcQh+AHKiS7xaL8kGo/QTiNEGRog==", "cpu": [ "x64" ], @@ -12257,9 +11828,9 @@ } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.16.tgz", - "integrity": "sha512-TSMpPYpQLm+aR1wW5rKuUuEruc/oOX3C7H0BTnPDn7W/eMw8W+MRMpiypKMkXZfwH8wqPIRKppuZoedTtNj2tg==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.17.tgz", + "integrity": "sha512-hxGS81KskMxML9DXsaXT1H0DyA+ZBIbyG/sSAjWNe2EDl7TkPOBI42GBV3u38itzGUOmFfCzk1iAjDXds8Oh0g==", "cpu": [ "x64" ], @@ -12274,9 +11845,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.16.tgz", - "integrity": "sha512-p0GGfRg/w0sdsFKBjMYvvKIiKy/LNWLWgV/plR4lUgrsxFAoQBFrXkZ4C0w8IOXfslB9vHK/JGASWD2IefIpvw==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.17.tgz", + "integrity": "sha512-k7jWk5E3ldAdw0cNglhjSgv501u7yrMf8oeZ0cElhxU6Y2o7f8yqelOp3fhf7evjIS6ujTI3U8pKUXV2I4iXHQ==", "cpu": [ "arm" ], @@ -12291,9 +11862,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.16.tgz", - "integrity": "sha512-DoixyMmTNO19rwRPdqviTrG1rYzpxgyYJl8RgQvdAQUzxC1ToLRqtNJpU/ATURSKgIg6uerPw2feW0aS8SNr/w==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.17.tgz", + "integrity": "sha512-HVDOm/mxK6+TbARwdW17WrgDYEGzmoYayrCgmLEw7FxTPLcp/glBisuyWkFz/jb7ZfiAXAXUACfyItn+nTgsdQ==", "cpu": [ "arm64" ], @@ -12308,9 +11879,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.16.tgz", - "integrity": "sha512-H81UXMa9hJhWhaAUca6bU2wm5RRFpuHImrwXBUvPbYb+3jo32I9VIwpOX6hms0fPmA6f2pGVlybO6qU8pF4fzQ==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.17.tgz", + "integrity": "sha512-HvZLfGr42i5anKtIeQzxdkw/wPqIbpeZqe7vd3V9vI3RQxe3xU1fLjss0TjyhxWcBaipk7NYwSrwTwK1hJARMg==", "cpu": [ "arm64" ], @@ -12325,9 +11896,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.16.tgz", - "integrity": "sha512-ZGHQxDtFC2/ruo7t99Qo2TTIvOERULPl5l0K1g0oK6b5PGqjYMga+FcY1wIUnrUxY56h28FxybtDEla+ICOyew==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.17.tgz", + "integrity": "sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==", "cpu": [ "x64" ], @@ -12342,9 +11913,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.16.tgz", - "integrity": "sha512-Oi1tAaa0rcKf1Og9MzKeINZzMLPbhxvm7rno5/zuP1WYmpiG0bEHq4AcRUiG2165/WUzvxkW4XDYCscZWbTLZw==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.17.tgz", + "integrity": "sha512-k7f+pf9eXLEey4pBlw+8dgfJHY4PZ5qOUFDyNf7SI6lHjQ9Zt7+NcscjpwdCEbYi6FI5c2KDTDWyf2iHcCSyyQ==", "cpu": [ "x64" ], @@ -12359,9 +11930,9 @@ } }, "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.16.tgz", - "integrity": "sha512-B01u/b8LteGRwucIBmCQ07FVXLzImWESAIMcUU6nvFt/tYsQ6IHz8DmZ5KtvmwxD+iTYBtM1xwoGXswnlu9v0Q==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.17.tgz", + "integrity": "sha512-cEytGqSSoy7zK4JRWiTCx43FsKP/zGr0CsuMawhH67ONlH+T79VteQeJQRO/X7L0juEUA8ZyuYikcRBf0vsxhg==", "bundleDependencies": [ "@napi-rs/wasm-runtime", "@emnapi/core", @@ -12377,8 +11948,8 @@ "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.5.0", - "@emnapi/runtime": "^1.5.0", + "@emnapi/core": "^1.6.0", + "@emnapi/runtime": "^1.6.0", "@emnapi/wasi-threads": "^1.1.0", "@napi-rs/wasm-runtime": "^1.0.7", "@tybys/wasm-util": "^0.10.1", @@ -12389,9 +11960,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.16.tgz", - "integrity": "sha512-zX+Q8sSkGj6HKRTMJXuPvOcP8XfYON24zJBRPlszcH1Np7xuHXhWn8qfFjIujVzvH3BHU+16jBXwgpl20i+v9A==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.17.tgz", + "integrity": "sha512-JU5AHr7gKbZlOGvMdb4722/0aYbU+tN6lv1kONx0JK2cGsh7g148zVWLM0IKR3NeKLv+L90chBVYcJ8uJWbC9A==", "cpu": [ "arm64" ], @@ -12406,9 +11977,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.16.tgz", - "integrity": "sha512-m5dDFJUEejbFqP+UXVstd4W/wnxA4F61q8SoL+mqTypId2T2ZpuxosNSgowiCnLp2+Z+rivdU0AqpfgiD7yCBg==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.17.tgz", + "integrity": "sha512-SKWM4waLuqx0IH+FMDUw6R66Hu4OuTALFgnleKbqhgGU30DY20NORZMZUKgLRjQXNN2TLzKvh48QXTig4h4bGw==", "cpu": [ "x64" ], @@ -12423,23 +11994,23 @@ } }, "node_modules/@tailwindcss/postcss": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.16.tgz", - "integrity": "sha512-Qn3SFGPXYQMKR/UtqS+dqvPrzEeBZHrFA92maT4zijCVggdsXnDBMsPFJo1eArX3J+O+Gi+8pV4PkqjLCNBk3A==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.17.tgz", + "integrity": "sha512-+nKl9N9mN5uJ+M7dBOOCzINw94MPstNR/GtIhz1fpZysxL/4a+No64jCBD6CPN+bIHWFx3KWuu8XJRrj/572Dw==", "dev": true, "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.1.16", - "@tailwindcss/oxide": "4.1.16", + "@tailwindcss/node": "4.1.17", + "@tailwindcss/oxide": "4.1.17", "postcss": "^8.4.41", - "tailwindcss": "4.1.16" + "tailwindcss": "4.1.17" } }, "node_modules/@tailwindcss/postcss/node_modules/tailwindcss": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", - "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", + "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", "dev": true, "license": "MIT" }, @@ -12456,6 +12027,20 @@ "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, + "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@testing-library/dom": { "version": "10.4.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", @@ -12565,9 +12150,9 @@ } }, "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==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", "dev": true, "license": "MIT" }, @@ -12614,6 +12199,30 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/@tufjs/models/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", @@ -13271,9 +12880,9 @@ "license": "MIT" }, "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "version": "21.1.7", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", + "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", "dev": true, "license": "MIT", "dependencies": { @@ -13326,12 +12935,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz", - "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==", + "version": "22.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz", + "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", "license": "MIT", "dependencies": { - "undici-types": "~7.16.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/node-fetch": { @@ -13418,6 +13027,13 @@ "integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==", "license": "MIT" }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", @@ -13431,18 +13047,18 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", - "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", + "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", "dependencies": { - "csstype": "^3.0.2" + "csstype": "^3.2.2" } }, "node_modules/@types/react-dom": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.2.tgz", - "integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==", + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -13640,9 +13256,9 @@ } }, "node_modules/@types/yargs": { - "version": "17.0.34", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", - "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "license": "MIT", "dependencies": { "@types/yargs-parser": "*" @@ -13655,17 +13271,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz", - "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.0.tgz", + "integrity": "sha512-XxXP5tL1txl13YFtrECECQYeZjBZad4fyd3cFV4a19LkAY/bIp9fev3US4S5fDVV2JaYFiKAZ/GRTOLer+mbyQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/type-utils": "8.46.2", - "@typescript-eslint/utils": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", + "@typescript-eslint/scope-manager": "8.48.0", + "@typescript-eslint/type-utils": "8.48.0", + "@typescript-eslint/utils": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -13679,22 +13295,32 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.46.2", + "@typescript-eslint/parser": "^8.48.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", - "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.48.0.tgz", + "integrity": "sha512-jCzKdm/QK0Kg4V4IK/oMlRZlY+QOcdjv89U2NgKHZk1CYTj82/RVSx1mV/0gqCVMJ/DA+Zf/S4NBWNF8GQ+eqQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", + "@typescript-eslint/scope-manager": "8.48.0", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/typescript-estree": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0", "debug": "^4.3.4" }, "engines": { @@ -13710,14 +13336,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", - "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.48.0.tgz", + "integrity": "sha512-Ne4CTZyRh1BecBf84siv42wv5vQvVmgtk8AuiEffKTUo3DrBaGYZueJSxxBZ8fjk/N3DrgChH4TOdIOwOwiqqw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.2", - "@typescript-eslint/types": "^8.46.2", + "@typescript-eslint/tsconfig-utils": "^8.48.0", + "@typescript-eslint/types": "^8.48.0", "debug": "^4.3.4" }, "engines": { @@ -13732,14 +13358,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", - "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.48.0.tgz", + "integrity": "sha512-uGSSsbrtJrLduti0Q1Q9+BF1/iFKaxGoQwjWOIVNJv0o6omrdyR8ct37m4xIl5Zzpkp69Kkmvom7QFTtue89YQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2" + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -13750,9 +13376,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", - "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.0.tgz", + "integrity": "sha512-WNebjBdFdyu10sR1M4OXTt2OkMd5KWIL+LLfeH9KhgP+jzfDV/LI3eXzwJ1s9+Yc0Kzo2fQCdY/OpdusCMmh6w==", "dev": true, "license": "MIT", "engines": { @@ -13767,15 +13393,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz", - "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.48.0.tgz", + "integrity": "sha512-zbeVaVqeXhhab6QNEKfK96Xyc7UQuoFWERhEnj3mLVnUWrQnv15cJNseUni7f3g557gm0e46LZ6IJ4NJVOgOpw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/utils": "8.46.2", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/typescript-estree": "8.48.0", + "@typescript-eslint/utils": "8.48.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -13792,9 +13418,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", - "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.0.tgz", + "integrity": "sha512-cQMcGQQH7kwKoVswD1xdOytxQR60MWKM1di26xSUtxehaDs/32Zpqsu5WJlXTtTTqyAVK8R7hvsUnIXRS+bjvA==", "dev": true, "license": "MIT", "engines": { @@ -13806,21 +13432,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", - "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.0.tgz", + "integrity": "sha512-ljHab1CSO4rGrQIAyizUS6UGHHCiAYhbfcIZ1zVJr5nMryxlXMVWS3duFPSKvSUbFPwkXMFk1k0EMIjub4sRRQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.46.2", - "@typescript-eslint/tsconfig-utils": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", + "@typescript-eslint/project-service": "8.48.0", + "@typescript-eslint/tsconfig-utils": "8.48.0", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0", "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", + "tinyglobby": "^0.2.15", "ts-api-utils": "^2.1.0" }, "engines": { @@ -13834,17 +13459,43 @@ "typescript": ">=4.8.4 <6.0.0" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", - "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.48.0.tgz", + "integrity": "sha512-yTJO1XuGxCsSfIVt1+1UrLHtue8xz16V8apzPYI06W0HbEbEWHxHXgZaAgavIkoh+GeV6hKKd5jm0sS6OYxWXQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2" + "@typescript-eslint/scope-manager": "8.48.0", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/typescript-estree": "8.48.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -13859,13 +13510,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", - "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.0.tgz", + "integrity": "sha512-T0XJMaRPOH3+LBbAfzR2jalckP1MSG/L9eUtY0DEzUyVaXJ/t6zN0nR7co5kz0Jko/nkSYCBRkz1djvjajVTTg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/types": "8.48.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -13896,25 +13547,25 @@ "license": "ISC" }, "node_modules/@vercel/oidc": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.0.3.tgz", - "integrity": "sha512-yNEQvPcVrK9sIe637+I0jD6leluPxzwJKx/Haw6F4H77CdDsszUn5V3o96LPziXkSNE2B83+Z3mjqGKBK/R6Gg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.0.5.tgz", + "integrity": "sha512-fnYhv671l+eTTp48gB4zEsTW/YtRgRPnkI2nT7x6qw5rkI1Lq2hTmQIpHPgyThI0znLK+vX2n9XxKdXZ7BUbbw==", "license": "Apache-2.0", "engines": { "node": ">= 20" } }, "node_modules/@vitejs/plugin-react": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.0.tgz", - "integrity": "sha512-4LuWrg7EKWgQaMJfnN+wcmbAW+VSsCmqGohftWjuct47bv8uE4n/nPpq4XjJPsxgq00GGG5J8dvBczp8uxScew==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.1.tgz", + "integrity": "sha512-WQfkSw0QbQ5aJ2CHYw23ZGkqnRwqKHD/KYsMeTkZzPT4Jcf0DcBxBtwMJxnu6E7oxw5+JC6ZAiePgh28uJ1HBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.28.4", + "@babel/core": "^7.28.5", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", - "@rolldown/pluginutils": "1.0.0-beta.43", + "@rolldown/pluginutils": "1.0.0-beta.47", "@types/babel__core": "^7.20.5", "react-refresh": "^0.18.0" }, @@ -13925,6 +13576,13 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, + "node_modules/@vitejs/plugin-react/node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.47", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.47.tgz", + "integrity": "sha512-8QagwMH3kNCuzD8EWL8R2YPW5e4OrHNSAHRFDdmFqEwEaD/KcNKjVoumo+gP2vW5eKB2UPbM6vTYiGZX0ixLnw==", + "dev": true, + "license": "MIT" + }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -14067,6 +13725,10 @@ "resolved": "packages/core", "link": true }, + "node_modules/@walkeros/destination-demo": { + "resolved": "apps/demos/destination", + "link": true + }, "node_modules/@walkeros/docker": { "resolved": "packages/docker", "link": true @@ -14103,6 +13765,10 @@ "resolved": "packages/server/sources/gcp", "link": true }, + "node_modules/@walkeros/source-demo": { + "resolved": "apps/demos/source", + "link": true + }, "node_modules/@walkeros/storybook-addon": { "resolved": "apps/storybook-addon", "link": true @@ -14338,15 +14004,6 @@ "node": ">= 0.6" } }, - "node_modules/accepts/node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -14438,14 +14095,14 @@ } }, "node_modules/ai": { - "version": "5.0.82", - "resolved": "https://registry.npmjs.org/ai/-/ai-5.0.82.tgz", - "integrity": "sha512-wmZZfsU40qB77umrcj3YzMSk6cUP5gxLXZDPfiSQLBLegTVXPUdSJC603tR7JB5JkhBDzN5VLaliuRKQGKpUXg==", + "version": "5.0.101", + "resolved": "https://registry.npmjs.org/ai/-/ai-5.0.101.tgz", + "integrity": "sha512-/P4fgs2PGYTBaZi192YkPikOudsl9vccA65F7J7LvoNTOoP5kh1yAsJPsKAy6FXU32bAngai7ft1UDyC3u7z5g==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/gateway": "2.0.3", + "@ai-sdk/gateway": "2.0.15", "@ai-sdk/provider": "2.0.0", - "@ai-sdk/provider-utils": "3.0.14", + "@ai-sdk/provider-utils": "3.0.17", "@opentelemetry/api": "1.9.0" }, "engines": { @@ -14520,34 +14177,34 @@ } }, "node_modules/algoliasearch": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.41.0.tgz", - "integrity": "sha512-9E4b3rJmYbBkn7e3aAPt1as+VVnRhsR4qwRRgOzpeyz4PAOuwKh0HI4AN6mTrqK0S0M9fCCSTOUnuJ8gPY/tvA==", - "license": "MIT", - "dependencies": { - "@algolia/abtesting": "1.7.0", - "@algolia/client-abtesting": "5.41.0", - "@algolia/client-analytics": "5.41.0", - "@algolia/client-common": "5.41.0", - "@algolia/client-insights": "5.41.0", - "@algolia/client-personalization": "5.41.0", - "@algolia/client-query-suggestions": "5.41.0", - "@algolia/client-search": "5.41.0", - "@algolia/ingestion": "1.41.0", - "@algolia/monitoring": "1.41.0", - "@algolia/recommend": "5.41.0", - "@algolia/requester-browser-xhr": "5.41.0", - "@algolia/requester-fetch": "5.41.0", - "@algolia/requester-node-http": "5.41.0" + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.45.0.tgz", + "integrity": "sha512-wrj4FGr14heLOYkBKV3Fbq5ZBGuIFeDJkTilYq/G+hH1CSlQBtYvG2X1j67flwv0fUeQJwnWxxRIunSemAZirA==", + "license": "MIT", + "dependencies": { + "@algolia/abtesting": "1.11.0", + "@algolia/client-abtesting": "5.45.0", + "@algolia/client-analytics": "5.45.0", + "@algolia/client-common": "5.45.0", + "@algolia/client-insights": "5.45.0", + "@algolia/client-personalization": "5.45.0", + "@algolia/client-query-suggestions": "5.45.0", + "@algolia/client-search": "5.45.0", + "@algolia/ingestion": "1.45.0", + "@algolia/monitoring": "1.45.0", + "@algolia/recommend": "5.45.0", + "@algolia/requester-browser-xhr": "5.45.0", + "@algolia/requester-fetch": "5.45.0", + "@algolia/requester-node-http": "5.45.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/algoliasearch-helper": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.26.0.tgz", - "integrity": "sha512-Rv2x3GXleQ3ygwhkhJubhhYGsICmShLAiqtUuJTUkr9uOCOXyF2E71LVT4XDnVffbknv8XgScP4U0Oxtgm+hIw==", + "version": "3.26.1", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.26.1.tgz", + "integrity": "sha512-CAlCxm4fYBXtvc5MamDzP6Svu8rW4z9me4DCBY1rQ2UDJ0u0flWmusQ8M3nOExZsLLRcUwUPoRAPMrhzOG3erw==", "license": "MIT", "dependencies": { "@algolia/events": "^4.0.1" @@ -14619,6 +14276,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -14693,13 +14362,10 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/aria-query": { "version": "5.3.0", @@ -14952,16 +14618,16 @@ } }, "node_modules/auto": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/auto/-/auto-11.3.0.tgz", - "integrity": "sha512-7FWjxrfsVKaToAcjxsijdpL8prbffZk5ovPCTVDk6c0Yq3pNKd2AMm5fkPR5lDbnYNeoU7lbm+0wVtJSoTQhpw==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/auto/-/auto-11.3.6.tgz", + "integrity": "sha512-Db13X4WVNPzPtWKSoiOzhfW2g3zNUTDR1X3wkQPdIW21xtajwm5Taqg3BXWR2u7/45W0bU+6YykVgioNRwrwIw==", "dev": true, "license": "MIT", "dependencies": { - "@auto-it/core": "11.3.0", - "@auto-it/npm": "11.3.0", - "@auto-it/released": "11.3.0", - "@auto-it/version-file": "11.3.0", + "@auto-it/core": "11.3.6", + "@auto-it/npm": "11.3.6", + "@auto-it/released": "11.3.6", + "@auto-it/version-file": "11.3.6", "await-to-js": "^3.0.0", "chalk": "^4.0.0", "command-line-application": "^0.10.1", @@ -14986,9 +14652,9 @@ "license": "0BSD" }, "node_modules/autoprefixer": { - "version": "10.4.21", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", - "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz", + "integrity": "sha512-ARe0v/t9gO28Bznv6GgqARmVqcWOV3mfgUPn9becPHMiD3o9BwlRgaeccZnwTpZ7Zwqrm+c1sUSsMxIzQzc8Xg==", "funding": [ { "type": "opencollective", @@ -15005,9 +14671,9 @@ ], "license": "MIT", "dependencies": { - "browserslist": "^4.24.4", - "caniuse-lite": "^1.0.30001702", - "fraction.js": "^4.3.7", + "browserslist": "^4.27.0", + "caniuse-lite": "^1.0.30001754", + "fraction.js": "^5.3.4", "normalize-range": "^0.1.2", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" @@ -15284,9 +14950,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", - "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", + "version": "2.8.31", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.31.tgz", + "integrity": "sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -15385,15 +15051,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -15445,33 +15102,57 @@ "license": "MIT" }, "node_modules/bowser": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.1.tgz", - "integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.13.0.tgz", + "integrity": "sha512-yHAbSRuT6LTeKi6k2aS40csueHqgAsFEgmrOsfRyFpJnFv5O2hl9FYmWEUZ97gZ/dG17U4IQQcTx4YAFYPuWRQ==", "license": "MIT" }, "node_modules/boxen": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz", - "integrity": "sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", + "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", "license": "MIT", "dependencies": { "ansi-align": "^3.0.1", - "camelcase": "^6.2.0", - "chalk": "^4.1.2", + "camelcase": "^7.0.1", + "chalk": "^5.2.0", "cli-boxes": "^3.0.0", - "string-width": "^5.0.1", - "type-fest": "^2.5.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" + "wrap-ansi": "^8.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/camelcase": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", + "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", + "license": "MIT", + "engines": { + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/boxen/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/boxen/node_modules/type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -15485,12 +15166,13 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { @@ -15506,9 +15188,9 @@ } }, "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "funding": [ { "type": "opencollective", @@ -15525,10 +15207,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", "update-browserslist-db": "^1.1.4" }, "bin": { @@ -15605,9 +15287,9 @@ } }, "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -15780,9 +15462,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001751", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", - "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", "funding": [ { "type": "opencollective", @@ -15892,9 +15574,9 @@ } }, "node_modules/chardet": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", - "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", "dev": true, "license": "MIT" }, @@ -15996,6 +15678,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -16675,12 +16369,12 @@ } }, "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "license": "MIT", "engines": { - "node": ">= 6" + "node": ">=16" } }, "node_modules/common-path-prefix": { @@ -16719,15 +16413,6 @@ "node": ">= 0.8.0" } }, - "node_modules/compression/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -16743,6 +16428,15 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, + "node_modules/compression/node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/compute-gcd": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", @@ -16802,6 +16496,12 @@ "proto-list": "~1.2.1" } }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/configstore": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", @@ -16852,10 +16552,13 @@ } }, "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, "engines": { "node": ">= 0.6" } @@ -16914,18 +16617,6 @@ "webpack": "^5.1.0" } }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/copy-webpack-plugin/node_modules/globby": { "version": "13.2.2", "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", @@ -16945,15 +16636,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/copy-webpack-plugin/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/copy-webpack-plugin/node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -16967,9 +16649,9 @@ } }, "node_modules/core-js": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.46.0.tgz", - "integrity": "sha512-vDMm9B0xnqqZ8uSBpZ8sNtRtOdmfShrvT6h2TuQGLs0Is+cR0DYbj/KWP6ALVNbWPpqA/qPLoOuppJN07humpA==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.47.0.tgz", + "integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -16978,12 +16660,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz", + "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==", "license": "MIT", "dependencies": { - "browserslist": "^4.26.3" + "browserslist": "^4.28.0" }, "funding": { "type": "opencollective", @@ -16991,9 +16673,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.46.0.tgz", - "integrity": "sha512-NMCW30bHNofuhwLhYPt66OLOKTMbOhgTTatKVbaQC3KRHpTCiRIBYvtshr+NBYSnBxwAFhjW/RfJ0XbIjS16rw==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.47.0.tgz", + "integrity": "sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -17055,24 +16737,6 @@ } } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -17206,19 +16870,6 @@ "postcss": "^8.4" } }, - "node_modules/css-blank-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/css-declaration-sorter": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.3.0.tgz", @@ -17258,41 +16909,6 @@ "postcss": "^8.4" } }, - "node_modules/css-has-pseudo/node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^7.0.0" - } - }, - "node_modules/css-has-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/css-loader": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", @@ -17608,29 +17224,21 @@ "license": "MIT" }, "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", "license": "MIT", "dependencies": { - "cssom": "~0.3.6" + "rrweb-cssom": "^0.6.0" }, "engines": { - "node": ">=8" + "node": ">=14" } }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true, - "license": "MIT" - }, "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, "node_modules/cytoscape": { @@ -18154,9 +17762,9 @@ } }, "node_modules/daisyui": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.3.10.tgz", - "integrity": "sha512-vmjyPmm0hvFhA95KB6uiGmWakziB2pBv6CUcs5Ka/3iMBMn9S+C3SZYx9G9l2JrgTZ1EFn61F/HrPcwaUm2kLQ==", + "version": "5.5.5", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.5.5.tgz", + "integrity": "sha512-ekvI93ZkWIJoCOtDl0D2QMxnWvTejk9V5nWBqRv+7t0xjiBXqAK5U6o6JE2RPvlIC3EqwNyUoIZSdHX9MZK3nw==", "dev": true, "license": "MIT", "funding": { @@ -18167,25 +17775,23 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 12" } }, "node_modules/data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", "license": "MIT", "dependencies": { "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" + "whatwg-url": "^12.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/data-view-buffer": { @@ -18243,9 +17849,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.18", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz", - "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==", + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", "license": "MIT" }, "node_modules/debounce": { @@ -18360,9 +17966,9 @@ } }, "node_modules/default-browser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", - "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.4.0.tgz", + "integrity": "sha512-XDuvSq38Hr1MdN47EDvYtx3U0MTqpCEn+F6ft8z2vYDzMrvQhVp0ui9oQdqW3MvK3vqUETglt1tVGgjLuJ5izg==", "license": "MIT", "dependencies": { "bundle-name": "^4.1.0", @@ -18376,9 +17982,9 @@ } }, "node_modules/default-browser-id": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", - "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", "license": "MIT", "engines": { "node": ">=18" @@ -18617,16 +18223,16 @@ } }, "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/dom-accessibility-api": { @@ -18821,9 +18427,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.243", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz", - "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", + "version": "1.5.259", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz", + "integrity": "sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ==", "license": "ISC" }, "node_modules/emittery": { @@ -19226,45 +18832,41 @@ } }, "node_modules/esbuild": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", - "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", - "dev": true, + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", "hasInstallScript": true, "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=18" + "node": ">=12" }, "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" + "@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": { @@ -19353,20 +18955,20 @@ } }, "node_modules/eslint": { - "version": "9.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", - "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.1", - "@eslint/config-helpers": "^0.4.1", - "@eslint/core": "^0.16.0", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.38.0", - "@eslint/plugin-kit": "^0.4.0", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -19520,28 +19122,17 @@ "eslint": ">=8.40" } }, - "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-react/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "esutils": "^2.0.2" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, "node_modules/eslint-plugin-react/node_modules/resolve": { @@ -19590,9 +19181,9 @@ } }, "node_modules/eslint-plugin-turbo": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-2.5.8.tgz", - "integrity": "sha512-bVjx4vTH0oTKIyQ7EGFAXnuhZMrKIfu17qlex/dps7eScPnGQLJ3r1/nFq80l8xA+8oYjsSirSQ2tXOKbz3kEw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-2.6.1.tgz", + "integrity": "sha512-nxwJD6ReZTxEmq/ZNJXI/Mfa3aXctTpQpJrQZESDC1bxjXXcz4i040P7wG6RsRRsQ+9eYB9D+KdCqERpwNZGzw==", "dev": true, "license": "MIT", "dependencies": { @@ -19614,9 +19205,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -19624,7 +19215,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -19643,23 +19234,23 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "node_modules/eslint/node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -19667,146 +19258,107 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, + "license": "Apache-2.0", "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/eslint/node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, - "license": "ISC", + "license": "BSD-2-Clause", "dependencies": { - "brace-expansion": "^1.1.7" + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/eslint/node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=16.0.0" } }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/eslint/node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=16" } }, - "node_modules/eslint/node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "node_modules/eslint/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.15.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -20130,18 +19682,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/express/node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -20157,25 +19697,10 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "license": "MIT" - }, - "node_modules/express/node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.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==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz", + "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==", "license": "MIT" }, "node_modules/extend": { @@ -20225,6 +19750,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-parse": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", @@ -20327,7 +19864,6 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -20357,7 +19893,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, "funding": [ { "type": "github", @@ -20401,16 +19936,16 @@ } }, "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^4.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=16.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-loader": { @@ -20526,16 +20061,20 @@ } }, "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/fix-dts-default-cjs-exports": { @@ -20570,17 +20109,18 @@ } }, "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.4" + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=16" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -20654,9 +20194,9 @@ } }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -20690,7 +20230,6 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, "license": "MIT", "dependencies": { "fetch-blob": "^3.1.2" @@ -20716,15 +20255,15 @@ "license": "MIT" }, "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", "license": "MIT", "engines": { "node": "*" }, "funding": { - "type": "patreon", + "type": "github", "url": "https://github.com/sponsors/rawify" } }, @@ -20759,18 +20298,17 @@ "license": "MIT" }, "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=14.14" } }, "node_modules/fs-minipass": { @@ -20847,19 +20385,18 @@ } }, "node_modules/gaxios": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", - "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz", + "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==", "license": "Apache-2.0", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", - "is-stream": "^2.0.0", - "node-fetch": "^2.6.9", - "uuid": "^9.0.1" + "node-fetch": "^3.3.2", + "rimraf": "^5.0.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/gaxios/node_modules/agent-base": { @@ -20885,72 +20422,50 @@ } }, "node_modules/gaxios/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "license": "MIT", "dependencies": { - "whatwg-url": "^5.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/gaxios/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/gaxios/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" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/gaxios/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/gaxios/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", + "node_modules/gaxios/node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "license": "ISC", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/gcp-metadata": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", - "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz", + "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==", "license": "Apache-2.0", "dependencies": { - "gaxios": "^6.1.1", - "google-logging-utils": "^0.0.2", + "gaxios": "^7.0.0", + "google-logging-utils": "^1.0.0", "json-bigint": "^1.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/generator-function": { @@ -21042,17 +20557,6 @@ "node": ">=0.10.0" } }, - "node_modules/get-monorepo-packages/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/get-monorepo-packages/node_modules/dir-glob": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", @@ -21113,19 +20617,6 @@ "dev": true, "license": "MIT" }, - "node_modules/get-monorepo-packages/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/get-monorepo-packages/node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -21242,9 +20733,9 @@ } }, "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==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -21262,15 +20753,15 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob-to-regex.js": { @@ -21295,6 +20786,30 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "license": "BSD-2-Clause" }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", @@ -21320,9 +20835,9 @@ } }, "node_modules/globals": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", - "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", "engines": { @@ -21369,36 +20884,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/google-auth-library": { - "version": "9.15.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", - "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz", + "integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==", "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.1.1", - "gcp-metadata": "^6.1.0", - "gtoken": "^7.0.0", + "gaxios": "^7.0.0", + "gcp-metadata": "^8.0.0", + "google-logging-utils": "^1.0.0", + "gtoken": "^8.0.0", "jws": "^4.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/google-logging-utils": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", - "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz", + "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==", "license": "Apache-2.0", "engines": { "node": ">=14" @@ -21481,17 +20988,39 @@ "node": ">=6.0" } }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/gtoken": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", - "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", + "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", "license": "MIT", "dependencies": { - "gaxios": "^6.0.0", + "gaxios": "^7.0.0", "jws": "^4.0.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18" } }, "node_modules/gzip-size": { @@ -21863,11 +21392,22 @@ "license": "MIT" }, "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "license": "ISC", - "peer": true + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/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==", + "license": "ISC" }, "node_modules/hpack.js": { "version": "2.1.6", @@ -22004,9 +21544,9 @@ } }, "node_modules/html-webpack-plugin": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.4.tgz", - "integrity": "sha512-V/PZeWsqhfpE27nKeX9EO2sbR+D17A+tLf6qU+ht66jdUsN0QLKJN27Z+1+gHrVMKgndBahes0PU6rRihDgHTw==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.5.tgz", + "integrity": "sha512-4xynFbKNNk+WlzXeQQ+6YYsH2g7mpfPszQZUi3ovKlj+pDmngQ7vRXjrrmGROabmKwyQkcgcX5hqfOwHbFmK5g==", "license": "MIT", "dependencies": { "@types/html-minifier-terser": "^6.0.0", @@ -22288,10 +21828,9 @@ } }, "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "license": "MIT", "engines": { "node": ">= 4" @@ -22309,6 +21848,30 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/ignore-walk/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/image-size": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/image-size/-/image-size-2.0.2.tgz", @@ -22407,6 +21970,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/import-local/node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -22477,15 +22080,18 @@ "license": "ISC" }, "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/inline-style-parser": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz", - "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", + "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", "license": "MIT" }, "node_modules/internal-slot": { @@ -22541,12 +22147,12 @@ } }, "node_modules/ipaddr.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", - "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "license": "MIT", "engines": { - "node": ">= 10" + "node": ">= 0.10" } }, "node_modules/is": { @@ -23300,9 +22906,10 @@ } }, "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==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, "license": "MIT" }, "node_modules/isexe": { @@ -23833,17 +23440,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-config/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/jest-config/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -23876,19 +23472,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-config/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/jest-config/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -24151,6 +23734,99 @@ "dev": true, "license": "MIT" }, + "node_modules/jest-environment-jsdom/node_modules/@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, + "node_modules/jest-environment-jsdom/node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-environment-jsdom/node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-jsdom/node_modules/data-urls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-environment-jsdom/node_modules/jsdom": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.6", + "acorn": "^8.8.1", + "acorn-globals": "^7.0.0", + "cssom": "^0.5.0", + "cssstyle": "^2.3.0", + "data-urls": "^3.0.2", + "decimal.js": "^10.4.2", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0", + "ws": "^8.11.0", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, "node_modules/jest-environment-node": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", @@ -24823,17 +24499,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/jest-runtime/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -24866,19 +24531,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", @@ -25304,41 +24956,36 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", - "dev": true, + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", + "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", "license": "MIT", "dependencies": { "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", "domexception": "^4.0.0", - "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", + "nwsapi": "^2.2.4", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.1.2", @@ -25346,12 +24993,12 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=14" + "node": ">=16" }, "peerDependencies": { "canvas": "^2.5.0" @@ -25397,10 +25044,13 @@ "license": "MIT" }, "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "license": "MIT" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/json-schema": { "version": "0.4.0", @@ -25464,11 +25114,13 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -25941,13 +25593,13 @@ "license": "MIT" }, "node_modules/lint-staged": { - "version": "16.2.6", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.2.6.tgz", - "integrity": "sha512-s1gphtDbV4bmW1eylXpVMk2u7is7YsrLl8hzrtvC70h4ByhcMLZFY01Fx05ZUDNuv1H8HO4E+e2zgejV1jVwNw==", + "version": "16.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.2.7.tgz", + "integrity": "sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow==", "dev": true, "license": "MIT", "dependencies": { - "commander": "^14.0.1", + "commander": "^14.0.2", "listr2": "^9.0.5", "micromatch": "^4.0.8", "nano-spawn": "^2.0.0", @@ -26188,15 +25840,19 @@ } }, "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -26303,9 +25959,9 @@ } }, "node_modules/log-update/node_modules/ansi-escapes": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.1.tgz", - "integrity": "sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.2.0.tgz", + "integrity": "sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==", "dev": true, "license": "MIT", "dependencies": { @@ -26578,9 +26234,9 @@ } }, "node_modules/marked": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.1.tgz", - "integrity": "sha512-ntROs7RaN3EvWfy3EZi14H4YxmT6A5YvywfhO+0pm+cH/dnSQRmdAmoFIc3B9aiwTehyk7pESH4ofyBY+V5hZg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", "license": "MIT", "bin": { "marked": "bin/marked.js" @@ -26975,9 +26631,9 @@ } }, "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -27052,9 +26708,9 @@ } }, "node_modules/memfs": { - "version": "4.50.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.50.0.tgz", - "integrity": "sha512-N0LUYQMUA1yS5tJKmMtU9yprPm6ZIg24yr/OVv/7t6q0kKDIho4cBbXRi1XKttUmNYDYgF/q45qrKE/UhGO0CA==", + "version": "4.51.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.51.0.tgz", + "integrity": "sha512-4zngfkVM/GpIhC8YazOsM6E8hoB33NP0BCESPOA6z7qaL6umPJNqkO8CNYaLV2FB2MV6H1O3x2luHHOSqppv+A==", "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/json-pack": "^1.11.0", @@ -29062,18 +28718,15 @@ "license": "ISC" }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, "node_modules/minimist": { @@ -29436,9 +29089,9 @@ "license": "MIT" }, "node_modules/negotiator": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", - "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -29479,7 +29132,6 @@ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", "deprecated": "Use your platform's native DOMException instead", - "dev": true, "funding": [ { "type": "github", @@ -29642,26 +29294,17 @@ } }, "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", "license": "BSD-2-Clause", - "peer": true, "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver" + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/normalize-path": { @@ -29742,24 +29385,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm-package-arg/node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm-package-arg/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==", - "license": "ISC" - }, "node_modules/npm-packlist": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", @@ -29846,6 +29471,32 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/npm-run-all2/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm-run-all2/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/npm-run-all2/node_modules/which": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", @@ -30243,15 +29894,48 @@ } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { @@ -30308,6 +29992,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-retry/node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/p-timeout": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", @@ -30501,6 +30194,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" + }, "node_modules/parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", @@ -30642,13 +30341,10 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", - "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", - "license": "MIT", - "dependencies": { - "isarray": "0.0.1" - } + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -30685,7 +30381,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -30997,19 +30692,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-attribute-case-insensitive/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-calc": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", @@ -31254,19 +30936,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-custom-selectors/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-dir-pseudo-class": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-9.0.1.tgz", @@ -31292,19 +30961,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-dir-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-discard-comments": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", @@ -31433,19 +31089,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-focus-visible/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-focus-within": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-9.0.1.tgz", @@ -31471,19 +31114,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-focus-within/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-font-variant": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", @@ -31873,19 +31503,6 @@ "postcss": "^8.1.0" } }, - "node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-modules-scope": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", @@ -31901,19 +31518,6 @@ "postcss": "^8.1.0" } }, - "node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-modules-values": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", @@ -31996,63 +31600,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.1.0.tgz", - "integrity": "sha512-mf1LEW0tJLKfWyvn5KdDrhpxHyuxpbNwTIwOYLIvsTffeyOf85j5oIzfG0yosxDgx/sswlqBnESYUcQH0vgZ0g==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^7.0.0" - } - }, - "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^7.0.0" - } - }, - "node_modules/postcss-nesting/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-normalize-charset": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", @@ -32399,19 +31946,6 @@ "postcss": "^8.4" } }, - "node_modules/postcss-pseudo-class-any-link/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-reduce-idents": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-6.0.3.tgz", @@ -32492,7 +32026,7 @@ "postcss": "^8.4" } }, - "node_modules/postcss-selector-not/node_modules/postcss-selector-parser": { + "node_modules/postcss-selector-parser": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", @@ -32505,20 +32039,6 @@ "node": ">=4" } }, - "node_modules/postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-sort-media-queries": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-5.2.0.tgz", @@ -32610,7 +32130,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", - "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -32753,15 +32272,6 @@ "node": ">=10" } }, - "node_modules/promise-retry/node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -32821,15 +32331,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/psl": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", @@ -32962,9 +32463,9 @@ } }, "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -32985,15 +32486,6 @@ "node": ">= 0.8" } }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/raw-body/node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -33021,6 +32513,12 @@ "rc": "cli.js" } }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -33071,19 +32569,6 @@ "typescript": ">= 4.3.x" } }, - "node_modules/react-docgen/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/react-dom": { "version": "19.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", @@ -33238,21 +32723,50 @@ } }, "node_modules/react-router-dom": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.4.tgz", - "integrity": "sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==", + "version": "6.30.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.2.tgz", + "integrity": "sha512-l2OwHn3UUnEVUqc6/1VMmR1cvZryZ3j3NzapC2eUXO1dB0sYp5mvwdjiXhpUbRb21eFow3qSxpP8Yv6oAU824Q==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.12.13", - "history": "^4.9.0", - "loose-envify": "^1.3.1", - "prop-types": "^15.6.2", - "react-router": "5.3.4", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0" + "@remix-run/router": "1.23.1", + "react-router": "6.30.2" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "react": ">=15" + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/react-router-dom/node_modules/react-router": { + "version": "6.30.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.2.tgz", + "integrity": "sha512-H2Bm38Zu1bm8KUE5NVWRMzuIyAV8p/JrOaBJAwVmp37AXG72+CZJlEBw6pdn9i5TBgLMhNDgijS4ZlblpHyWTA==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router/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==", + "license": "MIT" + }, + "node_modules/react-router/node_modules/path-to-regexp": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", + "license": "MIT", + "dependencies": { + "isarray": "0.0.1" } }, "node_modules/react-router/node_modules/react-is": { @@ -33320,56 +32834,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/read-package-json/node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/read-package-json/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==", - "license": "ISC" - }, - "node_modules/read-package-json/node_modules/normalize-package-data": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", - "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -33404,6 +32868,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/read-pkg-up/node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -33414,6 +32918,36 @@ "node": ">=8" } }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "license": "ISC", + "peer": true + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/read-pkg/node_modules/type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -33440,6 +32974,30 @@ "node": ">=6" } }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/read-yaml-file/node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -34939,9 +34497,9 @@ } }, "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "license": "MIT", "engines": { "node": ">= 4" @@ -34978,6 +34536,45 @@ "dev": true, "license": "MIT" }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/robust-predicates": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", @@ -34985,9 +34582,9 @@ "license": "Unlicense" }, "node_modules/rollup": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz", - "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz", + "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", "dependencies": { @@ -35001,28 +34598,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.5", - "@rollup/rollup-android-arm64": "4.52.5", - "@rollup/rollup-darwin-arm64": "4.52.5", - "@rollup/rollup-darwin-x64": "4.52.5", - "@rollup/rollup-freebsd-arm64": "4.52.5", - "@rollup/rollup-freebsd-x64": "4.52.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.5", - "@rollup/rollup-linux-arm-musleabihf": "4.52.5", - "@rollup/rollup-linux-arm64-gnu": "4.52.5", - "@rollup/rollup-linux-arm64-musl": "4.52.5", - "@rollup/rollup-linux-loong64-gnu": "4.52.5", - "@rollup/rollup-linux-ppc64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-musl": "4.52.5", - "@rollup/rollup-linux-s390x-gnu": "4.52.5", - "@rollup/rollup-linux-x64-gnu": "4.52.5", - "@rollup/rollup-linux-x64-musl": "4.52.5", - "@rollup/rollup-openharmony-arm64": "4.52.5", - "@rollup/rollup-win32-arm64-msvc": "4.52.5", - "@rollup/rollup-win32-ia32-msvc": "4.52.5", - "@rollup/rollup-win32-x64-gnu": "4.52.5", - "@rollup/rollup-win32-x64-msvc": "4.52.5", + "@rollup/rollup-android-arm-eabi": "4.53.3", + "@rollup/rollup-android-arm64": "4.53.3", + "@rollup/rollup-darwin-arm64": "4.53.3", + "@rollup/rollup-darwin-x64": "4.53.3", + "@rollup/rollup-freebsd-arm64": "4.53.3", + "@rollup/rollup-freebsd-x64": "4.53.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", + "@rollup/rollup-linux-arm-musleabihf": "4.53.3", + "@rollup/rollup-linux-arm64-gnu": "4.53.3", + "@rollup/rollup-linux-arm64-musl": "4.53.3", + "@rollup/rollup-linux-loong64-gnu": "4.53.3", + "@rollup/rollup-linux-ppc64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-musl": "4.53.3", + "@rollup/rollup-linux-s390x-gnu": "4.53.3", + "@rollup/rollup-linux-x64-gnu": "4.53.3", + "@rollup/rollup-linux-x64-musl": "4.53.3", + "@rollup/rollup-openharmony-arm64": "4.53.3", + "@rollup/rollup-win32-arm64-msvc": "4.53.3", + "@rollup/rollup-win32-ia32-msvc": "4.53.3", + "@rollup/rollup-win32-x64-gnu": "4.53.3", + "@rollup/rollup-win32-x64-msvc": "4.53.3", "fsevents": "~2.3.2" } }, @@ -35123,13 +34720,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -35167,13 +34757,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/safe-regex-test": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", @@ -35198,9 +34781,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.93.2", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz", - "integrity": "sha512-t+YPtOQHpGW1QWsh1CHQ5cPIr9lbbGZLZnbihP/D/qZj/yuV68m8qarcV17nvkOX81BCrvzAlq2klCQFZghyTg==", + "version": "1.94.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.94.2.tgz", + "integrity": "sha512-N+7WK20/wOr7CzA2snJcUSSNTCzeCGUTFY3OgeQP3mZ1aj9NMQ0mSTXwlrnd89j33zzQJGqIN52GIOmYrfq46A==", "license": "MIT", "dependencies": { "chokidar": "^4.0.0", @@ -35286,10 +34869,10 @@ } }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "license": "ISC" + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", + "license": "BlueOak-1.0.0" }, "node_modules/saxes": { "version": "6.0.0", @@ -35485,15 +35068,6 @@ "node": ">= 0.8" } }, - "node_modules/send/node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", @@ -35518,14 +35092,22 @@ "range-parser": "1.2.0" } }, - "node_modules/serve-handler/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "node_modules/serve-handler/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-handler/node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" } }, "node_modules/serve-handler/node_modules/mime-db": { @@ -35549,24 +35131,21 @@ "node": ">= 0.6" } }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/serve-handler/node_modules/path-to-regexp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", "license": "MIT" }, + "node_modules/serve-handler/node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -36762,21 +36341,21 @@ } }, "node_modules/style-to-js": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.18.tgz", - "integrity": "sha512-JFPn62D4kJaPTnhFUI244MThx+FEGbi+9dw1b9yBBQ+1CZpV7QAT8kUtJ7b7EUNdHajjF/0x8fT+16oLJoojLg==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", + "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==", "license": "MIT", "dependencies": { - "style-to-object": "1.0.11" + "style-to-object": "1.0.14" } }, "node_modules/style-to-object": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.11.tgz", - "integrity": "sha512-5A560JmXr7wDyGLK12Nq/EYS38VkGlglVzkis1JEdbGWSnbQIEhZzTJhzURXN5/8WwwFCs/f/VVcmkTppbXLow==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz", + "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==", "license": "MIT", "dependencies": { - "inline-style-parser": "0.2.4" + "inline-style-parser": "0.2.7" } }, "node_modules/stylehacks": { @@ -36815,17 +36394,17 @@ "license": "MIT" }, "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", - "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", "ts-interface-checker": "^0.1.9" }, "bin": { @@ -36979,9 +36558,9 @@ } }, "node_modules/tailwind-merge": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz", - "integrity": "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", + "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", "license": "MIT", "funding": { "type": "github", @@ -37026,19 +36605,6 @@ "node": ">=14.0.0" } }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/tailwindcss/node_modules/postcss-selector-parser": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", @@ -37224,9 +36790,9 @@ } }, "node_modules/terser": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.0.tgz", - "integrity": "sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==", + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", + "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -37344,17 +36910,6 @@ "node": ">=8" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/test-exclude/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -37377,19 +36932,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -37472,16 +37014,18 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", - "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", - "license": "MIT" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/tinyglobby": { "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", @@ -37588,7 +37132,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", - "dev": true, "license": "MIT", "dependencies": { "punycode": "^2.3.1" @@ -37820,9 +37363,9 @@ "license": "0BSD" }, "node_modules/tsup": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.0.tgz", - "integrity": "sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", "dev": true, "license": "MIT", "dependencies": { @@ -37831,14 +37374,14 @@ "chokidar": "^4.0.3", "consola": "^3.4.0", "debug": "^4.4.0", - "esbuild": "^0.25.0", + "esbuild": "^0.27.0", "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", "rollup": "^4.34.8", - "source-map": "0.8.0-beta.0", + "source-map": "^0.7.6", "sucrase": "^3.35.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.11", @@ -37872,6 +37415,397 @@ } } }, + "node_modules/tsup/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", + "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.0.tgz", + "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", + "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.0.tgz", + "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", + "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", + "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", + "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", + "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", + "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", + "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", + "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-loong64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", + "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", + "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", + "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", + "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-s390x": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", + "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", + "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", + "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", + "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/sunos-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", + "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", + "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", + "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", + "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/tsup/node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -37888,6 +37822,48 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/tsup/node_modules/esbuild": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", + "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.0", + "@esbuild/android-arm": "0.27.0", + "@esbuild/android-arm64": "0.27.0", + "@esbuild/android-x64": "0.27.0", + "@esbuild/darwin-arm64": "0.27.0", + "@esbuild/darwin-x64": "0.27.0", + "@esbuild/freebsd-arm64": "0.27.0", + "@esbuild/freebsd-x64": "0.27.0", + "@esbuild/linux-arm": "0.27.0", + "@esbuild/linux-arm64": "0.27.0", + "@esbuild/linux-ia32": "0.27.0", + "@esbuild/linux-loong64": "0.27.0", + "@esbuild/linux-mips64el": "0.27.0", + "@esbuild/linux-ppc64": "0.27.0", + "@esbuild/linux-riscv64": "0.27.0", + "@esbuild/linux-s390x": "0.27.0", + "@esbuild/linux-x64": "0.27.0", + "@esbuild/netbsd-arm64": "0.27.0", + "@esbuild/netbsd-x64": "0.27.0", + "@esbuild/openbsd-arm64": "0.27.0", + "@esbuild/openbsd-x64": "0.27.0", + "@esbuild/openharmony-arm64": "0.27.0", + "@esbuild/sunos-x64": "0.27.0", + "@esbuild/win32-arm64": "0.27.0", + "@esbuild/win32-ia32": "0.27.0", + "@esbuild/win32-x64": "0.27.0" + } + }, "node_modules/tsup/node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -37902,20 +37878,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/tsup/node_modules/source-map": { - "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "deprecated": "The work that was done in this beta branch won't be included in future versions", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "whatwg-url": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/tsup/node_modules/tinyexec": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", @@ -37943,6 +37905,516 @@ "fsevents": "~2.3.3" } }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, "node_modules/tuf-js": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", @@ -37958,27 +38430,27 @@ } }, "node_modules/turbo": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.5.8.tgz", - "integrity": "sha512-5c9Fdsr9qfpT3hA0EyYSFRZj1dVVsb6KIWubA9JBYZ/9ZEAijgUEae0BBR/Xl/wekt4w65/lYLTFaP3JmwSO8w==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.6.1.tgz", + "integrity": "sha512-qBwXXuDT3rA53kbNafGbT5r++BrhRgx3sAo0cHoDAeG9g1ItTmUMgltz3Hy7Hazy1ODqNpR+C7QwqL6DYB52yA==", "dev": true, "license": "MIT", "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "2.5.8", - "turbo-darwin-arm64": "2.5.8", - "turbo-linux-64": "2.5.8", - "turbo-linux-arm64": "2.5.8", - "turbo-windows-64": "2.5.8", - "turbo-windows-arm64": "2.5.8" + "turbo-darwin-64": "2.6.1", + "turbo-darwin-arm64": "2.6.1", + "turbo-linux-64": "2.6.1", + "turbo-linux-arm64": "2.6.1", + "turbo-windows-64": "2.6.1", + "turbo-windows-arm64": "2.6.1" } }, "node_modules/turbo-darwin-64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.8.tgz", - "integrity": "sha512-Dh5bCACiHO8rUXZLpKw+m3FiHtAp2CkanSyJre+SInEvEr5kIxjGvCK/8MFX8SFRjQuhjtvpIvYYZJB4AGCxNQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.6.1.tgz", + "integrity": "sha512-Dm0HwhyZF4J0uLqkhUyCVJvKM9Rw7M03v3J9A7drHDQW0qAbIGBrUijQ8g4Q9Cciw/BXRRd8Uzkc3oue+qn+ZQ==", "cpu": [ "x64" ], @@ -37990,9 +38462,9 @@ ] }, "node_modules/turbo-darwin-arm64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.5.8.tgz", - "integrity": "sha512-f1H/tQC9px7+hmXn6Kx/w8Jd/FneIUnvLlcI/7RGHunxfOkKJKvsoiNzySkoHQ8uq1pJnhJ0xNGTlYM48ZaJOQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.6.1.tgz", + "integrity": "sha512-U0PIPTPyxdLsrC3jN7jaJUwgzX5sVUBsKLO7+6AL+OASaa1NbT1pPdiZoTkblBAALLP76FM0LlnsVQOnmjYhyw==", "cpu": [ "arm64" ], @@ -38004,9 +38476,9 @@ ] }, "node_modules/turbo-linux-64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.8.tgz", - "integrity": "sha512-hMyvc7w7yadBlZBGl/bnR6O+dJTx3XkTeyTTH4zEjERO6ChEs0SrN8jTFj1lueNXKIHh1SnALmy6VctKMGnWfw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.6.1.tgz", + "integrity": "sha512-eM1uLWgzv89bxlK29qwQEr9xYWBhmO/EGiH22UGfq+uXr+QW1OvNKKMogSN65Ry8lElMH4LZh0aX2DEc7eC0Mw==", "cpu": [ "x64" ], @@ -38018,9 +38490,9 @@ ] }, "node_modules/turbo-linux-arm64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.8.tgz", - "integrity": "sha512-LQELGa7bAqV2f+3rTMRPnj5G/OHAe2U+0N9BwsZvfMvHSUbsQ3bBMWdSQaYNicok7wOZcHjz2TkESn1hYK6xIQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.6.1.tgz", + "integrity": "sha512-MFFh7AxAQAycXKuZDrbeutfWM5Ep0CEZ9u7zs4Hn2FvOViTCzIfEhmuJou3/a5+q5VX1zTxQrKGy+4Lf5cdpsA==", "cpu": [ "arm64" ], @@ -38032,9 +38504,9 @@ ] }, "node_modules/turbo-windows-64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.8.tgz", - "integrity": "sha512-3YdcaW34TrN1AWwqgYL9gUqmZsMT4T7g8Y5Azz+uwwEJW+4sgcJkIi9pYFyU4ZBSjBvkfuPZkGgfStir5BBDJQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.6.1.tgz", + "integrity": "sha512-buq7/VAN7KOjMYi4tSZT5m+jpqyhbRU2EUTTvp6V0Ii8dAkY2tAAjQN1q5q2ByflYWKecbQNTqxmVploE0LVwQ==", "cpu": [ "x64" ], @@ -38046,9 +38518,9 @@ ] }, "node_modules/turbo-windows-arm64": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.8.tgz", - "integrity": "sha512-eFC5XzLmgXJfnAK3UMTmVECCwuBcORrWdewoiXBnUm934DY6QN8YowC/srhNnROMpaKaqNeRpoB5FxCww3eteQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.6.1.tgz", + "integrity": "sha512-7w+AD5vJp3R+FB0YOj1YJcNcOOvBior7bcHTodqp90S3x3bLgpr7tE6xOea1e8JkP7GK6ciKVUpQvV7psiwU5Q==", "cpu": [ "arm64" ], @@ -38083,9 +38555,10 @@ } }, "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -38216,16 +38689,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.2.tgz", - "integrity": "sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.48.0.tgz", + "integrity": "sha512-fcKOvQD9GUn3Xw63EgiDqhvWJ5jsyZUaekl3KVpGsDJnN46WJTe3jWxtQP9lMZm1LJNkFLlTaWAxK2vUQR+cqw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.46.2", - "@typescript-eslint/parser": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/utils": "8.46.2" + "@typescript-eslint/eslint-plugin": "8.48.0", + "@typescript-eslint/parser": "8.48.0", + "@typescript-eslint/typescript-estree": "8.48.0", + "@typescript-eslint/utils": "8.48.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -38295,9 +38768,9 @@ } }, "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -38479,16 +38952,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/unified-engine/node_modules/@types/node": { - "version": "22.19.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.0.tgz", - "integrity": "sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, "node_modules/unified-engine/node_modules/ignore": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", @@ -38499,16 +38962,6 @@ "node": ">= 4" } }, - "node_modules/unified-engine/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/unified-engine/node_modules/lines-and-columns": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", @@ -38552,13 +39005,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unified-engine/node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, "node_modules/unified-lint-rule": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-3.0.1.tgz", @@ -38739,13 +39185,12 @@ "license": "ISC" }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "license": "MIT", "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, "node_modules/unpipe": { @@ -38829,40 +39274,6 @@ "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/update-notifier/node_modules/boxen": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", - "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.1", - "chalk": "^5.2.0", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.1.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/update-notifier/node_modules/camelcase": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", - "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/update-notifier/node_modules/chalk": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", @@ -38875,18 +39286,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/update-notifier/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -39296,9 +39695,9 @@ } }, "node_modules/vite": { - "version": "7.1.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.12.tgz", - "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz", + "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", "dev": true, "license": "MIT", "dependencies": { @@ -39370,6 +39769,490 @@ } } }, + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -39448,6 +40331,10 @@ "makeerror": "1.0.12" } }, + "node_modules/walkeros": { + "resolved": "apps/cli", + "link": true + }, "node_modules/walkeros-demo-react": { "resolved": "apps/demos/react", "link": true @@ -39488,7 +40375,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -39504,9 +40390,9 @@ } }, "node_modules/webpack": { - "version": "5.102.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", - "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", + "version": "5.103.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz", + "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.7", @@ -39526,7 +40412,7 @@ "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", + "loader-runner": "^4.3.1", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^4.3.3", @@ -39646,24 +40532,19 @@ } }, "node_modules/webpack-dev-middleware/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" - } - }, - "node_modules/webpack-dev-middleware/node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/webpack-dev-server": { @@ -39735,6 +40616,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/webpack-dev-server/node_modules/ipaddr.js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/webpack-dev-server/node_modules/open": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", @@ -39805,6 +40695,12 @@ "node": ">=4.0" } }, + "node_modules/webpack/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" + }, "node_modules/webpackbar": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-6.0.1.tgz", @@ -39970,7 +40866,6 @@ "version": "14.2.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", - "dev": true, "license": "MIT", "dependencies": { "tr46": "^5.1.0", @@ -40043,13 +40938,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/which-collection": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", @@ -40465,9 +41353,9 @@ } }, "node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "license": "MIT", "engines": { "node": ">=12.20" @@ -40477,9 +41365,9 @@ } }, "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==", + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz", + "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -40510,19 +41398,19 @@ }, "packages/cli": { "name": "@walkeros/cli", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "dependencies": { - "@walkeros/core": "^0.3.1", + "@walkeros/core": "^0.4.1", "@walkeros/docker": "*", + "@walkeros/server-core": "*", "chalk": "^5.3.0", "commander": "^11.0.0", "esbuild": "^0.19.0", "fs-extra": "^11.0.0", "handlebars": "^4.7.8", "jsdom": "^22.1.0", - "pacote": "^17.0.0", - "zod": "^3.23.8" + "pacote": "^17.0.0" }, "bin": { "walkeros": "dist/index.js" @@ -40535,386 +41423,6 @@ "tsx": "^4.0.0" } }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/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" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/cli/node_modules/@types/jsdom": { - "version": "21.1.7", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", - "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, "packages/cli/node_modules/chalk": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", @@ -40927,202 +41435,9 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "packages/cli/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "packages/cli/node_modules/cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", - "license": "MIT", - "dependencies": { - "rrweb-cssom": "^0.6.0" - }, - "engines": { - "node": ">=14" - } - }, - "packages/cli/node_modules/data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", - "license": "MIT", - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "packages/cli/node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", - "hasInstallScript": true, - "license": "MIT", - "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" - } - }, - "packages/cli/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "packages/cli/node_modules/jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", - "license": "MIT", - "dependencies": { - "abab": "^2.0.6", - "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", - "decimal.js": "^10.4.3", - "domexception": "^4.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "packages/cli/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "packages/cli/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.0" - }, - "engines": { - "node": ">=14" - } - }, - "packages/cli/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "packages/cli/node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "license": "MIT", - "dependencies": { - "tr46": "^4.1.1", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "packages/cli/node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "packages/cli/node_modules/zod-to-json-schema": { - "version": "3.24.6", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz", - "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.24.1" - } - }, "packages/collector": { "name": "@walkeros/collector", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41131,13 +41446,13 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "devDependencies": {} }, "packages/core": { "name": "@walkeros/core", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41151,12 +41466,11 @@ }, "packages/docker": { "name": "@walkeros/docker", - "version": "0.1.1", + "version": "0.2.1", "license": "MIT", "dependencies": { "cors": "^2.8.5", - "express": "^4.18.2", - "zod": "^3.23.8" + "express": "^4.18.2" }, "devDependencies": { "@types/cors": "^2.8.17", @@ -41186,18 +41500,9 @@ "url": "https://opencollective.com/node-fetch" } }, - "packages/docker/node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "packages/server/core": { "name": "@walkeros/server-core", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41206,12 +41511,12 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" } }, "packages/server/destinations/aws": { "name": "@walkeros/server-destination-aws", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41221,13 +41526,13 @@ "license": "MIT", "dependencies": { "@aws-sdk/client-firehose": "^3.606.0", - "@walkeros/server-core": "0.3.1" + "@walkeros/server-core": "0.4.1" }, "devDependencies": {} }, "packages/server/destinations/datamanager": { "name": "@walkeros/server-destination-datamanager", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41236,14 +41541,15 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/server-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/server-core": "0.4.1", + "google-auth-library": "^10.5.0" }, "devDependencies": {} }, "packages/server/destinations/gcp": { "name": "@walkeros/server-destination-gcp", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41253,13 +41559,13 @@ "license": "MIT", "dependencies": { "@google-cloud/bigquery": "^7.8.0", - "@walkeros/server-core": "0.3.1" + "@walkeros/server-core": "0.4.1" }, "devDependencies": {} }, "packages/server/destinations/meta": { "name": "@walkeros/server-destination-meta", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41268,14 +41574,14 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/server-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/server-core": "0.4.1" }, "devDependencies": {} }, "packages/server/sources/express": { "name": "@walkeros/server-source-express", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41295,7 +41601,7 @@ }, "packages/server/sources/gcp": { "name": "@walkeros/server-source-gcp", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41304,7 +41610,7 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "devDependencies": {}, "peerDependencies": { @@ -41313,7 +41619,7 @@ }, "packages/web/core": { "name": "@walkeros/web-core", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41322,12 +41628,12 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" } }, "packages/web/destinations/api": { "name": "@walkeros/web-destination-api", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41336,13 +41642,13 @@ ], "license": "MIT", "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": {} }, "packages/web/destinations/gtag": { "name": "@walkeros/web-destination-gtag", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41351,12 +41657,12 @@ ], "license": "MIT", "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" } }, "packages/web/destinations/meta": { "name": "@walkeros/web-destination-meta", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41365,7 +41671,7 @@ ], "license": "MIT", "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": { "@types/facebook-pixel": "^0.0.31" @@ -41373,7 +41679,7 @@ }, "packages/web/destinations/piwikpro": { "name": "@walkeros/web-destination-piwikpro", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41382,14 +41688,14 @@ ], "license": "MIT", "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/web-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/web-core": "0.4.1" }, "devDependencies": {} }, "packages/web/destinations/plausible": { "name": "@walkeros/web-destination-plausible", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41398,30 +41704,13 @@ ], "license": "MIT", "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": {} }, - "packages/web/destinations/snowplow": { - "name": "@walkeros/web-destination-snowplow", - "version": "2.0.0", - "extraneous": true, - "license": "MIT", - "dependencies": { - "@walkeros/core": "latest", - "@walkeros/web-core": "latest" - }, - "devDependencies": { - "@walkeros/collector": "latest", - "@walkeros/config": "latest" - }, - "peerDependencies": { - "@walkeros/core": "latest" - } - }, "packages/web/sources/browser": { "name": "@walkeros/web-source-browser", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41430,13 +41719,13 @@ ], "license": "MIT", "dependencies": { - "@walkeros/collector": "0.3.1", - "@walkeros/web-core": "0.3.1" + "@walkeros/collector": "0.4.1", + "@walkeros/web-core": "0.4.1" } }, "packages/web/sources/dataLayer": { "name": "@walkeros/web-source-datalayer", - "version": "0.3.1", + "version": "0.4.1", "funding": [ { "type": "GitHub Sponsors", @@ -41445,8 +41734,8 @@ ], "license": "MIT", "dependencies": { - "@walkeros/collector": "0.3.1", - "@walkeros/core": "0.3.1" + "@walkeros/collector": "0.4.1", + "@walkeros/core": "0.4.1" }, "devDependencies": { "@types/gtag.js": "^0.0.20" @@ -41454,67 +41743,69 @@ }, "packages/web/sources/dataLayer/node_modules/@types/gtag.js": { "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/gtag.js/-/gtag.js-0.0.20.tgz", + "integrity": "sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg==", "dev": true, "license": "MIT" }, "website": { "name": "@walkeros/website", - "version": "0.2.2", + "version": "0.3.1", "dependencies": { - "@docusaurus/core": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", - "@docusaurus/theme-live-codeblock": "^3.7.0", - "@docusaurus/theme-mermaid": "^3.7.0", - "@iconify/react": "^5.2.1", - "@walkeros/collector": "*", - "@walkeros/core": "*", - "@walkeros/explorer": "^0.3.0", - "@walkeros/walker.js": "*", - "@walkeros/web-destination-api": "*", - "@walkeros/web-destination-gtag": "*", - "@walkeros/web-destination-meta": "*", - "@walkeros/web-destination-piwikpro": "*", - "@walkeros/web-destination-plausible": "*", - "@walkeros/web-source-browser": "*", + "@docusaurus/core": "^3.9.2", + "@docusaurus/preset-classic": "^3.9.2", + "@docusaurus/theme-live-codeblock": "^3.9.2", + "@docusaurus/theme-mermaid": "^3.9.2", + "@iconify/react": "^6.0.2", + "@walkeros/collector": "0.4.1", + "@walkeros/core": "0.4.1", + "@walkeros/explorer": "^0.3.1", + "@walkeros/walker.js": "0.4.1", + "@walkeros/web-destination-api": "0.4.1", + "@walkeros/web-destination-gtag": "0.4.1", + "@walkeros/web-destination-meta": "0.4.1", + "@walkeros/web-destination-piwikpro": "0.4.1", + "@walkeros/web-destination-plausible": "0.4.1", + "@walkeros/web-source-browser": "0.4.1", "css-loader": "^7.1.2", "prism-react-renderer": "^2.4.1", - "react": "^19.1.0", - "react-dom": "^19.1.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", "react-simple-code-editor": "^0.14.1", - "sass": "^1.86.3", - "sass-loader": "^16.0.5", + "sass": "^1.94.2", + "sass-loader": "^16.0.6", "style-loader": "^4.0.0", - "tailwind-merge": "^2.5.5" + "tailwind-merge": "^3.4.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.7.0", - "@docusaurus/tsconfig": "^3.7.0", - "@docusaurus/types": "^3.7.0", + "@docusaurus/module-type-aliases": "^3.9.2", + "@docusaurus/tsconfig": "^3.9.2", + "@docusaurus/types": "^3.9.2", "@heroicons/react": "^2.2.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/postcss": "^4.1.6", - "@tailwindcss/typography": "^0.5.16", - "autoprefixer": "^10.4.21", + "@tailwindcss/postcss": "^4.1.17", + "@tailwindcss/typography": "^0.5.19", + "autoprefixer": "^10.4.22", "clsx": "^2.1.1", - "daisyui": "^5.0.35", - "postcss": "^8.5.3", - "prettier": "^3.5.3", + "daisyui": "^5.5.5", + "postcss": "^8.5.6", + "prettier": "^3.6.2", "remark-cli": "^12.0.1", "remark-mdx": "^3.1.1", "remark-preset-lint-consistent": "^6.0.1", "remark-preset-lint-recommended": "^7.0.1", - "tailwindcss": "^4.1.6", - "typescript": "~5.8.3" + "tailwindcss": "^4.1.17", + "typescript": "~5.9.3" }, "engines": { "node": ">=20.0" } }, "website/node_modules/@walkeros/explorer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@walkeros/explorer/-/explorer-0.3.0.tgz", - "integrity": "sha512-sJupZOjiJZpp4sfYuXae1CJ5pgwzPZvBMrTW5O1pqgDJN0S1ukJ3bANKZ90RvhN0UQYfVMm7yloDfe7FxjnIYw==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@walkeros/explorer/-/explorer-0.3.1.tgz", + "integrity": "sha512-Thk+dFQHyBLZhsyv7yS2wCCp+wD1JRO5rba5UOTugy6vQhMbIdqMorXN9Jyysxe5jB/Eggw9x89aLywSYIkWRg==", "funding": [ { "type": "GitHub Sponsors", @@ -41529,10 +41820,11 @@ "@rjsf/validator-ajv8": "^5.24.13", "clsx": "^2.1.1", "monaco-editor": "^0.54.0", + "prettier": "^3.6.2", "tailwind-merge": "^2.5.5" }, "peerDependencies": { - "@walkeros/core": "^0.3.0", + "@walkeros/core": "^0.3.1", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, @@ -41545,24 +41837,22 @@ } } }, + "website/node_modules/@walkeros/explorer/node_modules/tailwind-merge": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz", + "integrity": "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "website/node_modules/tailwindcss": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", - "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", + "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", "dev": true, "license": "MIT" - }, - "website/node_modules/typescript": { - "version": "5.8.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } } } } diff --git a/package.json b/package.json index 4fa130660..bd7e193cb 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,10 @@ "packages/web/sources/*", "apps/quickstart", "apps/walkerjs", + "apps/cli", "apps/storybook-addon", + "apps/demos/destination", + "apps/demos/source", "apps/demos/react", "apps/demos/storybook", "website" @@ -26,7 +29,8 @@ "dev": "turbo run dev --output-logs=errors-only", "format": "prettier --write .", "lint": "turbo run lint --filter=!@walkeros/website --output-logs=errors-only", - "publish-packages": "npm run build lint test && changeset version && changeset publish", + "publish-packages": "turbo run build lint test --filter=!@walkeros/website --output-logs=errors-only && changeset version && changeset publish", + "publish-docker": "npm run -w @walkeros/cli docker:publish && npm run -w @walkeros/docker docker:publish", "test": "turbo run test --filter=!@walkeros/website --output-logs=errors-only", "prepare": "husky || true" }, diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 9d7798ad9..1d53baa3f 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,65 @@ # @walkeros/cli +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/server-core@0.4.1 + - @walkeros/docker@0.2.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/docker@0.2.0 + - @walkeros/core@0.4.0 + +## 0.3.6 + +### Patch Changes + +- port path and name +- df4b2a1: Read CLI version dynamically from package.json instead of hardcoded + value +- Updated dependencies + - @walkeros/docker@0.1.5 + +## 0.3.5 + +### Patch Changes + +- cli usage +- Updated dependencies + - @walkeros/docker@0.1.4 + +## 0.3.4 + +### Patch Changes + +- main module exec + +## 0.3.3 + +### Patch Changes + +- force local + +## 0.3.2 + +### Patch Changes + +- walkeros cli with docker +- Updated dependencies + - @walkeros/docker@0.1.2 + ## 0.3.1 ### Patch Changes diff --git a/packages/cli/README.md b/packages/cli/README.md index 861ea7a09..ebb26da48 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -31,24 +31,31 @@ npm install @walkeros/cli Generate optimized JavaScript bundles from flow configurations. ```bash -walkeros bundle --config flow.json [options] +walkeros bundle [options] +``` + +Config files can be local paths or HTTP(S) URLs: + +```bash +walkeros bundle ./config.json # Local file +walkeros bundle https://example.com/config.json # Remote URL ``` **Options:** -- `-c, --config ` - Flow configuration file (required) - `-e, --env ` - Build specific environment (multi-env configs) - `--all` - Build all environments - `-s, --stats` - Show bundle statistics - `--json` - Output stats as JSON - `--no-cache` - Disable package caching +- `--local` - Run locally without Docker - `-v, --verbose` - Verbose output **Example:** ```bash # Bundle with stats -walkeros bundle --config examples/server-collect.json --stats +walkeros bundle examples/server-collect.json --stats ``` The output path is specified in the config's `build.output` field. @@ -58,14 +65,14 @@ The output path is specified in the config's `build.output` field. Test event processing with simulated events. ```bash -walkeros simulate --config flow.json --event '{"name":"page view"}' [options] +walkeros simulate --event '{"name":"page view"}' [options] ``` **Options:** -- `-c, --config ` - Bundle configuration file (required) - `-e, --event ` - Event JSON string (required) - `--json` - Output results as JSON +- `--local` - Run locally without Docker - `-v, --verbose` - Verbose output **Example:** @@ -73,7 +80,7 @@ walkeros simulate --config flow.json --event '{"name":"page view"}' [options] ```bash # Simulate page view walkeros simulate \ - --config examples/web-serve.json \ + examples/web-serve.json \ --event '{"name":"page view","data":{"title":"Home"}}' \ --json ``` @@ -84,7 +91,7 @@ Run flows locally using @walkeros/docker as a library (no Docker daemon required). ```bash -walkeros run --config [options] +walkeros run [options] ``` **Modes:** @@ -94,10 +101,10 @@ walkeros run --config [options] **Options:** -- `-c, --config ` - Flow config (.json) or bundle (.mjs) - `-p, --port ` - Server port - `-h, --host ` - Server host - `--static-dir ` - Static directory (serve mode) +- `--local` - Run locally without Docker - `--json` - JSON output - `-v, --verbose` - Verbose output @@ -105,13 +112,13 @@ walkeros run --config [options] ```bash # Run collection server (auto-bundles JSON) -walkeros run collect --config examples/server-collect.json --port 3000 +walkeros run collect examples/server-collect.json --port 3000 # Run with pre-built bundle -walkeros run collect --config examples/server-collect.mjs --port 3000 +walkeros run collect examples/server-collect.mjs --port 3000 # Serve static files -walkeros run serve --config flow.json --port 8080 --static-dir ./dist +walkeros run serve flow.json --port 8080 --static-dir ./dist ``` **How it works:** @@ -219,15 +226,15 @@ Try them: ```bash # Bundle example -walkeros bundle --config examples/server-collect.json --stats +walkeros bundle examples/server-collect.json --stats # Simulate walkeros simulate \ - --config examples/web-serve.json \ + examples/web-serve.json \ --event '{"name":"product view","data":{"id":"P123"}}' # Run server -walkeros run collect --config examples/server-collect.json --port 3000 +walkeros run collect examples/server-collect.json --port 3000 ``` ## Development Workflow @@ -239,16 +246,16 @@ Typical development cycle: vim my-flow.json # 2. Bundle and check stats -walkeros bundle --config my-flow.json --stats +walkeros bundle my-flow.json --stats # 3. Test with simulation walkeros simulate \ - --config my-flow.json \ + my-flow.json \ --event '{"name":"test event"}' \ --verbose # 4. Run locally -walkeros run collect --config my-flow.json --port 3000 +walkeros run collect my-flow.json --port 3000 # 5. In another terminal, test it curl -X POST http://localhost:3000/collect \ @@ -267,6 +274,21 @@ CLI (downloads packages + bundles with esbuild) **Key principle**: CLI handles build-time, Docker handles runtime. +## Docker Images + +By default, CLI uses **explicit version tags** (not `:latest`): + +- `walkeros/cli:0.3.5` - Build tools (bundle, simulate) +- `walkeros/docker:0.1.4` - Production runtime + +Override with environment variables: + +```bash +export WALKEROS_CLI_DOCKER_IMAGE=walkeros/cli:0.3.4 +export WALKEROS_RUNTIME_DOCKER_IMAGE=walkeros/docker:latest +walkeros bundle config.json +``` + ## Requirements - **Node.js**: 18+ or 22+ diff --git a/packages/cli/docker/Dockerfile b/packages/cli/docker/Dockerfile index 2039f752c..e5ee2c188 100644 --- a/packages/cli/docker/Dockerfile +++ b/packages/cli/docker/Dockerfile @@ -17,10 +17,17 @@ RUN npm install --omit=dev --no-audit # Copy built CLI distribution COPY dist ./dist +# Copy templates and examples for zero-config usage +COPY templates ./templates +COPY examples ./examples + # Set working directory for user projects # All commands will run relative to this directory WORKDIR /workspace +# Set environment variable to indicate container environment +ENV WALKEROS_CONTAINER=true + # Entry point is the CLI # Users can run: docker run walkeros/cli:latest bundle config.json ENTRYPOINT ["node", "/cli/dist/index.js"] diff --git a/packages/cli/examples/README.md b/packages/cli/examples/README.md index 94f24a4d4..dcdfac361 100644 --- a/packages/cli/examples/README.md +++ b/packages/cli/examples/README.md @@ -3,6 +3,30 @@ This directory contains example flow configurations demonstrating various walkerOS use cases. +## Rebuilding Example Bundles + +The `.mjs` bundle files in this directory are pre-built from their corresponding +`.json` config files. If you update the configs or core packages, rebuild them: + +```bash +cd /workspaces/walkerOS/packages/cli + +# Rebuild server-collect +walkeros bundle examples/server-collect.json --local +mv server-collect.mjs examples/ + +# Rebuild web-serve +walkeros bundle examples/web-serve.json --local +mv web-serve.js examples/ + +# Update Docker demos +cp examples/server-collect.mjs ../docker/demos/demo-collect.mjs +cp examples/web-serve.js ../docker/demos/demo-serve.mjs +``` + +**Important**: Always use `--local` flag when rebuilding examples in the +devcontainer. + ## Web Examples ### web-serve.json @@ -23,7 +47,7 @@ event flow testing ```bash walkeros bundle examples/web-serve.json -walkeros run serve examples/web-serve.mjs -p 3000 +walkeros run serve examples/web-serve.js -p 3000 # Open http://localhost:3000 in browser ``` @@ -63,11 +87,11 @@ export GA4_MEASUREMENT_ID="G-YOUR-ID" export META_PIXEL_ID="123456789" # Bundle for browser -walkeros bundle -c examples/web-tracking.json --stats +walkeros bundle examples/web-tracking.json --stats # Simulate events -walkeros simulate -c examples/web-tracking.json \ - -e '{"name":"product view","data":{"id":"P123","name":"Laptop","price":999}}' +walkeros simulate examples/web-tracking.json \ + --event '{"name":"product view","data":{"id":"P123","name":"Laptop","price":999}}' ``` ## Server Examples @@ -166,7 +190,7 @@ walkeros run collect examples/server-collect.mjs -p 8080 ```bash walkeros bundle examples/web-serve.json -walkeros run serve examples/web-serve.mjs -p 3000 +walkeros run serve examples/web-serve.js -p 3000 ``` **Browser**: Open http://localhost:3000 diff --git a/packages/cli/examples/event.json b/packages/cli/examples/event.json new file mode 100644 index 000000000..65ebd3ec0 --- /dev/null +++ b/packages/cli/examples/event.json @@ -0,0 +1,53 @@ +{ + "name": "order complete", + "data": { + "id": "ORD-2024-12345", + "total": 299.99, + "currency": "USD", + "tax": 24.99, + "shipping": 15.0 + }, + "user": { + "id": "user_abc123", + "email": "customer@example.com", + "gclid": "CjwKCAiA_xyz123ABC" + }, + "source": { + "id": "https://example.com/thankyou.html?email=customer@example.com&order=ORD-2024-12345&gclid=CjwKCAiA_xyz123ABC", + "type": "web" + }, + "nested": [ + { + "type": "product", + "data": { + "id": "PROD-001", + "name": "Wireless Headphones", + "price": 149.99, + "quantity": 1, + "category": "Electronics" + } + }, + { + "type": "product", + "data": { + "id": "PROD-002", + "name": "Phone Case", + "price": 29.99, + "quantity": 2, + "category": "Accessories" + } + } + ], + "consent": { + "functional": true, + "marketing": true + }, + "globals": { + "language": "en", + "country": "US" + }, + "context": { + "session": ["sess_xyz789", 1], + "page": ["/thankyou", 0] + } +} diff --git a/packages/cli/examples/flow-order-complete.json b/packages/cli/examples/flow-order-complete.json new file mode 100644 index 000000000..198acbee7 --- /dev/null +++ b/packages/cli/examples/flow-order-complete.json @@ -0,0 +1,68 @@ +{ + "flow": { + "platform": "web", + "destinations": { + "demo": { + "code": "destinationDemo", + "config": { + "consent": { + "marketing": true + }, + "settings": { + "name": "Order Complete with Consent Demo", + "values": ["name", "data", "user", "source", "consent"] + }, + "mapping": { + "order": { + "complete": { + "name": "purchase", + "data": { + "map": { + "transaction_id": "data.id", + "value": "data.total", + "currency": "data.currency", + "tax": "data.tax", + "shipping": "data.shipping", + "email": { + "key": "user.email", + "consent": { + "marketing": true + } + }, + "gclid": { + "key": "user.gclid", + "consent": { + "marketing": true + } + }, + "source_url": "source.id" + } + } + } + } + } + } + } + }, + "collector": { + "run": true, + "globals": { + "environment": "production", + "version": "1.0.0" + } + } + }, + "build": { + "packages": { + "@walkeros/collector": { + "version": "latest", + "imports": ["startFlow"] + }, + "@walkeros/destination-demo": { + "version": "latest", + "imports": ["destinationDemo"] + } + }, + "output": "flow-order-complete.js" + } +} diff --git a/packages/cli/examples/flow-simple.json b/packages/cli/examples/flow-simple.json new file mode 100644 index 000000000..0c22cb9f2 --- /dev/null +++ b/packages/cli/examples/flow-simple.json @@ -0,0 +1,32 @@ +{ + "flow": { + "platform": "web", + "destinations": { + "demo": { + "code": "destinationDemo", + "config": { + "settings": { + "name": "Simple Demo", + "values": ["name", "data", "user", "consent"] + } + } + } + }, + "collector": { + "run": true + } + }, + "build": { + "packages": { + "@walkeros/collector": { + "version": "latest", + "imports": ["startFlow"] + }, + "@walkeros/destination-demo": { + "version": "latest", + "imports": ["destinationDemo"] + } + }, + "output": "flow-simple.js" + } +} diff --git a/packages/cli/examples/flow.json b/packages/cli/examples/flow.json new file mode 100644 index 000000000..86be70681 --- /dev/null +++ b/packages/cli/examples/flow.json @@ -0,0 +1,82 @@ +{ + "flow": { + "platform": "web", + "destinations": { + "ga4": { + "code": "destinationGtag", + "config": { + "consent": { + "marketing": true + }, + "settings": { + "ga4": { + "measurementId": "G-XXXXXXXXXX" + } + }, + "mapping": { + "order": { + "complete": { + "name": "purchase", + "data": { + "map": { + "transaction_id": "data.id", + "value": "data.total", + "currency": "data.currency", + "tax": "data.tax", + "shipping": "data.shipping", + "email": { + "key": "user.email", + "consent": { + "marketing": true + } + }, + "gclid": { + "key": "user.gclid", + "consent": { + "marketing": true + } + }, + "source_url": "source.id" + } + } + } + } + } + } + }, + "demo": { + "code": "destinationDemo", + "config": { + "settings": { + "name": "Order Complete Demo", + "values": ["name", "data", "user", "source", "consent"] + } + } + } + }, + "collector": { + "run": true, + "globals": { + "environment": "production", + "version": "1.0.0" + } + } + }, + "build": { + "packages": { + "@walkeros/collector": { + "version": "latest", + "imports": ["startFlow"] + }, + "@walkeros/web-destination-gtag": { + "version": "latest", + "imports": ["destinationGtag"] + }, + "@walkeros/destination-demo": { + "version": "latest", + "imports": ["destinationDemo"] + } + }, + "output": "flow.js" + } +} diff --git a/packages/cli/examples/server-collect.json b/packages/cli/examples/server-collect.json index 7418d6d48..6b3f144c9 100644 --- a/packages/cli/examples/server-collect.json +++ b/packages/cli/examples/server-collect.json @@ -48,9 +48,6 @@ "imports": ["destinationDemo"] } }, - "code": "// Simple server-side event collection with demo destination\n", - "template": "../templates/base.hbs", - "output": "server-collect.mjs", - "tempDir": "/tmp" + "output": "server-collect.mjs" } } diff --git a/packages/cli/examples/server-collect.mjs b/packages/cli/examples/server-collect.mjs index d80685271..261585b90 100644 --- a/packages/cli/examples/server-collect.mjs +++ b/packages/cli/examples/server-collect.mjs @@ -1,785 +1,13501 @@ +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + // node_modules/@walkeros/core/dist/index.mjs -import { z as f } from "zod"; -import { z as k } from "zod"; -import { z } from "zod"; -import { zodToJsonSchema as D } from "zod-to-json-schema"; -import { z as ae } from "zod"; -import { zodToJsonSchema as se } from "zod-to-json-schema"; -import { z as Ie } from "zod"; -import { zodToJsonSchema as Oe } from "zod-to-json-schema"; -import { z as et } from "zod"; -import { zodToJsonSchema as tt } from "zod-to-json-schema"; -import { z as zt } from "zod"; -import { zodToJsonSchema as Dt } from "zod-to-json-schema"; -import { z as Ht } from "zod"; -import { zodToJsonSchema as _t } from "zod-to-json-schema"; -import { z as un } from "zod"; -import { zodToJsonSchema as mn } from "zod-to-json-schema"; -import { zodToJsonSchema as gn } from "zod-to-json-schema"; -var e = Object.defineProperty; -var t = (t4, n4) => { - for (var i2 in n4) - e(t4, i2, { get: n4[i2], enumerable: true }); -}; -var h = f.string(); -var y = f.number(); -var S = f.boolean(); -var v = f.string().min(1); -var j = f.number().int().positive(); -var w = f.number().int().nonnegative(); -var x = f.number().describe("Tagging version number"); -var E = f.union([f.string(), f.number(), f.boolean()]); -var C = E.optional(); -var P = {}; -t(P, { ErrorHandlerSchema: () => O, HandlerSchema: () => L, LogHandlerSchema: () => J, StorageSchema: () => I, StorageTypeSchema: () => $, errorHandlerJsonSchema: () => R, handlerJsonSchema: () => q, logHandlerJsonSchema: () => A, storageJsonSchema: () => M, storageTypeJsonSchema: () => T }); -var $ = z.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); -var I = z.object({ Local: z.literal("local"), Session: z.literal("session"), Cookie: z.literal("cookie") }).describe("Storage type constants for type-safe references"); -var O = z.any().describe("Error handler function: (error, state?) => void"); -var J = z.any().describe("Log handler function: (message, verbose?) => void"); -var L = z.object({ Error: O.describe("Error handler function"), Log: J.describe("Log handler function") }).describe("Handler interface with error and log functions"); -var T = D($, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); -var M = D(I, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); -var R = D(O, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); -var A = D(J, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); -var q = D(L, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); -var U = k.object({ onError: O.optional().describe("Error handler function: (error, state?) => void"), onLog: J.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); -var N = k.object({ verbose: k.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); -var B = k.object({ queue: k.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); -var W = k.object({}).partial(); -var V = k.object({ init: k.boolean().describe("Whether to initialize immediately").optional(), loadScript: k.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); -var H = k.object({ disabled: k.boolean().describe("Set to true to disable").optional() }).partial(); -var _ = k.object({ primary: k.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); -var K = k.object({ settings: k.any().optional().describe("Implementation-specific configuration") }).partial(); -var F = k.object({ env: k.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); -var Z = k.object({ type: k.string().optional().describe("Instance type identifier"), config: k.any().describe("Instance configuration") }).partial(); -var ee = k.object({ collector: k.any().describe("Collector instance (runtime object)"), config: k.any().describe("Configuration"), env: k.any().describe("Environment dependencies") }).partial(); -var te = k.object({ batch: k.number().optional().describe("Batch size: bundle N events for batch processing"), batched: k.any().optional().describe("Batch of events to be processed") }).partial(); -var ne = k.object({ ignore: k.boolean().describe("Set to true to skip processing").optional(), condition: k.string().optional().describe("Condition function: return true to process") }).partial(); -var ie = k.object({ sources: k.record(k.string(), k.any()).describe("Map of source instances") }).partial(); -var oe = k.object({ destinations: k.record(k.string(), k.any()).describe("Map of destination instances") }).partial(); -var re = {}; -t(re, { ConsentSchema: () => me, DeepPartialEventSchema: () => je, EntitiesSchema: () => ye, EntitySchema: () => he, EventSchema: () => Se, OrderedPropertiesSchema: () => pe, PartialEventSchema: () => ve, PropertiesSchema: () => de, PropertySchema: () => le, PropertyTypeSchema: () => ce, SourceSchema: () => fe, SourceTypeSchema: () => ue, UserSchema: () => ge, VersionSchema: () => be, consentJsonSchema: () => De, entityJsonSchema: () => Pe, eventJsonSchema: () => we, orderedPropertiesJsonSchema: () => ke, partialEventJsonSchema: () => xe, propertiesJsonSchema: () => Ce, sourceTypeJsonSchema: () => ze, userJsonSchema: () => Ee }); -var ce = ae.lazy(() => ae.union([ae.boolean(), ae.string(), ae.number(), ae.record(ae.string(), le)])); -var le = ae.lazy(() => ae.union([ce, ae.array(ce)])); -var de = ae.record(ae.string(), le.optional()).describe("Flexible property collection with optional values"); -var pe = ae.record(ae.string(), ae.tuple([le, ae.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); -var ue = ae.union([ae.enum(["web", "server", "app", "other"]), ae.string()]).describe("Source type: web, server, app, other, or custom"); -var me = ae.record(ae.string(), ae.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); -var ge = de.and(ae.object({ id: ae.string().optional().describe("User identifier"), device: ae.string().optional().describe("Device identifier"), session: ae.string().optional().describe("Session identifier"), hash: ae.string().optional().describe("Hashed identifier"), address: ae.string().optional().describe("User address"), email: ae.string().email().optional().describe("User email address"), phone: ae.string().optional().describe("User phone number"), userAgent: ae.string().optional().describe("Browser user agent string"), browser: ae.string().optional().describe("Browser name"), browserVersion: ae.string().optional().describe("Browser version"), deviceType: ae.string().optional().describe("Device type (mobile, desktop, tablet)"), os: ae.string().optional().describe("Operating system"), osVersion: ae.string().optional().describe("Operating system version"), screenSize: ae.string().optional().describe("Screen dimensions"), language: ae.string().optional().describe("User language"), country: ae.string().optional().describe("User country"), region: ae.string().optional().describe("User region/state"), city: ae.string().optional().describe("User city"), zip: ae.string().optional().describe("User postal code"), timezone: ae.string().optional().describe("User timezone"), ip: ae.string().optional().describe("User IP address"), internal: ae.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); -var be = de.and(ae.object({ source: h.describe('Walker implementation version (e.g., "2.0.0")'), tagging: x })).describe("Walker version information"); -var fe = de.and(ae.object({ type: ue.describe("Source type identifier"), id: h.describe("Source identifier (typically URL on web)"), previous_id: h.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); -var he = ae.lazy(() => ae.object({ entity: ae.string().describe("Entity name"), data: de.describe("Entity-specific properties"), nested: ae.array(he).describe("Nested child entities"), context: pe.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); -var ye = ae.array(he).describe("Array of nested entities"); -var Se = ae.object({ name: ae.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: de.describe("Event-specific properties"), context: pe.describe("Ordered context properties with priorities"), globals: de.describe("Global properties shared across events"), custom: de.describe("Custom implementation-specific properties"), user: ge.describe("User identification and attributes"), nested: ye.describe("Related nested entities"), consent: me.describe("Consent states at event time"), id: v.describe("Unique event identifier (timestamp-based)"), trigger: h.describe("Event trigger identifier"), entity: h.describe("Parsed entity from event name"), action: h.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: y.describe("Event processing timing information"), group: h.describe("Event grouping identifier"), count: w.describe("Event count in session"), version: be.describe("Walker version information"), source: fe.describe("Event source information") }).describe("Complete walkerOS event structure"); -var ve = Se.partial().describe("Partial event structure with all fields optional"); -var je = ae.lazy(() => Se.deepPartial()).describe("Deep partial event structure with all nested fields optional"); -var we = se(Se, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); -var xe = se(ve, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); -var Ee = se(ge, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); -var Ce = se(de, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); -var ke = se(pe, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); -var Pe = se(he, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); -var ze = se(ue, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); -var De = se(me, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); -var $e = {}; -t($e, { ConfigSchema: () => Be, LoopSchema: () => Te, MapSchema: () => Re, PolicySchema: () => qe, ResultSchema: () => We, RuleSchema: () => Ue, RulesSchema: () => Ne, SetSchema: () => Me, ValueConfigSchema: () => Ae, ValueSchema: () => Je, ValuesSchema: () => Le, configJsonSchema: () => Ye, loopJsonSchema: () => _e, mapJsonSchema: () => Fe, policyJsonSchema: () => Ge, ruleJsonSchema: () => Qe, rulesJsonSchema: () => Xe, setJsonSchema: () => Ke, valueConfigJsonSchema: () => He, valueJsonSchema: () => Ve }); -var Je = Ie.lazy(() => Ie.union([Ie.string().describe('String value or property path (e.g., "data.id")'), Ie.number().describe("Numeric value"), Ie.boolean().describe("Boolean value"), Ae, Ie.array(Je).describe("Array of values")])); -var Le = Ie.array(Je).describe("Array of transformation values"); -var Te = Ie.tuple([Je, Je]).describe("Loop transformation: [source, transform] tuple for array processing"); -var Me = Ie.array(Je).describe("Set: Array of values for selection or combination"); -var Re = Ie.record(Ie.string(), Je).describe("Map: Object mapping keys to transformation values"); -var Ae = Ie.object({ key: Ie.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: Ie.union([Ie.string(), Ie.number(), Ie.boolean()]).optional().describe("Static primitive value"), fn: Ie.string().optional().describe("Custom transformation function as string (serialized)"), map: Re.optional().describe("Object mapping: transform event data to structured output"), loop: Te.optional().describe("Loop transformation: [source, transform] for array processing"), set: Me.optional().describe("Set of values: combine or select from multiple values"), consent: me.optional().describe("Required consent states to include this value"), condition: Ie.string().optional().describe("Condition function as string: return true to include value"), validate: Ie.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); -var qe = Ie.record(Ie.string(), Je).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); -var Ue = Ie.object({ batch: Ie.number().optional().describe("Batch size: bundle N events for batch processing"), condition: Ie.string().optional().describe("Condition function as string: return true to process event"), consent: me.optional().describe("Required consent states to process this event"), settings: Ie.any().optional().describe("Destination-specific settings for this event mapping"), data: Ie.union([Je, Le]).optional().describe("Data transformation rules for event"), ignore: Ie.boolean().optional().describe("Set to true to skip processing this event"), name: Ie.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: qe.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); -var Ne = Ie.record(Ie.string(), Ie.record(Ie.string(), Ie.union([Ue, Ie.array(Ue)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); -var Be = Ie.object({ consent: me.optional().describe("Required consent states to process any events"), data: Ie.union([Je, Le]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: qe.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); -var We = Ie.object({ eventMapping: Ue.optional().describe("Resolved mapping rule for event"), mappingKey: Ie.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); -var Ve = Oe(Je, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); -var He = Oe(Ae, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); -var _e = Oe(Te, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); -var Ke = Oe(Me, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); -var Fe = Oe(Re, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); -var Ge = Oe(qe, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); -var Qe = Oe(Ue, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); -var Xe = Oe(Ne, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); -var Ye = Oe(Be, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); -var Ze = {}; -t(Ze, { BatchSchema: () => dt, ConfigSchema: () => nt, ContextSchema: () => rt, DLQSchema: () => St, DataSchema: () => pt, DestinationPolicySchema: () => ot, DestinationsSchema: () => bt, InitDestinationsSchema: () => gt, InitSchema: () => mt, InstanceSchema: () => ut, PartialConfigSchema: () => it, PushBatchContextSchema: () => st, PushContextSchema: () => at, PushEventSchema: () => ct, PushEventsSchema: () => lt, PushResultSchema: () => ht, RefSchema: () => ft, ResultSchema: () => yt, batchJsonSchema: () => Et, configJsonSchema: () => vt, contextJsonSchema: () => wt, instanceJsonSchema: () => Ct, partialConfigJsonSchema: () => jt, pushContextJsonSchema: () => xt, resultJsonSchema: () => kt }); -var nt = et.object({ consent: me.optional().describe("Required consent states to send events to this destination"), settings: et.any().describe("Implementation-specific configuration").optional(), data: et.union([Je, Le]).optional().describe("Global data transformation applied to all events for this destination"), env: et.any().describe("Environment dependencies (platform-specific)").optional(), id: v.describe("Destination instance identifier (defaults to destination key)").optional(), init: et.boolean().describe("Whether to initialize immediately").optional(), loadScript: et.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: qe.optional().describe("Pre-processing policy rules applied before event mapping"), queue: et.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: et.boolean().describe("Enable verbose logging for debugging").optional(), onError: O.optional(), onLog: J.optional() }).describe("Destination configuration"); -var it = nt.deepPartial().describe("Partial destination configuration with all fields deeply optional"); -var ot = qe.describe("Destination policy rules for event pre-processing"); -var rt = et.object({ collector: et.any().describe("Collector instance (runtime object)"), config: nt.describe("Destination configuration"), data: et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))]).optional().describe("Transformed event data"), env: et.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); -var at = rt.extend({ mapping: Ue.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); -var st = at.describe("Batch push context with event-specific mapping"); -var ct = et.object({ event: Se.describe("The event to process"), mapping: Ue.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); -var lt = et.array(ct).describe("Array of events with mappings"); -var dt = et.object({ key: et.string().describe('Batch key (usually mapping key like "product.view")'), events: et.array(Se).describe("Array of events in batch"), data: et.array(et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))])).describe("Transformed data for each event"), mapping: Ue.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); -var pt = et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); -var ut = et.object({ config: nt.describe("Destination configuration"), queue: et.array(Se).optional().describe("Queued events awaiting consent"), dlq: et.array(et.tuple([Se, et.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: et.string().optional().describe("Destination type identifier"), env: et.any().optional().describe("Environment dependencies"), init: et.any().optional().describe("Initialization function"), push: et.any().describe("Push function for single events"), pushBatch: et.any().optional().describe("Batch push function"), on: et.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); -var mt = et.object({ code: ut.describe("Destination instance with implementation"), config: it.optional().describe("Partial configuration overrides"), env: et.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); -var gt = et.record(et.string(), mt).describe("Map of destination IDs to initialization configurations"); -var bt = et.record(et.string(), ut).describe("Map of destination IDs to runtime instances"); -var ft = et.object({ id: et.string().describe("Destination ID"), destination: ut.describe("Destination instance") }).describe("Destination reference (ID + instance)"); -var ht = et.object({ queue: et.array(Se).optional().describe("Events queued (awaiting consent)"), error: et.any().optional().describe("Error if push failed") }).describe("Push operation result"); -var yt = et.object({ successful: et.array(ft).describe("Destinations that processed successfully"), queued: et.array(ft).describe("Destinations that queued events"), failed: et.array(ft).describe("Destinations that failed to process") }).describe("Overall destination processing result"); -var St = et.array(et.tuple([Se, et.any()])).describe("Dead letter queue: [(event, error), ...]"); -var vt = tt(nt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); -var jt = tt(it, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); -var wt = tt(rt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); -var xt = tt(at, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); -var Et = tt(dt, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); -var Ct = tt(ut, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); -var kt = tt(yt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); -var Pt = {}; -t(Pt, { CommandTypeSchema: () => $t, ConfigSchema: () => It, DestinationsSchema: () => Mt, InitConfigSchema: () => Jt, InstanceSchema: () => Rt, PushContextSchema: () => Lt, SessionDataSchema: () => Ot, SourcesSchema: () => Tt, commandTypeJsonSchema: () => At, configJsonSchema: () => qt, initConfigJsonSchema: () => Nt, instanceJsonSchema: () => Wt, pushContextJsonSchema: () => Bt, sessionDataJsonSchema: () => Ut }); -var $t = zt.union([zt.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), zt.string()]).describe("Collector command type: standard commands or custom string for extensions"); -var It = zt.object({ run: zt.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: x, globalsStatic: de.describe("Static global properties that persist across collector runs"), sessionStatic: zt.record(zt.any()).describe("Static session data that persists across collector runs"), verbose: zt.boolean().describe("Enable verbose logging for debugging"), onError: O.optional(), onLog: J.optional() }).describe("Core collector configuration"); -var Ot = de.and(zt.object({ isStart: zt.boolean().describe("Whether this is a new session start"), storage: zt.boolean().describe("Whether storage is available"), id: v.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: zt.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: zt.boolean().describe("Whether this is a new session").optional(), device: v.describe("Device identifier").optional(), count: w.describe("Event count in session").optional(), runs: w.describe("Number of runs").optional() })).describe("Session state and tracking data"); -var Jt = It.partial().extend({ consent: me.optional().describe("Initial consent state"), user: ge.optional().describe("Initial user data"), globals: de.optional().describe("Initial global properties"), sources: zt.any().optional().describe("Source configurations"), destinations: zt.any().optional().describe("Destination configurations"), custom: de.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); -var Lt = zt.object({ mapping: Be.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); -var Tt = zt.record(zt.string(), zt.any()).describe("Map of source IDs to source instances"); -var Mt = zt.record(zt.string(), zt.any()).describe("Map of destination IDs to destination instances"); -var Rt = zt.object({ push: zt.any().describe("Push function for processing events"), command: zt.any().describe("Command function for walker commands"), allowed: zt.boolean().describe("Whether event processing is allowed"), config: It.describe("Current collector configuration"), consent: me.describe("Current consent state"), count: zt.number().describe("Event count (increments with each event)"), custom: de.describe("Custom implementation-specific properties"), sources: Tt.describe("Registered source instances"), destinations: Mt.describe("Registered destination instances"), globals: de.describe("Current global properties"), group: zt.string().describe("Event grouping identifier"), hooks: zt.any().describe("Lifecycle hook functions"), on: zt.any().describe("Event lifecycle configuration"), queue: zt.array(Se).describe("Queued events awaiting processing"), round: zt.number().describe("Collector run count (increments with each run)"), session: zt.union([zt.undefined(), Ot]).describe("Current session state"), timing: zt.number().describe("Event processing timing information"), user: ge.describe("Current user data"), version: zt.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); -var At = Dt($t, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); -var qt = Dt(It, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); -var Ut = Dt(Ot, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); -var Nt = Dt(Jt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); -var Bt = Dt(Lt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); -var Wt = Dt(Rt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); -var Vt = {}; -t(Vt, { BaseEnvSchema: () => Kt, ConfigSchema: () => Ft, InitSchema: () => Xt, InitSourceSchema: () => Yt, InitSourcesSchema: () => Zt, InstanceSchema: () => Qt, PartialConfigSchema: () => Gt, baseEnvJsonSchema: () => en, configJsonSchema: () => tn, initSourceJsonSchema: () => rn, initSourcesJsonSchema: () => an, instanceJsonSchema: () => on, partialConfigJsonSchema: () => nn }); -var Kt = Ht.object({ push: Ht.any().describe("Collector push function"), command: Ht.any().describe("Collector command function"), sources: Ht.any().optional().describe("Map of registered source instances"), elb: Ht.any().describe("Public API function (alias for collector.push)") }).catchall(Ht.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); -var Ft = Be.extend({ settings: Ht.any().describe("Implementation-specific configuration").optional(), env: Kt.optional().describe("Environment dependencies (platform-specific)"), id: v.describe("Source identifier (defaults to source key)").optional(), onError: O.optional(), disabled: Ht.boolean().describe("Set to true to disable").optional(), primary: Ht.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); -var Gt = Ft.deepPartial().describe("Partial source configuration with all fields deeply optional"); -var Qt = Ht.object({ type: Ht.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ft.describe("Current source configuration"), push: Ht.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: Ht.any().optional().describe("Cleanup function called when source is removed"), on: Ht.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); -var Xt = Ht.any().describe("Source initialization function: (config, env) => Instance | Promise"); -var Yt = Ht.object({ code: Xt.describe("Source initialization function"), config: Gt.optional().describe("Partial configuration overrides"), env: Kt.partial().optional().describe("Partial environment overrides"), primary: Ht.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); -var Zt = Ht.record(Ht.string(), Yt).describe("Map of source IDs to initialization configurations"); -var en = _t(Kt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); -var tn = _t(Ft, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); -var nn = _t(Gt, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); -var on = _t(Qt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); -var rn = _t(Yt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); -var an = _t(Zt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); -var hn = { merge: true, shallow: true, extend: true }; -function yn(e5, t4 = {}, n4 = {}) { - n4 = { ...hn, ...n4 }; - const i2 = Object.entries(t4).reduce((t5, [i3, o3]) => { - const r2 = e5[i3]; - return n4.merge && Array.isArray(r2) && Array.isArray(o3) ? t5[i3] = o3.reduce((e6, t6) => e6.includes(t6) ? e6 : [...e6, t6], [...r2]) : (n4.extend || i3 in e5) && (t5[i3] = o3), t5; +var m = { merge: true, shallow: true, extend: true }; +function y(e5, t3 = {}, n5 = {}) { + n5 = { ...m, ...n5 }; + const o2 = Object.entries(t3).reduce((t4, [o3, r3]) => { + const i3 = e5[o3]; + return n5.merge && Array.isArray(i3) && Array.isArray(r3) ? t4[o3] = r3.reduce((e6, t5) => e6.includes(t5) ? e6 : [...e6, t5], [...i3]) : (n5.extend || o3 in e5) && (t4[o3] = r3), t4; }, {}); - return n4.shallow ? { ...e5, ...i2 } : (Object.assign(e5, i2), e5); + return n5.shallow ? { ...e5, ...o2 } : (Object.assign(e5, o2), e5); } -function vn(e5) { +function b(e5) { return Array.isArray(e5); } -function jn(e5) { +function w(e5) { return "boolean" == typeof e5; } -function xn(e5) { +function x(e5) { return void 0 !== e5; } -function Cn(e5) { +function O(e5) { return "function" == typeof e5; } -function kn(e5) { +function k(e5) { return "number" == typeof e5 && !Number.isNaN(e5); } -function Pn(e5) { - return "object" == typeof e5 && null !== e5 && !vn(e5) && "[object Object]" === Object.prototype.toString.call(e5); +function S(e5) { + return "object" == typeof e5 && null !== e5 && !b(e5) && "[object Object]" === Object.prototype.toString.call(e5); } -function Dn(e5) { +function A(e5) { return "string" == typeof e5; } -function $n(e5, t4 = /* @__PURE__ */ new WeakMap()) { +function P(e5, t3 = /* @__PURE__ */ new WeakMap()) { if ("object" != typeof e5 || null === e5) return e5; - if (t4.has(e5)) - return t4.get(e5); - const n4 = Object.prototype.toString.call(e5); - if ("[object Object]" === n4) { - const n5 = {}; - t4.set(e5, n5); - for (const i2 in e5) - Object.prototype.hasOwnProperty.call(e5, i2) && (n5[i2] = $n(e5[i2], t4)); - return n5; - } - if ("[object Array]" === n4) { - const n5 = []; - return t4.set(e5, n5), e5.forEach((e6) => { - n5.push($n(e6, t4)); - }), n5; - } - if ("[object Date]" === n4) + if (t3.has(e5)) + return t3.get(e5); + const n5 = Object.prototype.toString.call(e5); + if ("[object Object]" === n5) { + const n6 = {}; + t3.set(e5, n6); + for (const o2 in e5) + Object.prototype.hasOwnProperty.call(e5, o2) && (n6[o2] = P(e5[o2], t3)); + return n6; + } + if ("[object Array]" === n5) { + const n6 = []; + return t3.set(e5, n6), e5.forEach((e6) => { + n6.push(P(e6, t3)); + }), n6; + } + if ("[object Date]" === n5) return new Date(e5.getTime()); - if ("[object RegExp]" === n4) { - const t5 = e5; - return new RegExp(t5.source, t5.flags); + if ("[object RegExp]" === n5) { + const t4 = e5; + return new RegExp(t4.source, t4.flags); } return e5; } -function In(e5, t4 = "", n4) { - const i2 = t4.split("."); - let o3 = e5; - for (let e6 = 0; e6 < i2.length; e6++) { - const t5 = i2[e6]; - if ("*" === t5 && vn(o3)) { - const t6 = i2.slice(e6 + 1).join("."), r2 = []; - for (const e7 of o3) { - const i3 = In(e7, t6, n4); - r2.push(i3); +function $(e5, t3 = "", n5) { + const o2 = t3.split("."); + let r3 = e5; + for (let e6 = 0; e6 < o2.length; e6++) { + const t4 = o2[e6]; + if ("*" === t4 && b(r3)) { + const t5 = o2.slice(e6 + 1).join("."), i3 = []; + for (const e7 of r3) { + const o3 = $(e7, t5, n5); + i3.push(o3); } - return r2; + return i3; } - if (o3 = o3 instanceof Object ? o3[t5] : void 0, !o3) + if (r3 = r3 instanceof Object ? r3[t4] : void 0, !r3) break; } - return xn(o3) ? o3 : n4; + return x(r3) ? r3 : n5; } -function On(e5, t4, n4) { - if (!Pn(e5)) +function M(e5, t3, n5) { + if (!S(e5)) return e5; - const i2 = $n(e5), o3 = t4.split("."); - let r2 = i2; - for (let e6 = 0; e6 < o3.length; e6++) { - const t5 = o3[e6]; - e6 === o3.length - 1 ? r2[t5] = n4 : (t5 in r2 && "object" == typeof r2[t5] && null !== r2[t5] || (r2[t5] = {}), r2 = r2[t5]); + const o2 = P(e5), r3 = t3.split("."); + let i3 = o2; + for (let e6 = 0; e6 < r3.length; e6++) { + const t4 = r3[e6]; + e6 === r3.length - 1 ? i3[t4] = n5 : (t4 in i3 && "object" == typeof i3[t4] && null !== i3[t4] || (i3[t4] = {}), i3 = i3[t4]); } - return i2; + return o2; } -function Jn(e5) { +function N(e5) { if ("true" === e5) return true; if ("false" === e5) return false; - const t4 = Number(e5); - return e5 == t4 && "" !== e5 ? t4 : String(e5); -} -function Ln(e5, t4 = {}, n4 = {}) { - const i2 = { ...t4, ...n4 }, o3 = {}; - let r2 = void 0 === e5; - return Object.keys(i2).forEach((t5) => { - i2[t5] && (o3[t5] = true, e5 && e5[t5] && (r2 = true)); - }), !!r2 && o3; -} -function An(e5 = 6) { - let t4 = ""; - for (let n4 = 36; t4.length < e5; ) - t4 += (Math.random() * n4 | 0).toString(n4); - return t4; -} -function Un(e5, t4 = 1e3, n4 = false) { - let i2, o3 = null, r2 = false; - return (...a4) => new Promise((s3) => { - const c2 = n4 && !r2; - o3 && clearTimeout(o3), o3 = setTimeout(() => { - o3 = null, n4 && !r2 || (i2 = e5(...a4), s3(i2)); - }, t4), c2 && (r2 = true, i2 = e5(...a4), s3(i2)); - }); -} -function Bn(e5) { - return jn(e5) || Dn(e5) || kn(e5) || !xn(e5) || vn(e5) && e5.every(Bn) || Pn(e5) && Object.values(e5).every(Bn); -} -function Vn(e5) { - return Bn(e5) ? e5 : void 0; -} -function Hn(e5, t4, n4) { - return function(...i2) { + const t3 = Number(e5); + return e5 == t3 && "" !== e5 ? t3 : String(e5); +} +function T(e5, t3 = {}, n5 = {}) { + const o2 = { ...t3, ...n5 }, r3 = {}; + let i3 = void 0 === e5; + return Object.keys(o2).forEach((t4) => { + o2[t4] && (r3[t4] = true, e5 && e5[t4] && (i3 = true)); + }), !!i3 && r3; +} +function D(e5 = 6) { + let t3 = ""; + for (let n5 = 36; t3.length < e5; ) + t3 += (Math.random() * n5 | 0).toString(n5); + return t3; +} +function L(e5, t3 = 1e3, n5 = false) { + let o2, r3 = null, i3 = false; + return (...s3) => new Promise((c3) => { + const a4 = n5 && !i3; + r3 && clearTimeout(r3), r3 = setTimeout(() => { + r3 = null, n5 && !i3 || (o2 = e5(...s3), c3(o2)); + }, t3), a4 && (i3 = true, o2 = e5(...s3), c3(o2)); + }); +} +function V(e5) { + return w(e5) || A(e5) || k(e5) || !x(e5) || b(e5) && e5.every(V) || S(e5) && Object.values(e5).every(V); +} +function H(e5) { + return V(e5) ? e5 : void 0; +} +function U(e5, t3, n5) { + return function(...o2) { try { - return e5(...i2); + return e5(...o2); } catch (e6) { - if (!t4) + if (!t3) return; - return t4(e6); + return t3(e6); } finally { - n4?.(); + n5?.(); } }; } -function _n(e5, t4, n4) { - return async function(...i2) { +function W(e5, t3, n5) { + return async function(...o2) { try { - return await e5(...i2); + return await e5(...o2); } catch (e6) { - if (!t4) + if (!t3) return; - return await t4(e6); + return await t3(e6); } finally { - await n4?.(); + await n5?.(); } }; } -async function Kn(e5, t4) { - const [n4, i2] = (e5.name || "").split(" "); - if (!t4 || !n4 || !i2) +async function q(e5, t3) { + const [n5, o2] = (e5.name || "").split(" "); + if (!t3 || !n5 || !o2) return {}; - let o3, r2 = "", a4 = n4, s3 = i2; - const c2 = (t5) => { - if (t5) - return (t5 = vn(t5) ? t5 : [t5]).find((t6) => !t6.condition || t6.condition(e5)); + let r3, i3 = "", s3 = n5, c3 = o2; + const a4 = (t4) => { + if (t4) + return (t4 = b(t4) ? t4 : [t4]).find((t5) => !t5.condition || t5.condition(e5)); }; - t4[a4] || (a4 = "*"); - const l3 = t4[a4]; - return l3 && (l3[s3] || (s3 = "*"), o3 = c2(l3[s3])), o3 || (a4 = "*", s3 = "*", o3 = c2(t4[a4]?.[s3])), o3 && (r2 = `${a4} ${s3}`), { eventMapping: o3, mappingKey: r2 }; + t3[s3] || (s3 = "*"); + const u2 = t3[s3]; + return u2 && (u2[c3] || (c3 = "*"), r3 = a4(u2[c3])), r3 || (s3 = "*", c3 = "*", r3 = a4(t3[s3]?.[c3])), r3 && (i3 = `${s3} ${c3}`), { eventMapping: r3, mappingKey: i3 }; } -async function Fn(e5, t4 = {}, n4 = {}) { - if (!xn(e5)) +async function B(e5, t3 = {}, n5 = {}) { + if (!x(e5)) return; - const i2 = Pn(e5) && e5.consent || n4.consent || n4.collector?.consent, o3 = vn(t4) ? t4 : [t4]; - for (const t5 of o3) { - const o4 = await _n(Gn)(e5, t5, { ...n4, consent: i2 }); - if (xn(o4)) - return o4; - } -} -async function Gn(e5, t4, n4 = {}) { - const { collector: i2, consent: o3 } = n4; - return (vn(t4) ? t4 : [t4]).reduce(async (t5, r2) => { - const a4 = await t5; - if (a4) - return a4; - const s3 = Dn(r2) ? { key: r2 } : r2; - if (!Object.keys(s3).length) + const o2 = S(e5) && e5.consent || n5.consent || n5.collector?.consent, r3 = b(t3) ? t3 : [t3]; + for (const t4 of r3) { + const r4 = await W(F)(e5, t4, { ...n5, consent: o2 }); + if (x(r4)) + return r4; + } +} +async function F(e5, t3, n5 = {}) { + const { collector: o2, consent: r3 } = n5; + return (b(t3) ? t3 : [t3]).reduce(async (t4, i3) => { + const s3 = await t4; + if (s3) + return s3; + const c3 = A(i3) ? { key: i3 } : i3; + if (!Object.keys(c3).length) return; - const { condition: c2, consent: l3, fn: d2, key: p2, loop: u, map: m, set: g2, validate: b, value: f2 } = s3; - if (c2 && !await _n(c2)(e5, r2, i2)) + const { condition: a4, consent: u2, fn: l4, key: p4, loop: d4, map: f2, set: g4, validate: m3, value: y4 } = c3; + if (a4 && !await W(a4)(e5, i3, o2)) return; - if (l3 && !Ln(l3, o3)) - return f2; - let h3 = xn(f2) ? f2 : e5; - if (d2 && (h3 = await _n(d2)(e5, r2, n4)), p2 && (h3 = In(e5, p2, f2)), u) { - const [t6, i3] = u, o4 = "this" === t6 ? [e5] : await Fn(e5, t6, n4); - vn(o4) && (h3 = (await Promise.all(o4.map((e6) => Fn(e6, i3, n4)))).filter(xn)); + if (u2 && !T(u2, r3)) + return y4; + let h3 = x(y4) ? y4 : e5; + if (l4 && (h3 = await W(l4)(e5, i3, n5)), p4 && (h3 = $(e5, p4, y4)), d4) { + const [t5, o3] = d4, r4 = "this" === t5 ? [e5] : await B(e5, t5, n5); + b(r4) && (h3 = (await Promise.all(r4.map((e6) => B(e6, o3, n5)))).filter(x)); } else - m ? h3 = await Object.entries(m).reduce(async (t6, [i3, o4]) => { - const r3 = await t6, a5 = await Fn(e5, o4, n4); - return xn(a5) && (r3[i3] = a5), r3; - }, Promise.resolve({})) : g2 && (h3 = await Promise.all(g2.map((t6) => Gn(e5, t6, n4)))); - b && !await _n(b)(h3) && (h3 = void 0); - const y3 = Vn(h3); - return xn(y3) ? y3 : Vn(f2); + f2 ? h3 = await Object.entries(f2).reduce(async (t5, [o3, r4]) => { + const i4 = await t5, s4 = await B(e5, r4, n5); + return x(s4) && (i4[o3] = s4), i4; + }, Promise.resolve({})) : g4 && (h3 = await Promise.all(g4.map((t5) => F(e5, t5, n5)))); + m3 && !await W(m3)(h3) && (h3 = void 0); + const w3 = H(h3); + return x(w3) ? w3 : H(y4); }, Promise.resolve(void 0)); } -async function Qn(e5, t4, n4) { - t4.policy && await Promise.all(Object.entries(t4.policy).map(async ([t5, i3]) => { - const o4 = await Fn(e5, i3, { collector: n4 }); - e5 = On(e5, t5, o4); +async function X(e5, t3, n5) { + t3.policy && await Promise.all(Object.entries(t3.policy).map(async ([t4, o3]) => { + const r4 = await B(e5, o3, { collector: n5 }); + e5 = M(e5, t4, r4); })); - const { eventMapping: i2, mappingKey: o3 } = await Kn(e5, t4.mapping); - i2?.policy && await Promise.all(Object.entries(i2.policy).map(async ([t5, i3]) => { - const o4 = await Fn(e5, i3, { collector: n4 }); - e5 = On(e5, t5, o4); + const { eventMapping: o2, mappingKey: r3 } = await q(e5, t3.mapping); + o2?.policy && await Promise.all(Object.entries(o2.policy).map(async ([t4, o3]) => { + const r4 = await B(e5, o3, { collector: n5 }); + e5 = M(e5, t4, r4); })); - let r2 = t4.data && await Fn(e5, t4.data, { collector: n4 }); - if (i2) { - if (i2.ignore) - return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: true }; - if (i2.name && (e5.name = i2.name), i2.data) { - const t5 = i2.data && await Fn(e5, i2.data, { collector: n4 }); - r2 = Pn(r2) && Pn(t5) ? yn(r2, t5) : t5; - } - } - return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: false }; -} -function Zn(e5, t4 = false) { - t4 && console.dir(e5, { depth: 4 }); -} -function ei(e5) { - const t4 = String(e5), n4 = t4.split("?")[1] || t4; - return Hn(() => { - const e6 = new URLSearchParams(n4), t5 = {}; - return e6.forEach((e7, n5) => { - const i2 = n5.split(/[[\]]+/).filter(Boolean); - let o3 = t5; - i2.forEach((t6, n6) => { - const r2 = n6 === i2.length - 1; - if (vn(o3)) { - const a4 = parseInt(t6, 10); - r2 ? o3[a4] = Jn(e7) : (o3[a4] = o3[a4] || (isNaN(parseInt(i2[n6 + 1], 10)) ? {} : []), o3 = o3[a4]); + let i3 = t3.data && await B(e5, t3.data, { collector: n5 }); + if (o2) { + if (o2.ignore) + return { event: e5, data: i3, mapping: o2, mappingKey: r3, ignore: true }; + if (o2.name && (e5.name = o2.name), o2.data) { + const t4 = o2.data && await B(e5, o2.data, { collector: n5 }); + i3 = S(i3) && S(t4) ? y(i3, t4) : t4; + } + } + return { event: e5, data: i3, mapping: o2, mappingKey: r3, ignore: false }; +} +function Q(e5, t3 = false) { + t3 && console.dir(e5, { depth: 4 }); +} +function Y(e5) { + const t3 = String(e5), n5 = t3.split("?")[1] || t3; + return U(() => { + const e6 = new URLSearchParams(n5), t4 = {}; + return e6.forEach((e7, n6) => { + const o2 = n6.split(/[[\]]+/).filter(Boolean); + let r3 = t4; + o2.forEach((t5, n7) => { + const i3 = n7 === o2.length - 1; + if (b(r3)) { + const s3 = parseInt(t5, 10); + i3 ? r3[s3] = N(e7) : (r3[s3] = r3[s3] || (isNaN(parseInt(o2[n7 + 1], 10)) ? {} : []), r3 = r3[s3]); } else - Pn(o3) && (r2 ? o3[t6] = Jn(e7) : (o3[t6] = o3[t6] || (isNaN(parseInt(i2[n6 + 1], 10)) ? {} : []), o3 = o3[t6])); + S(r3) && (i3 ? r3[t5] = N(e7) : (r3[t5] = r3[t5] || (isNaN(parseInt(o2[n7 + 1], 10)) ? {} : []), r3 = r3[t5])); }); - }), t5; + }), t4; })(); } -function ai(e5, t4, n4) { - return function(...i2) { - let o3; - const r2 = "post" + t4, a4 = n4["pre" + t4], s3 = n4[r2]; - return o3 = a4 ? a4({ fn: e5 }, ...i2) : e5(...i2), s3 && (o3 = s3({ fn: e5, result: o3 }, ...i2)), o3; +function re(e5, t3, n5) { + return function(...o2) { + let r3; + const i3 = "post" + t3, s3 = n5["pre" + t3], c3 = n5[i3]; + return r3 = s3 ? s3({ fn: e5 }, ...o2) : e5(...o2), c3 && (r3 = c3({ fn: e5, result: r3 }, ...o2)), r3; }; } // node_modules/@walkeros/collector/dist/index.mjs -var e2 = Object.defineProperty; var n = { Action: "action", Actions: "actions", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" }; -var o = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; -var t2 = {}; -((n4, o3) => { - for (var t4 in o3) - e2(n4, t4, { get: o3[t4], enumerable: true }); -})(t2, { schemas: () => a, settingsSchema: () => s }); -var s = { type: "object", properties: { run: { type: "boolean", description: "Automatically start the collector pipeline on initialization" }, sources: { type: "object", description: "Configurations for sources providing events to the collector" }, destinations: { type: "object", description: "Configurations for destinations receiving processed events" }, consent: { type: "object", description: "Initial consent state to control routing of events" }, verbose: { type: "boolean", description: "Enable verbose logging for debugging" }, onError: { type: "string", description: "Error handler triggered when the collector encounters failures" }, onLog: { type: "string", description: "Custom log handler for collector messages" } } }; -var a = { settings: s }; -async function h2(e5, n4, o3) { - const { code: t4, config: s3 = {}, env: a4 = {} } = n4, i2 = o3 || s3 || { init: false }, c2 = { ...t4, config: i2, env: q2(t4.env, a4) }; - let r2 = c2.config.id; - if (!r2) +var e = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; +async function d(n5, e5, o2) { + const { code: s3, config: t3 = {}, env: a4 = {} } = e5, c3 = o2 || t3 || { init: false }, r3 = { ...s3, config: c3, env: y2(s3.env, a4) }; + let u2 = r3.config.id; + if (!u2) do { - r2 = An(4); - } while (e5.destinations[r2]); - return e5.destinations[r2] = c2, false !== c2.config.queue && (c2.queue = [...e5.queue]), y2(e5, void 0, { [r2]: c2 }); -} -async function y2(e5, n4, o3) { - const { allowed: t4, consent: s3, globals: a4, user: i2 } = e5; - if (!t4) - return w2({ ok: false }); - n4 && e5.queue.push(n4), o3 || (o3 = e5.destinations); - const u = await Promise.all(Object.entries(o3 || {}).map(async ([o4, t5]) => { - let u2 = (t5.queue || []).map((e6) => ({ ...e6, consent: s3 })); - if (t5.queue = [], n4) { - const e6 = $n(n4); - u2.push(e6); - } - if (!u2.length) - return { id: o4, destination: t5, skipped: true }; - const l4 = [], m2 = u2.filter((e6) => { - const n5 = Ln(t5.config.consent, s3, e6.consent); - return !n5 || (e6.consent = n5, l4.push(e6), false); - }); - if (t5.queue.concat(m2), !l4.length) - return { id: o4, destination: t5, queue: u2 }; - if (!await _n(v2)(e5, t5)) - return { id: o4, destination: t5, queue: u2 }; - let f3 = false; - return t5.dlq || (t5.dlq = []), await Promise.all(l4.map(async (n5) => (n5.globals = yn(a4, n5.globals), n5.user = yn(i2, n5.user), await _n(k2, (o5) => (e5.config.onError && e5.config.onError(o5, e5), f3 = true, t5.dlq.push([n5, o5]), false))(e5, t5, n5), n5))), { id: o4, destination: t5, error: f3 }; - })), l3 = [], m = [], f2 = []; - for (const e6 of u) { - if (e6.skipped) + u2 = D(4); + } while (n5.destinations[u2]); + return n5.destinations[u2] = r3, false !== r3.config.queue && (r3.queue = [...n5.queue]), g(n5, void 0, { [u2]: r3 }); +} +async function g(n5, e5, o2) { + const { allowed: a4, consent: i3, globals: r3, user: u2 } = n5; + if (!a4) + return b2({ ok: false }); + e5 && n5.queue.push(e5), o2 || (o2 = n5.destinations); + const l4 = await Promise.all(Object.entries(o2 || {}).map(async ([o3, a5]) => { + let l5 = (a5.queue || []).map((n6) => ({ ...n6, consent: i3 })); + if (a5.queue = [], e5) { + const n6 = P(e5); + l5.push(n6); + } + if (!l5.length) + return { id: o3, destination: a5, skipped: true }; + const f3 = [], d5 = l5.filter((n6) => { + const e6 = T(a5.config.consent, i3, n6.consent); + return !e6 || (n6.consent = e6, f3.push(n6), false); + }); + if (a5.queue.concat(d5), !f3.length) + return { id: o3, destination: a5, queue: l5 }; + if (!await W(p)(n5, a5)) + return { id: o3, destination: a5, queue: l5 }; + let g5 = false; + return a5.dlq || (a5.dlq = []), await Promise.all(f3.map(async (e6) => (e6.globals = y(r3, e6.globals), e6.user = y(u2, e6.user), await W(h, (o4) => (n5.config.onError && n5.config.onError(o4, n5), g5 = true, a5.dlq.push([e6, o4]), false))(n5, a5, e6), e6))), { id: o3, destination: a5, error: g5 }; + })), f2 = [], d4 = [], g4 = []; + for (const n6 of l4) { + if (n6.skipped) continue; - const n5 = e6.destination, o4 = { id: e6.id, destination: n5 }; - e6.error ? f2.push(o4) : e6.queue && e6.queue.length ? (n5.queue = (n5.queue || []).concat(e6.queue), m.push(o4)) : l3.push(o4); + const e6 = n6.destination, o3 = { id: n6.id, destination: e6 }; + n6.error ? g4.push(o3) : n6.queue && n6.queue.length ? (e6.queue = (e6.queue || []).concat(n6.queue), d4.push(o3)) : f2.push(o3); } - return w2({ ok: !f2.length, event: n4, successful: l3, queued: m, failed: f2 }); + return b2({ ok: !g4.length, event: e5, successful: f2, queued: d4, failed: g4 }); } -async function v2(e5, n4) { - if (n4.init && !n4.config.init) { - const o3 = { collector: e5, config: n4.config, env: q2(n4.env, n4.config.env) }, t4 = await ai(n4.init, "DestinationInit", e5.hooks)(o3); - if (false === t4) - return t4; - n4.config = { ...t4 || n4.config, init: true }; +async function p(n5, e5) { + if (e5.init && !e5.config.init) { + const o2 = { collector: n5, config: e5.config, env: y2(e5.env, e5.config.env) }, s3 = await re(e5.init, "DestinationInit", n5.hooks)(o2); + if (false === s3) + return s3; + e5.config = { ...s3 || e5.config, init: true }; } return true; } -async function k2(e5, n4, o3) { - const { config: t4 } = n4, s3 = await Qn(o3, t4, e5); - if (s3.ignore) +async function h(n5, e5, o2) { + const { config: s3 } = e5, t3 = await X(o2, s3, n5); + if (t3.ignore) return false; - const a4 = { collector: e5, config: t4, data: s3.data, mapping: s3.mapping, env: q2(n4.env, t4.env) }, i2 = s3.mapping; - if (i2?.batch && n4.pushBatch) { - const o4 = i2.batched || { key: s3.mappingKey || "", events: [], data: [] }; - o4.events.push(s3.event), xn(s3.data) && o4.data.push(s3.data), i2.batchFn = i2.batchFn || Un((e6, n5) => { - const a5 = { collector: n5, config: t4, data: s3.data, mapping: i2, env: q2(e6.env, t4.env) }; - ai(e6.pushBatch, "DestinationPushBatch", n5.hooks)(o4, a5), o4.events = [], o4.data = []; - }, i2.batch), i2.batched = o4, i2.batchFn?.(n4, e5); + const i3 = { collector: n5, config: s3, data: t3.data, mapping: t3.mapping, env: y2(e5.env, s3.env) }, c3 = t3.mapping; + if (c3?.batch && e5.pushBatch) { + const o3 = c3.batched || { key: t3.mappingKey || "", events: [], data: [] }; + o3.events.push(t3.event), x(t3.data) && o3.data.push(t3.data), c3.batchFn = c3.batchFn || L((n6, e6) => { + const a4 = { collector: e6, config: s3, data: t3.data, mapping: c3, env: y2(n6.env, s3.env) }; + re(n6.pushBatch, "DestinationPushBatch", e6.hooks)(o3, a4), o3.events = [], o3.data = []; + }, c3.batch), c3.batched = o3, c3.batchFn?.(e5, n5); } else - await ai(n4.push, "DestinationPush", e5.hooks)(s3.event, a4); + await re(e5.push, "DestinationPush", n5.hooks)(t3.event, i3); return true; } -function w2(e5) { - return yn({ ok: !e5?.failed?.length, successful: [], queued: [], failed: [] }, e5); +function b2(n5) { + return y({ ok: !n5?.failed?.length, successful: [], queued: [], failed: [] }, n5); } -async function C2(e5, n4 = {}) { - const o3 = {}; - for (const [e6, t4] of Object.entries(n4)) { - const { code: n5, config: s3 = {}, env: a4 = {} } = t4, i2 = { ...n5.config, ...s3 }, c2 = q2(n5.env, a4); - o3[e6] = { ...n5, config: i2, env: c2 }; +async function k2(n5, e5 = {}) { + const o2 = {}; + for (const [n6, s3] of Object.entries(e5)) { + const { code: e6, config: t3 = {}, env: a4 = {} } = s3, i3 = { ...e6.config, ...t3 }, c3 = y2(e6.env, a4); + o2[n6] = { ...e6, config: i3, env: c3 }; } - return o3; + return o2; } -function q2(e5, n4) { - return e5 || n4 ? n4 ? e5 && Pn(e5) && Pn(n4) ? { ...e5, ...n4 } : n4 : e5 : {}; +function y2(n5, e5) { + return n5 || e5 ? e5 ? n5 && S(n5) && S(e5) ? { ...n5, ...e5 } : e5 : n5 : {}; } -function O2(e5, n4, o3) { - const t4 = e5.on, s3 = t4[n4] || [], a4 = vn(o3) ? o3 : [o3]; - a4.forEach((e6) => { - s3.push(e6); - }), t4[n4] = s3, A2(e5, n4, a4); +function C(n5, e5, o2) { + const s3 = n5.on, t3 = s3[e5] || [], a4 = b(o2) ? o2 : [o2]; + a4.forEach((n6) => { + t3.push(n6); + }), s3[e5] = t3, q2(n5, e5, a4); } -function A2(e5, n4, t4, s3) { - let a4, i2 = t4 || []; - switch (t4 || (i2 = e5.on[n4] || []), n4) { - case o.Commands.Consent: - a4 = s3 || e5.consent; +function q2(n5, o2, s3, t3) { + let a4, i3 = s3 || []; + switch (s3 || (i3 = n5.on[o2] || []), o2) { + case e.Commands.Consent: + a4 = t3 || n5.consent; break; - case o.Commands.Session: - a4 = e5.session; + case e.Commands.Session: + a4 = n5.session; break; - case o.Commands.Ready: - case o.Commands.Run: + case e.Commands.Ready: + case e.Commands.Run: default: a4 = void 0; } - if (Object.values(e5.sources).forEach((e6) => { - e6.on && Hn(e6.on)(n4, a4); - }), Object.values(e5.destinations).forEach((e6) => { - if (e6.on) { - const o3 = e6.on; - Hn(o3)(n4, a4); - } - }), i2.length) - switch (n4) { - case o.Commands.Consent: - !function(e6, n5, o3) { - const t5 = o3 || e6.consent; - n5.forEach((n6) => { - Object.keys(t5).filter((e7) => e7 in n6).forEach((o4) => { - Hn(n6[o4])(e6, t5); + if (Object.values(n5.sources).forEach((n6) => { + n6.on && U(n6.on)(o2, a4); + }), Object.values(n5.destinations).forEach((n6) => { + if (n6.on) { + const e5 = n6.on; + U(e5)(o2, a4); + } + }), i3.length) + switch (o2) { + case e.Commands.Consent: + !function(n6, e5, o3) { + const s4 = o3 || n6.consent; + e5.forEach((e6) => { + Object.keys(s4).filter((n7) => n7 in e6).forEach((o4) => { + U(e6[o4])(n6, s4); }); }); - }(e5, i2, s3); + }(n5, i3, t3); break; - case o.Commands.Ready: - case o.Commands.Run: - !function(e6, n5) { - e6.allowed && n5.forEach((n6) => { - Hn(n6)(e6); + case e.Commands.Ready: + case e.Commands.Run: + !function(n6, e5) { + n6.allowed && e5.forEach((e6) => { + U(e6)(n6); }); - }(e5, i2); + }(n5, i3); break; - case o.Commands.Session: - !function(e6, n5) { - if (!e6.session) + case e.Commands.Session: + !function(n6, e5) { + if (!n6.session) return; - n5.forEach((n6) => { - Hn(n6)(e6, e6.session); + e5.forEach((e6) => { + U(e6)(n6, n6.session); }); - }(e5, i2); + }(n5, i3); } } -async function S2(e5, n4) { - const { consent: o3 } = e5; - let t4 = false; - const s3 = {}; - return Object.entries(n4).forEach(([e6, n5]) => { - const o4 = !!n5; - s3[e6] = o4, t4 = t4 || o4; - }), e5.consent = yn(o3, s3), A2(e5, "consent", void 0, s3), t4 ? y2(e5) : w2({ ok: true }); +async function j(n5, e5) { + const { consent: s3 } = n5; + let t3 = false; + const a4 = {}; + return Object.entries(e5).forEach(([n6, e6]) => { + const o2 = !!e6; + a4[n6] = o2, t3 = t3 || o2; + }), n5.consent = y(s3, a4), q2(n5, "consent", void 0, a4), t3 ? g(n5) : b2({ ok: true }); } -async function B2(e5, n4, t4, s3) { +async function P2(n5, o2, s3, t3) { let a4; - switch (n4) { - case o.Commands.Config: - Pn(t4) && yn(e5.config, t4, { shallow: false }); + switch (o2) { + case e.Commands.Config: + S(s3) && y(n5.config, s3, { shallow: false }); break; - case o.Commands.Consent: - Pn(t4) && (a4 = await S2(e5, t4)); + case e.Commands.Consent: + S(s3) && (a4 = await j(n5, s3)); break; - case o.Commands.Custom: - Pn(t4) && (e5.custom = yn(e5.custom, t4)); + case e.Commands.Custom: + S(s3) && (n5.custom = y(n5.custom, s3)); break; - case o.Commands.Destination: - Pn(t4) && Cn(t4.push) && (a4 = await h2(e5, { code: t4 }, s3)); + case e.Commands.Destination: + S(s3) && O(s3.push) && (a4 = await d(n5, { code: s3 }, t3)); break; - case o.Commands.Globals: - Pn(t4) && (e5.globals = yn(e5.globals, t4)); + case e.Commands.Globals: + S(s3) && (n5.globals = y(n5.globals, s3)); break; - case o.Commands.On: - Dn(t4) && O2(e5, t4, s3); + case e.Commands.On: + A(s3) && C(n5, s3, t3); break; - case o.Commands.Ready: - A2(e5, "ready"); + case e.Commands.Ready: + q2(n5, "ready"); break; - case o.Commands.Run: - a4 = await G(e5, t4); + case e.Commands.Run: + a4 = await L2(n5, s3); break; - case o.Commands.Session: - A2(e5, "session"); + case e.Commands.Session: + q2(n5, "session"); break; - case o.Commands.User: - Pn(t4) && yn(e5.user, t4, { shallow: false }); + case e.Commands.User: + S(s3) && y(n5.user, s3, { shallow: false }); } return a4 || { ok: true, successful: [], queued: [], failed: [] }; } -function F2(e5, n4) { - if (!n4.name) +function $2(n5, e5) { + if (!e5.name) throw new Error("Event name is required"); - const [o3, t4] = n4.name.split(" "); - if (!o3 || !t4) + const [o2, s3] = e5.name.split(" "); + if (!o2 || !s3) throw new Error("Event name is invalid"); - ++e5.count; - const { timestamp: s3 = Date.now(), group: a4 = e5.group, count: i2 = e5.count } = n4, { name: c2 = `${o3} ${t4}`, data: r2 = {}, context: u = {}, globals: l3 = e5.globals, custom: d2 = {}, user: m = e5.user, nested: f2 = [], consent: g2 = e5.consent, id: p2 = `${s3}-${a4}-${i2}`, trigger: b = "", entity: h3 = o3, action: y3 = t4, timing: v3 = 0, version: k3 = { source: e5.version, tagging: e5.config.tagging || 0 }, source: w3 = { type: "collector", id: "", previous_id: "" } } = n4; - return { name: c2, data: r2, context: u, globals: l3, custom: d2, user: m, nested: f2, consent: g2, id: p2, trigger: b, entity: h3, action: y3, timestamp: s3, timing: v3, group: a4, count: i2, version: k3, source: w3 }; -} -async function G(e5, n4) { - e5.allowed = true, e5.count = 0, e5.group = An(), e5.timing = Date.now(), n4 && (n4.consent && (e5.consent = yn(e5.consent, n4.consent)), n4.user && (e5.user = yn(e5.user, n4.user)), n4.globals && (e5.globals = yn(e5.config.globalsStatic || {}, n4.globals)), n4.custom && (e5.custom = yn(e5.custom, n4.custom))), Object.values(e5.destinations).forEach((e6) => { - e6.queue = []; - }), e5.queue = [], e5.round++; - const o3 = await y2(e5); - return A2(e5, "run"), o3; -} -function _2(e5, n4) { - return ai(async (o3, t4 = {}) => await _n(async () => { - let s3 = o3; - if (t4.mapping) { - const n5 = await Qn(s3, t4.mapping, e5); - if (n5.ignore) - return w2({ ok: true }); - if (t4.mapping.consent) { - if (!Ln(t4.mapping.consent, e5.consent, n5.event.consent)) - return w2({ ok: true }); - } - s3 = n5.event; - } - const a4 = n4(s3), i2 = F2(e5, a4); - return await y2(e5, i2); - }, () => w2({ ok: false }))(), "Push", e5.hooks); -} -async function J2(e5) { - const n4 = yn({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o3, run: true }, e5, { merge: false, extend: false }); - function o3(e6, o4) { - Zn({ message: e6 }, o4 || n4.verbose); - } - n4.onLog = o3; - const t4 = { ...n4.globalsStatic, ...e5.globals }, s3 = { allowed: false, config: n4, consent: e5.consent || {}, count: 0, custom: e5.custom || {}, destinations: {}, globals: t4, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e5.user || {}, version: "0.3.0", sources: {}, push: void 0, command: void 0 }; - return s3.push = _2(s3, (e6) => ({ timing: Math.round((Date.now() - s3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e6 })), s3.command = function(e6, n5) { - return ai(async (o4, t5, s4) => await _n(async () => await n5(e6, o4, t5, s4), () => w2({ ok: false }))(), "Command", e6.hooks); - }(s3, B2), s3.destinations = await C2(0, e5.destinations || {}), s3; -} -async function Q(e5, n4 = {}) { - const o3 = {}; - for (const [t4, s3] of Object.entries(n4)) { - const { code: n5, config: a4 = {}, env: i2 = {}, primary: c2 } = s3, r2 = { push: (n6, o4 = {}) => e5.push(n6, { ...o4, mapping: a4 }), command: e5.command, sources: e5.sources, elb: e5.sources.elb.push, ...i2 }, u = await _n(n5)(a4, r2); - u && (c2 && (u.config = { ...u.config, primary: c2 }), o3[t4] = u); - } - return o3; -} -async function T2(e5) { - e5 = e5 || {}; - const n4 = await J2(e5), o3 = (t4 = n4, { type: "elb", config: {}, push: async (e6, n5, o4, s4, a5, i3) => { - if ("string" == typeof e6 && e6.startsWith("walker ")) { - const s5 = e6.replace("walker ", ""); - return t4.command(s5, n5, o4); - } - let c3; - if ("string" == typeof e6) - c3 = { name: e6 }, n5 && "object" == typeof n5 && !Array.isArray(n5) && (c3.data = n5); + ++n5.count; + const { timestamp: t3 = Date.now(), group: a4 = n5.group, count: i3 = n5.count } = e5, { name: c3 = `${o2} ${s3}`, data: r3 = {}, context: u2 = {}, globals: l4 = n5.globals, custom: m3 = {}, user: f2 = n5.user, nested: d4 = [], consent: g4 = n5.consent, id: p4 = `${t3}-${a4}-${i3}`, trigger: h3 = "", entity: b4 = o2, action: k4 = s3, timing: y4 = 0, version: w3 = { source: n5.version, tagging: n5.config.tagging || 0 }, source: v2 = { type: "collector", id: "", previous_id: "" } } = e5; + return { name: c3, data: r3, context: u2, globals: l4, custom: m3, user: f2, nested: d4, consent: g4, id: p4, trigger: h3, entity: b4, action: k4, timestamp: t3, timing: y4, group: a4, count: i3, version: w3, source: v2 }; +} +async function L2(n5, e5) { + n5.allowed = true, n5.count = 0, n5.group = D(), n5.timing = Date.now(), e5 && (e5.consent && (n5.consent = y(n5.consent, e5.consent)), e5.user && (n5.user = y(n5.user, e5.user)), e5.globals && (n5.globals = y(n5.config.globalsStatic || {}, e5.globals)), e5.custom && (n5.custom = y(n5.custom, e5.custom))), Object.values(n5.destinations).forEach((n6) => { + n6.queue = []; + }), n5.queue = [], n5.round++; + const o2 = await g(n5); + return q2(n5, "run"), o2; +} +function I(n5, e5) { + return re(async (o2, s3 = {}) => await W(async () => { + let t3 = o2; + if (s3.mapping) { + const e6 = await X(t3, s3.mapping, n5); + if (e6.ignore) + return b2({ ok: true }); + if (s3.mapping.consent) { + if (!T(s3.mapping.consent, n5.consent, e6.event.consent)) + return b2({ ok: true }); + } + t3 = e6.event; + } + const a4 = e5(t3), i3 = $2(n5, a4); + return await g(n5, i3); + }, () => b2({ ok: false }))(), "Push", n5.hooks); +} +async function W2(n5) { + const e5 = y({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o2, run: true }, n5, { merge: false, extend: false }); + function o2(n6, o3) { + Q({ message: n6 }, o3 || e5.verbose); + } + e5.onLog = o2; + const s3 = { ...e5.globalsStatic, ...n5.globals }, t3 = { allowed: false, config: e5, consent: n5.consent || {}, count: 0, custom: n5.custom || {}, destinations: {}, globals: s3, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: n5.user || {}, version: "0.3.1", sources: {}, push: void 0, command: void 0 }; + return t3.push = I(t3, (n6) => ({ timing: Math.round((Date.now() - t3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...n6 })), t3.command = function(n6, e6) { + return re(async (o3, s4, t4) => await W(async () => await e6(n6, o3, s4, t4), () => b2({ ok: false }))(), "Command", n6.hooks); + }(t3, P2), t3.destinations = await k2(0, n5.destinations || {}), t3; +} +async function K(n5, e5 = {}) { + const o2 = {}; + for (const [s3, t3] of Object.entries(e5)) { + const { code: e6, config: a4 = {}, env: i3 = {}, primary: c3 } = t3, r3 = { push: (e7, o3 = {}) => n5.push(e7, { ...o3, mapping: a4 }), command: n5.command, sources: n5.sources, elb: n5.sources.elb.push, ...i3 }, u2 = await W(e6)(a4, r3); + u2 && (c3 && (u2.config = { ...u2.config, primary: c3 }), o2[s3] = u2); + } + return o2; +} +async function z(n5) { + n5 = n5 || {}; + const e5 = await W2(n5), o2 = (s3 = e5, { type: "elb", config: {}, push: async (n6, e6, o3, t4, a5, i4) => { + if ("string" == typeof n6 && n6.startsWith("walker ")) { + const t5 = n6.replace("walker ", ""); + return s3.command(t5, e6, o3); + } + let c4; + if ("string" == typeof n6) + c4 = { name: n6 }, e6 && "object" == typeof e6 && !Array.isArray(e6) && (c4.data = e6); else { - if (!e6 || "object" != typeof e6) + if (!n6 || "object" != typeof n6) return { ok: false, successful: [], queued: [], failed: [] }; - c3 = e6, n5 && "object" == typeof n5 && !Array.isArray(n5) && (c3.data = { ...c3.data || {}, ...n5 }); + c4 = n6, e6 && "object" == typeof e6 && !Array.isArray(e6) && (c4.data = { ...c4.data || {}, ...e6 }); } - return s4 && "object" == typeof s4 && (c3.context = s4), a5 && Array.isArray(a5) && (c3.nested = a5), i3 && "object" == typeof i3 && (c3.custom = i3), t4.push(c3); + return t4 && "object" == typeof t4 && (c4.context = t4), a5 && Array.isArray(a5) && (c4.nested = a5), i4 && "object" == typeof i4 && (c4.custom = i4), s3.push(c4); } }); - var t4; - n4.sources.elb = o3; - const s3 = await Q(n4, e5.sources || {}); - Object.assign(n4.sources, s3); - const { consent: a4, user: i2, globals: c2, custom: r2 } = e5; - a4 && await n4.command("consent", a4), i2 && await n4.command("user", i2), c2 && Object.assign(n4.globals, c2), r2 && Object.assign(n4.custom, r2), n4.config.run && await n4.command("run"); - let u = o3.push; - const l3 = Object.values(n4.sources).filter((e6) => "elb" !== e6.type), d2 = l3.find((e6) => e6.config.primary); - return d2 ? u = d2.push : l3.length > 0 && (u = l3[0].push), { collector: n4, elb: u }; + var s3; + e5.sources.elb = o2; + const t3 = await K(e5, n5.sources || {}); + Object.assign(e5.sources, t3); + const { consent: a4, user: i3, globals: c3, custom: r3 } = n5; + a4 && await e5.command("consent", a4), i3 && await e5.command("user", i3), c3 && Object.assign(e5.globals, c3), r3 && Object.assign(e5.custom, r3), e5.config.run && await e5.command("run"); + let u2 = o2.push; + const l4 = Object.values(e5.sources).filter((n6) => "elb" !== n6.type), m3 = l4.find((n6) => n6.config.primary); + return m3 ? u2 = m3.push : l4.length > 0 && (u2 = l4[0].push), { collector: e5, elb: u2 }; } // node_modules/@walkeros/server-source-express/dist/index.mjs import e3 from "express"; -import o2 from "cors"; -var r = un.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]); -var n2 = un.union([un.string(), un.array(un.string()), un.literal("*")]); -var a2 = un.object({ origin: n2.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: un.array(r).describe("Allowed HTTP methods").optional(), headers: un.array(un.string()).describe("Allowed request headers").optional(), credentials: un.boolean().describe("Allow credentials (cookies, authorization headers)").optional(), maxAge: un.number().int().positive().describe("Preflight cache duration in seconds").optional() }); -var l = un.object({ port: un.number().int().min(0).max(65535).describe("HTTP server port to listen on. Use 0 for random available port. If not provided, server will not start (app only mode)").optional(), path: un.string().describe("Event collection endpoint path").default("/collect"), cors: un.union([un.boolean(), a2]).describe("CORS configuration: false = disabled, true = allow all origins (default), object = custom configuration").default(true), status: un.boolean().describe("Enable health check endpoints (/health, /ready)").default(true) }); -function c(e5, o3 = true) { - if (false !== o3) - if (true === o3) - e5.set("Access-Control-Allow-Origin", "*"), e5.set("Access-Control-Allow-Methods", "GET, POST, OPTIONS"), e5.set("Access-Control-Allow-Headers", "Content-Type"); - else { - if (o3.origin) { - const s3 = Array.isArray(o3.origin) ? o3.origin.join(", ") : o3.origin; - e5.set("Access-Control-Allow-Origin", s3); +import o from "cors"; + +// node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint2, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + decode: () => decode2, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode2, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2 +}); + +// node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + clone: () => clone, + config: () => config, + decode: () => decode, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode, + encodeAsync: () => encodeAsync, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version +}); + +// node_modules/zod/v4/core/core.js +var NEVER = Object.freeze({ + status: "aborted" +}); +// @__NO_SIDE_EFFECTS__ +function $constructor(name, initializer3, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _2, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer3(inst, def); + const proto = _2.prototype; + const keys = Object.keys(proto); + for (let i3 = 0; i3 < keys.length; i3++) { + const k4 = keys[i3]; + if (!(k4 in inst)) { + inst[k4] = proto[k4].bind(inst); } - o3.methods && e5.set("Access-Control-Allow-Methods", o3.methods.join(", ")), o3.headers && e5.set("Access-Control-Allow-Headers", o3.headers.join(", ")), o3.credentials && e5.set("Access-Control-Allow-Credentials", "true"), o3.maxAge && e5.set("Access-Control-Max-Age", String(o3.maxAge)); } + } + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _2(def) { + var _a2; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + for (const fn2 of inst._zod.deferred) { + fn2(); + } + return inst; + } + Object.defineProperty(_2, "init", { value: init }); + Object.defineProperty(_2, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_2, "name", { value: name }); + return _2; } -var d = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64"); -var p = async (t4, r2) => { - const n4 = l.parse(t4.settings || {}), a4 = e3(); - if (a4.use(e3.json({ limit: "1mb" })), false !== n4.cors) { - const e5 = true === n4.cors ? {} : n4.cors; - a4.use(o2(e5)); +var $brand = Symbol("zod_brand"); +var $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } - const i2 = async (e5, o3) => { - try { - if ("OPTIONS" === e5.method) - return c(o3, n4.cors), void o3.status(204).send(); - if ("GET" === e5.method) { - const t5 = ei(e5.url); - return t5 && "object" == typeof t5 && await r2.push(t5), o3.set("Content-Type", "image/gif"), o3.set("Cache-Control", "no-cache, no-store, must-revalidate"), void o3.send(d); +}; +var $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; +var globalConfig = {}; +function config(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} + +// node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject, + isPlainObject: () => isPlainObject, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x) { + throw new Error(); +} +function assert(_2) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number"); + const values = Object.entries(entries).filter(([k4, _2]) => numericValues.indexOf(+k4) === -1).map(([_2, v2]) => v2); + return values; +} +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_2, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; } - if ("POST" === e5.method) { - const s3 = e5.body; - return s3 && "object" == typeof s3 ? (await r2.push(s3), void o3.json({ success: true, timestamp: Date.now() })) : void o3.status(400).json({ success: false, error: "Invalid event: body must be an object" }); + throw new Error("cached value already set"); + } + }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match = stepString.match(/\d?e-(\d?)/); + if (match?.[1]) { + stepDecCount = Number.parseInt(match[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +var EVALUATING = Symbol("evaluating"); +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; } - o3.status(405).json({ success: false, error: "Method not allowed. Use POST, GET, or OPTIONS." }); - } catch (e6) { - o3.status(500).json({ success: false, error: e6 instanceof Error ? e6.message : "Internal server error" }); + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v2) { + Object.defineProperty(object2, key, { + value: v2 + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i3 = 0; i3 < keys.length; i3++) { + resolvedObj[keys[i3]] = results[i3]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i3 = 0; i3 < length; i3++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { +}; +function isObject(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +var allowsEval = cached(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F3 = Function; + new F3(""); + return true; + } catch (_2) { + return false; + } +}); +function isPlainObject(o2) { + if (isObject(o2) === false) + return false; + const ctor = o2.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o2) { + if (isPlainObject(o2)) + return { ...o2 }; + if (Array.isArray(o2)) + return [...o2]; + return o2; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +var getParsedType = (data) => { + const t3 = typeof data; + switch (t3) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t3}`); + } +}; +var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; +} +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_2, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_2, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_2, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_2, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_2) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_2, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_2, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k4) => { + return shape[k4]._zod.optin === "optional" && shape[k4]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] +}; +var BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick(schema, mask) { + const currDef = schema._zod.def; + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead."); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: [] + }); + return clone(schema, def); +} +function safeExtend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = { + ...schema._zod.def, + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: schema._zod.def.checks }; - let p2; - if (a4.post(n4.path, i2), a4.get(n4.path, i2), a4.options(n4.path, i2), n4.status && (a4.get("/health", (e5, o3) => { - o3.json({ status: "ok", timestamp: Date.now(), source: "express" }); - }), a4.get("/ready", (e5, o3) => { - o3.json({ status: "ready", timestamp: Date.now(), source: "express" }); - })), void 0 !== n4.port) { - p2 = a4.listen(n4.port, () => { - console.log(`\u2705 Express source listening on port ${n4.port}`), console.log(` POST ${n4.path} - Event collection (JSON body)`), console.log(` GET ${n4.path} - Pixel tracking (query params)`), console.log(` OPTIONS ${n4.path} - CORS preflight`), n4.status && (console.log(" GET /health - Health check"), console.log(" GET /ready - Readiness check")); - }); - const e5 = () => { - p2 && p2.close(); + return clone(schema, def); +} +function merge(a4, b4) { + const def = mergeDefs(a4._zod.def, { + get shape() { + const _shape = { ...a4._zod.def.shape, ...b4._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b4._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a4, def); +} +function partial(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function aborted(x3, startIndex = 0) { + if (x3.aborted === true) + return true; + for (let i3 = startIndex; i3 < x3.issues.length; i3++) { + if (x3.issues[i3]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a2; + (_a2 = iss).path ?? (_a2.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message) { + return typeof message === "string" ? message : message?.message; +} +function finalizeIssue(iss, ctx, config2) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input"; + full.message = message; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst }; - process.on("SIGTERM", e5), process.on("SIGINT", e5); } - return { type: "express", config: { ...t4, settings: n4 }, push: i2, app: a4, server: p2 }; + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k4, _2]) => { + return Number.isNaN(Number.parseInt(k4, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i3 = 0; i3 < binaryString.length; i3++) { + bytes[i3] = binaryString.charCodeAt(i3); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i3 = 0; i3 < bytes.length; i3++) { + binaryString += String.fromCharCode(bytes[i3]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i3 = 0; i3 < cleanHex.length; i3 += 2) { + bytes[i3 / 2] = Number.parseInt(cleanHex.slice(i3, i3 + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b4) => b4.toString(16).padStart(2, "0")).join(""); +} +var Class = class { + constructor(..._args) { + } }; -// node_modules/@walkeros/destination-demo/dist/index.mjs -var e4 = Object.defineProperty; -var n3 = (n4, o3) => { - for (var i2 in o3) - e4(n4, i2, { get: o3[i2], enumerable: true }); +// node_modules/zod/v4/core/errors.js +var initializer = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); }; -var i = {}; -n3(i, { env: () => t3 }); -var t3 = {}; -n3(t3, { init: () => s2, push: () => a3, simulation: () => l2 }); -var s2 = { log: void 0 }; -var a3 = { log: Object.assign(() => { -}, {}) }; -var l2 = ["call:log"]; -var g = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e5, env: n4 }) { - (n4?.log || console.log)(`[${{ name: "demo", ...e5?.settings }.name}] initialized`); -}, push(e5, { config: n4, env: o3 }) { - const i2 = o3?.log || console.log, t4 = { name: "demo", ...n4?.settings }, s3 = t4.values ? function(e6, n5) { - const o4 = {}; - for (const i3 of n5) { - const n6 = i3.split(".").reduce((e7, n7) => e7?.[n7], e6); - void 0 !== n6 && (o4[i3] = n6); - } - return o4; - }(e5, t4.values) : e5; - i2(`[${t4.name}] ${JSON.stringify(s3, null, 2)}`); +var $ZodError = $constructor("$ZodError", initializer); +var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); +function flattenError(error46, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error46.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error46, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = (error47) => { + for (const issue2 of error47.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i3 = 0; + while (i3 < issue2.path.length) { + const el = issue2.path[i3]; + const terminal = i3 === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i3++; + } + } + } + }; + processError(error46); + return fieldErrors; +} +function treeifyError(error46, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = (error47, path = []) => { + var _a2, _b; + for (const issue2 of error47.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i3 = 0; + while (i3 < fullpath.length) { + const el = fullpath[i3]; + const terminal = i3 === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue2)); + } + i3++; + } + } + } + }; + processError(error46); + return result; +} +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error46) { + const lines = []; + const issues = [...error46.issues].sort((a4, b4) => (a4.path ?? []).length - (b4.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); +} + +// node_modules/zod/v4/core/parse.js +var _parse = (_Err) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e5 = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e5, _params?.callee); + throw e5; + } + return result.value; +}; +var parse = /* @__PURE__ */ _parse($ZodRealError); +var _parseAsync = (_Err) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e5 = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e5, params?.callee); + throw e5; + } + return result.value; +}; +var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); +var _safeParse = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); +var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err)(schema, value, ctx); +}; +var encode = /* @__PURE__ */ _encode($ZodRealError); +var _decode = (_Err) => (schema, value, _ctx) => { + return _parse(_Err)(schema, value, _ctx); +}; +var decode = /* @__PURE__ */ _decode($ZodRealError); +var _encodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err)(schema, value, ctx); +}; +var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); +var _decodeAsync = (_Err) => async (schema, value, _ctx) => { + return _parseAsync(_Err)(schema, value, _ctx); +}; +var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); +var _safeEncode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err)(schema, value, ctx); +}; +var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); +var _safeDecode = (_Err) => (schema, value, _ctx) => { + return _safeParse(_Err)(schema, value, _ctx); +}; +var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); +var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err)(schema, value, ctx); +}; +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); +var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err)(schema, value, _ctx); +}; +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + +// node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date, + datetime: () => datetime, + domain: () => domain, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +var cuid = /^[cC][^\s-]{8,}$/; +var cuid2 = /^[0-9a-z]+$/; +var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid = /^[0-9a-vA-V]{20}$/; +var ksuid = /^[A-Za-z0-9]{27}$/; +var nanoid = /^[a-zA-Z0-9_-]{21}$/; +var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; +var uuid = (version2) => { + if (!version2) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}; +var uuid4 = /* @__PURE__ */ uuid(4); +var uuid6 = /* @__PURE__ */ uuid(6); +var uuid7 = /* @__PURE__ */ uuid(7); +var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; +var idnEmail = unicodeEmail; +var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji() { + return new RegExp(_emoji, "u"); +} +var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; +var mac = (delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); +}; +var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url = /^[A-Za-z0-9_-]*$/; +var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; +var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; +var e164 = /^\+(?:[0-9]){6,14}[0-9]$/; +var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; +var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +function time(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time3 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time3}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +var string = (params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); +}; +var bigint = /^-?\d+n?$/; +var integer = /^-?\d+$/; +var number = /^-?\d+(?:\.\d+)?/; +var boolean = /^(?:true|false)$/i; +var _null = /^null$/i; +var _undefined = /^undefined$/i; +var lowercase = /^[^A-Z]*$/; +var uppercase = /^[^a-z]*$/; +var hex = /^[0-9a-fA-F]*$/; +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var md5_hex = /^[0-9a-fA-F]{32}$/; +var md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); +var md5_base64url = /* @__PURE__ */ fixedBase64url(22); +var sha1_hex = /^[0-9a-fA-F]{40}$/; +var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); +var sha1_base64url = /* @__PURE__ */ fixedBase64url(27); +var sha256_hex = /^[0-9a-fA-F]{64}$/; +var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); +var sha256_base64url = /* @__PURE__ */ fixedBase64url(43); +var sha384_hex = /^[0-9a-fA-F]{96}$/; +var sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); +var sha384_base64url = /* @__PURE__ */ fixedBase64url(64); +var sha512_hex = /^[0-9a-fA-F]{128}$/; +var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); +var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + +// node_modules/zod/v4/core/checks.js +var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a2; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a2 = inst._zod).onattach ?? (_a2.onattach = []); +}); +var numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_big", + maximum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_small", + minimum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a2; + (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inst + }); + } + }; +}); +var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inst + }); + } + }; +}); +var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a2, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a2 = inst._zod).check ?? (_a2.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); +}); +var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; +}); +var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; +}); + +// node_modules/zod/v4/core/doc.js +var Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn2) { + this.indent += 1; + fn2(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split("\n").filter((x3) => x3); + const minIndent = Math.min(...lines.map((x3) => x3.length - x3.trimStart().length)); + const dedented = lines.map((x3) => x3.slice(minIndent)).map((x3) => " ".repeat(this.indent * 2) + x3); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F3 = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x3) => ` ${x3}`)]; + return new F3(...args, lines.join("\n")); + } +}; + +// node_modules/zod/v4/core/versions.js +var version = { + major: 4, + minor: 1, + patch: 13 +}; + +// node_modules/zod/v4/core/schemas.js +var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a2; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch of checks) { + for (const fn2 of ch._zod.onattach) { + fn2(inst); + } + } + if (checks.length === 0) { + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _2 = ch._zod.check(payload); + if (_2 instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _2 instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _2; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }; + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + inst["~standard"] = { + validate: (value) => { + try { + const r3 = safeParse(inst, value); + return r3.success ? { value: r3.data } : { issues: r3.error?.issues }; + } catch (_2) { + return safeParseAsync(inst, value).then((r3) => r3.success ? { value: r3.data } : { issues: r3.error?.issues }); + } + }, + vendor: "zod", + version: 1 + }; +}); +var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _2) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_3) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); +}); +var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); +}); +var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v2 = versionMap[def.version]; + if (v2 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v2)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); +}); +var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); +}); +var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_2) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); +}); +var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); +}); +var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); +}); +var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); +}); +var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date); + $ZodStringFormat.init(inst, def); +}); +var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); +}); +var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; +}); +var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; +}); +var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); +}); +var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c3) => c3 === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); +}); +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_2) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; +}); +var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); +}); +var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_2) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_2) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); +}); +var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate = input instanceof Date; + const isValidDate = isDate && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; +}); +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i3 = 0; i3 < input.length; i3++) { + const item = input[i3]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i3))); + } else { + handleArrayResult(result, payload, i3); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +function handlePropertyResult(result, final, key, input) { + if (result.issues.length) { + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k4 of keys) { + if (!def.shape?.[k4]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k4}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t3 = _catchall.def.type; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t3 === "never") { + unrecognized.push(key); + continue; + } + const r3 = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r3 instanceof Promise) { + proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input))); + } else { + handlePropertyResult(r3, payload, key, input); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v2 of field.values) + propValues[key].add(v2); + } + } + return propValues; + }); + const isObject2 = isObject; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const r3 = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r3 instanceof Promise) { + proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input))); + } else { + handlePropertyResult(r3, payload, key, input); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; +}); +var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = (shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k4 = esc(key); + return `shape[${k4}]._zod.run({ value: input[${k4}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k4 = esc(key); + doc.write(`const ${id} = ${parseStr(key)};`); + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k4}, ...iss.path] : [${k4}] + }))); + } + + + if (${id}.value === undefined) { + if (${k4} in input) { + newResult[${k4}] = undefined; + } + } else { + newResult[${k4}] = ${id}.value; + } + + `); + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn2 = doc.compile(); + return (payload, ctx) => fn2(shape, payload, ctx); + }; + let fastpass; + const isObject2 = isObject; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; +}); +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r3) => !aborted(r3)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + }); + return final; +} +var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o2) => o2._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o2) => o2._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o2) => o2._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o2) => o2._zod.pattern)) { + const patterns = def.options.map((o2) => o2._zod.pattern); + return new RegExp(`^(${patterns.map((p4) => cleanRegex(p4.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k4, v2] of Object.entries(pv)) { + if (!propValues[k4]) + propValues[k4] = /* @__PURE__ */ new Set(); + for (const val of v2) { + propValues[k4].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o2 of opts) { + const values = o2._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`); + for (const v2 of values) { + if (map2.has(v2)) { + throw new Error(`Duplicate discriminator value "${String(v2)}"`); + } + map2.set(v2, o2); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; +}); +function mergeValues(a4, b4) { + if (a4 === b4) { + return { valid: true, data: a4 }; + } + if (a4 instanceof Date && b4 instanceof Date && +a4 === +b4) { + return { valid: true, data: a4 }; + } + if (isPlainObject(a4) && isPlainObject(b4)) { + const bKeys = Object.keys(b4); + const sharedKeys = Object.keys(a4).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a4, ...b4 }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a4[key], b4[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a4) && Array.isArray(b4)) { + if (a4.length !== b4.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a4.length; index++) { + const itemA = a4[index]; + const itemB = b4[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + if (left.issues.length) { + result.issues.push(...left.issues); + } + if (right.issues.length) { + result.issues.push(...right.issues); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i3 = -1; + for (const item of items) { + i3++; + if (i3 >= input.length) { + if (i3 >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i3], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i3))); + } else { + handleTupleResult(result, payload, i3); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i3++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i3))); + } else { + handleTupleResult(result, payload, i3); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (keyResult.issues.length) { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), + input: key, + path: [key], + inst + }); + payload.value[keyResult.value] = keyResult.value; + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k4) => propertyKeyTypes.has(typeof k4)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; +}); +var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2 ? escapeRegex(o2.toString()) : String(o2)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; +}); +var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; +}); +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r3) => handleOptionalResult(r3, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; +}); +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v2 = def.innerType._zod.values; + return v2 ? new Set([...v2].filter((x3) => x3 !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; +}); +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; +}); +var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; +}); +var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; +}); +var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; +}); +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; +}); +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; +}); +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "template_literal", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; +}); +var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F3 = inst.constructor; + if (Array.isArray(args[0])) { + return new F3({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F3({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F3 = inst.constructor; + return new F3({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; +}); +var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; +}); +var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; +}); +var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _2) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r3 = def.fn(input); + if (r3 instanceof Promise) { + return r3.then((r4) => handleRefineResult(r4, payload, input, inst)); + } + handleRefineResult(r3, payload, input, inst); + return; + }; +}); +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} + +// node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); + +// node_modules/zod/v4/locales/ar.js +var error = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; +}; +function ar_default() { + return { + localeError: error() + }; +} + +// node_modules/zod/v4/locales/az.js +var error2 = () => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; +}; +function az_default() { + return { + localeError: error2() + }; +} + +// node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +var error3 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u043B\u0456\u043A"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0456\u045E"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; +}; +function be_default() { + return { + localeError: error3() + }; +} + +// node_modules/zod/v4/locales/bg.js +var parsedType = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error4 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${parsedType(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; +}; +function bg_default() { + return { + localeError: error4() + }; +} + +// node_modules/zod/v4/locales/ca.js +var error5 = () => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; +}; +function ca_default() { + return { + localeError: error5() + }; +} + +// node_modules/zod/v4/locales/cs.js +var error6 = () => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u010D\xEDslo"; + } + case "string": { + return "\u0159et\u011Bzec"; + } + case "boolean": { + return "boolean"; + } + case "bigint": { + return "bigint"; + } + case "function": { + return "funkce"; + } + case "symbol": { + return "symbol"; + } + case "undefined": { + return "undefined"; + } + case "object": { + if (Array.isArray(data)) { + return "pole"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; +}; +function cs_default() { + return { + localeError: error6() + }; +} + +// node_modules/zod/v4/locales/da.js +var error7 = () => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + const TypeNames = { + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + function getTypeName(type) { + return TypeNames[type] ?? type; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "tal"; + } + case "object": { + if (Array.isArray(data)) { + return "liste"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + return "objekt"; + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ugyldigt input: forventede ${getTypeName(issue2.expected)}, fik ${getTypeName(parsedType8(issue2.input))}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) + return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) { + return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; +}; +function da_default() { + return { + localeError: error7() + }; +} + +// node_modules/zod/v4/locales/de.js +var error8 = () => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "Zahl"; + } + case "object": { + if (Array.isArray(data)) { + return "Array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; +}; +function de_default() { + return { + localeError: error8() + }; +} + +// node_modules/zod/v4/locales/en.js +var parsedType2 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error9 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Invalid input: expected ${issue2.expected}, received ${parsedType2(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; +}; +function en_default() { + return { + localeError: error9() + }; +} + +// node_modules/zod/v4/locales/eo.js +var parsedType3 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombro"; + } + case "object": { + if (Array.isArray(data)) { + return "tabelo"; + } + if (data === null) { + return "senvalora"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error10 = () => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType3(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; +}; +function eo_default() { + return { + localeError: error10() + }; +} + +// node_modules/zod/v4/locales/es.js +var error11 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + const TypeNames = { + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + function getTypeName(type) { + return TypeNames[type] ?? type; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype) { + return data.constructor.name; + } + return "object"; + } + } + return t3; + }; + const Nouns = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entrada inv\xE1lida: se esperaba ${getTypeName(issue2.expected)}, recibido ${getTypeName(parsedType8(issue2.input))}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) + return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${getTypeName(issue2.origin)}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${getTypeName(issue2.origin)}`; + default: + return `Entrada inv\xE1lida`; + } + }; +}; +function es_default() { + return { + localeError: error11() + }; +} + +// node_modules/zod/v4/locales/fa.js +var error12 = () => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0622\u0631\u0627\u06CC\u0647"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType8(issue2.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; +}; +function fa_default() { + return { + localeError: error12() + }; +} + +// node_modules/zod/v4/locales/fi.js +var error13 = () => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; +}; +function fi_default() { + return { + localeError: error13() + }; +} + +// node_modules/zod/v4/locales/fr.js +var error14 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombre"; + } + case "object": { + if (Array.isArray(data)) { + return "tableau"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType8(issue2.input)} re\xE7u`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_default() { + return { + localeError: error14() + }; +} + +// node_modules/zod/v4/locales/fr-CA.js +var error15 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_CA_default() { + return { + localeError: error15() + }; +} + +// node_modules/zod/v4/locales/he.js +var error16 = () => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = (t3) => t3 ? TypeNames[t3] : void 0; + const typeLabel = (t3) => { + const e5 = typeEntry(t3); + if (e5) + return e5.label; + return t3 ?? TypeNames.unknown.label; + }; + const withDefinite = (t3) => `\u05D4${typeLabel(t3)}`; + const verbFor = (t3) => { + const e5 = typeEntry(t3); + const gender = e5?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }; + const getSizing = (origin) => { + if (!origin) + return null; + return Sizable[origin] ?? null; + }; + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": + return Number.isNaN(data) ? "NaN" : "number"; + case "object": { + if (Array.isArray(data)) + return "array"; + if (data === null) + return "null"; + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + return "object"; + } + default: + return t3; + } + }; + const Nouns = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expectedKey = issue2.expected; + const expected = typeLabel(expectedKey); + const receivedKey = parsedType8(issue2.input); + const received = TypeNames[receivedKey]?.label ?? receivedKey; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue2.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`; + } + const stringified = issue2.values.map((v2) => stringifyPrimitive(v2)); + if (issue2.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? "<=" : "<"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue2.minimum === 1 && issue2.inclusive) { + const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? ">=" : ">"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = Nouns[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue2.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; +}; +function he_default() { + return { + localeError: error16() + }; +} + +// node_modules/zod/v4/locales/hu.js +var error17 = () => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "sz\xE1m"; + } + case "object": { + if (Array.isArray(data)) { + return "t\xF6mb"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; +}; +function hu_default() { + return { + localeError: error17() + }; +} + +// node_modules/zod/v4/locales/id.js +var error18 = () => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; +}; +function id_default() { + return { + localeError: error18() + }; +} + +// node_modules/zod/v4/locales/is.js +var parsedType4 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\xFAmer"; + } + case "object": { + if (Array.isArray(data)) { + return "fylki"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error19 = () => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${parsedType4(issue2.input)} \xFEar sem \xE1 a\xF0 vera ${issue2.expected}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; +}; +function is_default() { + return { + localeError: error19() + }; +} + +// node_modules/zod/v4/locales/it.js +var error20 = () => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "numero"; + } + case "object": { + if (Array.isArray(data)) { + return "vettore"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; +}; +function it_default() { + return { + localeError: error20() + }; +} + +// node_modules/zod/v4/locales/ja.js +var error21 = () => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u6570\u5024"; + } + case "object": { + if (Array.isArray(data)) { + return "\u914D\u5217"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u7121\u52B9\u306A\u5165\u529B: ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType8(issue2.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; +}; +function ja_default() { + return { + localeError: error21() + }; +} + +// node_modules/zod/v4/locales/ka.js +var parsedType5 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8"; + } + case "object": { + if (Array.isArray(data)) { + return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + const typeMap = { + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + undefined: "undefined", + bigint: "bigint", + symbol: "symbol", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0" + }; + return typeMap[t3] ?? t3; +}; +var error22 = () => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${parsedType5(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; +}; +function ka_default() { + return { + localeError: error22() + }; +} + +// node_modules/zod/v4/locales/km.js +var error23 = () => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)" : "\u179B\u17C1\u1781"; + } + case "object": { + if (Array.isArray(data)) { + return "\u17A2\u17B6\u179A\u17C1 (Array)"; + } + if (data === null) { + return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; +}; +function km_default() { + return { + localeError: error23() + }; +} + +// node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} + +// node_modules/zod/v4/locales/ko.js +var error24 = () => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType8(issue2.input)}\uC785\uB2C8\uB2E4`; + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; +}; +function ko_default() { + return { + localeError: error24() + }; +} + +// node_modules/zod/v4/locales/lt.js +var parsedType6 = (data) => { + const t3 = typeof data; + return parsedTypeFromType(t3, data); +}; +var parsedTypeFromType = (t3, data = void 0) => { + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "skai\u010Dius"; + } + case "bigint": { + return "sveikasis skai\u010Dius"; + } + case "string": { + return "eilut\u0117"; + } + case "boolean": { + return "login\u0117 reik\u0161m\u0117"; + } + case "undefined": + case "void": { + return "neapibr\u0117\u017Eta reik\u0161m\u0117"; + } + case "function": { + return "funkcija"; + } + case "symbol": { + return "simbolis"; + } + case "object": { + if (data === void 0) + return "ne\u017Einomas objektas"; + if (data === null) + return "nulin\u0117 reik\u0161m\u0117"; + if (Array.isArray(data)) + return "masyvas"; + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + return "objektas"; + } + case "null": { + return "nulin\u0117 reik\u0161m\u0117"; + } + } + return t3; +}; +var capitalizeFirstCharacter = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1); +}; +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +var error25 = () => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + const Nouns = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Gautas tipas ${parsedType6(issue2.input)}, o tik\u0117tasi - ${parsedTypeFromType(issue2.expected)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin = parsedTypeFromType(issue2.origin); + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin = parsedTypeFromType(issue2.origin); + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin = parsedTypeFromType(issue2.origin); + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; +}; +function lt_default() { + return { + localeError: error25() + }; +} + +// node_modules/zod/v4/locales/mk.js +var error26 = () => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0431\u0440\u043E\u0458"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043D\u0438\u0437\u0430"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; +}; +function mk_default() { + return { + localeError: error26() + }; +} + +// node_modules/zod/v4/locales/ms.js +var error27 = () => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombor"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; +}; +function ms_default() { + return { + localeError: error27() + }; +} + +// node_modules/zod/v4/locales/nl.js +var error28 = () => { + const Sizable = { + string: { unit: "tekens", verb: "te hebben" }, + file: { unit: "bytes", verb: "te hebben" }, + array: { unit: "elementen", verb: "te hebben" }, + set: { unit: "elementen", verb: "te hebben" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "getal"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Te groot: verwacht dat ${issue2.origin ?? "waarde"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"}`; + return `Te groot: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Te klein: verwacht dat ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Te klein: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; +}; +function nl_default() { + return { + localeError: error28() + }; +} + +// node_modules/zod/v4/locales/no.js +var error29 = () => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "tall"; + } + case "object": { + if (Array.isArray(data)) { + return "liste"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; +}; +function no_default() { + return { + localeError: error29() + }; +} + +// node_modules/zod/v4/locales/ota.js +var error30 = () => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "numara"; + } + case "object": { + if (Array.isArray(data)) { + return "saf"; + } + if (data === null) { + return "gayb"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; +}; +function ota_default() { + return { + localeError: error30() + }; +} + +// node_modules/zod/v4/locales/ps.js +var error31 = () => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0627\u0631\u06D0"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType8(issue2.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; +}; +function ps_default() { + return { + localeError: error31() + }; +} + +// node_modules/zod/v4/locales/pl.js +var error32 = () => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "liczba"; + } + case "object": { + if (Array.isArray(data)) { + return "tablica"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; +}; +function pl_default() { + return { + localeError: error32() + }; +} + +// node_modules/zod/v4/locales/pt.js +var error33 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\xFAmero"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "nulo"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; +}; +function pt_default() { + return { + localeError: error33() + }; +} + +// node_modules/zod/v4/locales/ru.js +function getRussianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +var error34 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; +}; +function ru_default() { + return { + localeError: error34() + }; +} + +// node_modules/zod/v4/locales/sl.js +var error35 = () => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0161tevilo"; + } + case "object": { + if (Array.isArray(data)) { + return "tabela"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; +}; +function sl_default() { + return { + localeError: error35() + }; +} + +// node_modules/zod/v4/locales/sv.js +var error36 = () => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "antal"; + } + case "object": { + if (Array.isArray(data)) { + return "lista"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; +}; +function sv_default() { + return { + localeError: error36() + }; +} + +// node_modules/zod/v4/locales/ta.js +var error37 = () => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1" : "\u0B8E\u0BA3\u0BCD"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0B85\u0BA3\u0BBF"; + } + if (data === null) { + return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; +}; +function ta_default() { + return { + localeError: error37() + }; +} + +// node_modules/zod/v4/locales/th.js +var error38 = () => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)"; + } + if (data === null) { + return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; +}; +function th_default() { + return { + localeError: error38() + }; +} + +// node_modules/zod/v4/locales/tr.js +var parsedType7 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error39 = () => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType7(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; +}; +function tr_default() { + return { + localeError: error39() + }; +} + +// node_modules/zod/v4/locales/uk.js +var error40 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; +}; +function uk_default() { + return { + localeError: error40() + }; +} + +// node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} + +// node_modules/zod/v4/locales/ur.js +var error41 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0646\u0645\u0628\u0631"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0622\u0631\u06D2"; + } + if (data === null) { + return "\u0646\u0644"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType8(issue2.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; +}; +function ur_default() { + return { + localeError: error41() + }; +} + +// node_modules/zod/v4/locales/vi.js +var error42 = () => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "s\u1ED1"; + } + case "object": { + if (Array.isArray(data)) { + return "m\u1EA3ng"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; +}; +function vi_default() { + return { + localeError: error42() + }; +} + +// node_modules/zod/v4/locales/zh-CN.js +var error43 = () => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u975E\u6570\u5B57(NaN)" : "\u6570\u5B57"; + } + case "object": { + if (Array.isArray(data)) { + return "\u6570\u7EC4"; + } + if (data === null) { + return "\u7A7A\u503C(null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; +}; +function zh_CN_default() { + return { + localeError: error43() + }; +} + +// node_modules/zod/v4/locales/zh-TW.js +var error44 = () => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; +}; +function zh_TW_default() { + return { + localeError: error44() + }; +} + +// node_modules/zod/v4/locales/yo.js +var error45 = () => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\u1ECD\u0301mb\xE0"; + } + case "object": { + if (Array.isArray(data)) { + return "akop\u1ECD"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; +}; +function yo_default() { + return { + localeError: error45() + }; +} + +// node_modules/zod/v4/core/registries.js +var _a; +var $output = Symbol("ZodOutput"); +var $input = Symbol("ZodInput"); +var $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + if (this._idmap.has(meta3.id)) { + throw new Error(`ID ${meta3.id} already exists in the registry`); + } + this._idmap.set(meta3.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta3 = this._map.get(schema); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p4 = schema._zod.parent; + if (p4) { + const pm = { ...this.get(p4) ?? {} }; + delete pm.id; + const f2 = { ...pm, ...this._map.get(schema) }; + return Object.keys(f2).length ? f2 : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } +}; +function registry() { + return new $ZodRegistry(); +} +(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry()); +var globalRegistry = globalThis.__zod_globalRegistry; + +// node_modules/zod/v4/core/api.js +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _mac(Class2, params) { + return new Class2({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +var TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 +}; +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _positive(params) { + return _gt(0, params); +} +function _negative(params) { + return _lt(0, params); +} +function _nonpositive(params) { + return _lte(0, params); +} +function _nonnegative(params) { + return _gte(0, params); +} +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +function _maxLength(maximum, params) { + const ch = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _slugify() { + return _overwrite((input) => slugify(input)); +} +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +function _transform(Class2, fn2) { + return new Class2({ + type: "transform", + transform: fn2 + }); +} +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +function _custom(Class2, fn2, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn: fn2, + ...norm + }); + return schema; +} +function _refine(Class2, fn2, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn: fn2, + ...normalizeParams(_params) + }); + return schema; +} +function _superRefine(fn2) { + const ch = _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn2(payload.value, payload); + }); + return ch; +} +function _check(fn2, params) { + const ch = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch._zod.check = fn2; + return ch; +} +function describe(description) { + const ch = new $ZodCheck({ check: "describe" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +function meta(metadata) { + const ch = new $ZodCheck({ check: "meta" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2); + falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: (input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }, + reverseTransform: (input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }, + error: params.error + }); + return codec2; +} +function _stringFormat(Class2, format, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} + +// node_modules/zod/v4/core/to-json-schema.js +var JSONSchemaGenerator = class { + constructor(params) { + this.counter = 0; + this.metadataRegistry = params?.metadata ?? globalRegistry; + this.target = params?.target ?? "draft-2020-12"; + this.unrepresentable = params?.unrepresentable ?? "throw"; + this.override = params?.override ?? (() => { + }); + this.io = params?.io ?? "output"; + this.seen = /* @__PURE__ */ new Map(); + } + process(schema, _params = { path: [], schemaPath: [] }) { + var _a2; + const def = schema._zod.def; + const formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + const seen = this.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + this.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + const parent = schema._zod.parent; + if (parent) { + result.ref = parent; + this.process(parent, params); + this.seen.get(parent).isParent = true; + } else { + const _json = result.schema; + switch (def.type) { + case "string": { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format) { + json2.format = formatMap[format] ?? format; + if (json2.format === "") + delete json2.format; + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + result.schema.allOf = [ + ...regexes.map((regex) => ({ + ...this.target === "draft-7" || this.target === "draft-4" || this.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } + break; + } + case "number": { + const json2 = _json; + const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format === "string" && format.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && this.target !== "draft-4") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && this.target !== "draft-4") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; + break; + } + case "boolean": { + const json2 = _json; + json2.type = "boolean"; + break; + } + case "bigint": { + if (this.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + break; + } + case "symbol": { + if (this.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + break; + } + case "null": { + if (this.target === "openapi-3.0") { + _json.type = "string"; + _json.nullable = true; + _json.enum = [null]; + } else + _json.type = "null"; + break; + } + case "any": { + break; + } + case "unknown": { + break; + } + case "undefined": { + if (this.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + break; + } + case "void": { + if (this.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + break; + } + case "never": { + _json.not = {}; + break; + } + case "date": { + if (this.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + break; + } + case "array": { + const json2 = _json; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = this.process(def.element, { ...params, path: [...params.path, "items"] }); + break; + } + case "object": { + const json2 = _json; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = this.process(shape[key], { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v2 = def.shape[key]._zod; + if (this.io === "input") { + return v2.optin === void 0; + } else { + return v2.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (this.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = this.process(def.catchall, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + break; + } + case "union": { + const json2 = _json; + const isDiscriminated = def.discriminator !== void 0; + const options = def.options.map((x3, i3) => this.process(x3, { + ...params, + path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i3] + })); + if (isDiscriminated) { + json2.oneOf = options; + } else { + json2.anyOf = options; + } + break; + } + case "intersection": { + const json2 = _json; + const a4 = this.process(def.left, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b4 = this.process(def.right, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; + const allOf = [ + ...isSimpleIntersection(a4) ? a4.allOf : [a4], + ...isSimpleIntersection(b4) ? b4.allOf : [b4] + ]; + json2.allOf = allOf; + break; + } + case "tuple": { + const json2 = _json; + json2.type = "array"; + const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x3, i3) => this.process(x3, { + ...params, + path: [...params.path, prefixPath, i3] + })); + const rest = def.rest ? this.process(def.rest, { + ...params, + path: [...params.path, restPath, ...this.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (this.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (this.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + break; + } + case "record": { + const json2 = _json; + json2.type = "object"; + if (this.target === "draft-7" || this.target === "draft-2020-12") { + json2.propertyNames = this.process(def.keyType, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = this.process(def.valueType, { + ...params, + path: [...params.path, "additionalProperties"] + }); + break; + } + case "map": { + if (this.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + break; + } + case "set": { + if (this.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + break; + } + case "enum": { + const json2 = _json; + const values = getEnumValues(def.entries); + if (values.every((v2) => typeof v2 === "number")) + json2.type = "number"; + if (values.every((v2) => typeof v2 === "string")) + json2.type = "string"; + json2.enum = values; + break; + } + case "literal": { + const json2 = _json; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (this.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (this.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v2) => typeof v2 === "number")) + json2.type = "number"; + if (vals.every((v2) => typeof v2 === "string")) + json2.type = "string"; + if (vals.every((v2) => typeof v2 === "boolean")) + json2.type = "string"; + if (vals.every((v2) => v2 === null)) + json2.type = "null"; + json2.enum = vals; + } + break; + } + case "file": { + const json2 = _json; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(json2, file2); + } else { + json2.anyOf = mime.map((m3) => { + const mFile = { ...file2, contentMediaType: m3 }; + return mFile; + }); + } + } else { + Object.assign(json2, file2); + } + break; + } + case "transform": { + if (this.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + break; + } + case "nullable": { + const inner = this.process(def.innerType, params); + if (this.target === "openapi-3.0") { + result.ref = def.innerType; + _json.nullable = true; + } else { + _json.anyOf = [inner, { type: "null" }]; + } + break; + } + case "nonoptional": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "success": { + const json2 = _json; + json2.type = "boolean"; + break; + } + case "default": { + this.process(def.innerType, params); + result.ref = def.innerType; + _json.default = JSON.parse(JSON.stringify(def.defaultValue)); + break; + } + case "prefault": { + this.process(def.innerType, params); + result.ref = def.innerType; + if (this.io === "input") + _json._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + break; + } + case "catch": { + this.process(def.innerType, params); + result.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + _json.default = catchValue; + break; + } + case "nan": { + if (this.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + break; + } + case "template_literal": { + const json2 = _json; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + json2.type = "string"; + json2.pattern = pattern.source; + break; + } + case "pipe": { + const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + this.process(innerType, params); + result.ref = innerType; + break; + } + case "readonly": { + this.process(def.innerType, params); + result.ref = def.innerType; + _json.readOnly = true; + break; + } + case "promise": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "optional": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "lazy": { + const innerType = schema._zod.innerType; + this.process(innerType, params); + result.ref = innerType; + break; + } + case "custom": { + if (this.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + break; + } + case "function": { + if (this.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + break; + } + default: { + def; + } + } + } + } + const meta3 = this.metadataRegistry.get(schema); + if (meta3) + Object.assign(result.schema, meta3); + if (this.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (this.io === "input" && result.schema._prefault) + (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault); + delete result.schema._prefault; + const _result = this.seen.get(schema); + return _result.schema; + } + emit(schema, _params) { + const params = { + cycles: _params?.cycles ?? "ref", + reused: _params?.reused ?? "inline", + // unrepresentable: _params?.unrepresentable ?? "throw", + // uri: _params?.uri ?? ((id) => `${id}`), + external: _params?.external ?? void 0 + }; + const root = this.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const makeURI = (entry) => { + const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions"; + if (params.external) { + const externalId = params.external.registry.get(entry[0])?.id; + const uriGenerator = params.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${this.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }; + const extractToDef = (entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; + }; + if (params.cycles === "throw") { + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (params.external) { + const ext = params.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = this.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (params.reused === "ref") { + extractToDef(entry); + continue; + } + } + } + const flattenRef = (zodSchema, params2) => { + const seen = this.seen.get(zodSchema); + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + if (seen.ref === null) { + return; + } + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref, params2); + const refSchema = this.seen.get(ref).schema; + if (refSchema.$ref && (params2.target === "draft-7" || params2.target === "draft-4" || params2.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + Object.assign(schema2, _cached); + } + } + if (!seen.isParent) + this.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }; + for (const entry of [...this.seen.entries()].reverse()) { + flattenRef(entry[0], { target: this.target }); + } + const result = {}; + if (this.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (this.target === "draft-7") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (this.target === "draft-4") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (this.target === "openapi-3.0") { + } else { + console.warn(`Invalid target: ${this.target}`); + } + if (params.external?.uri) { + const id = params.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = params.external.uri(id); + } + Object.assign(result, root.def); + const defs = params.external?.defs ?? {}; + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (params.external) { + } else { + if (Object.keys(defs).length > 0) { + if (this.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + return JSON.parse(JSON.stringify(result)); + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } + } +}; +function toJSONSchema(input, _params) { + if (input instanceof $ZodRegistry) { + const gen2 = new JSONSchemaGenerator(_params); + const defs = {}; + for (const entry of input._idmap.entries()) { + const [_2, schema] = entry; + gen2.process(schema); + } + const schemas = {}; + const external = { + registry: input, + uri: _params?.uri, + defs + }; + for (const entry of input._idmap.entries()) { + const [key, schema] = entry; + schemas[key] = gen2.emit(schema, { + ..._params, + external + }); + } + if (Object.keys(defs).length > 0) { + const defsSegment = gen2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const gen = new JSONSchemaGenerator(_params); + gen.process(input); + return gen.emit(input, _params); +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} + +// node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; + +// node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date2, + datetime: () => datetime2, + duration: () => duration2, + time: () => time2 +}); +var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function date2(params) { + return _isoDate(ZodISODate, params); +} +var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function time2(params) { + return _isoTime(ZodISOTime, params); +} +var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} + +// node_modules/zod/v4/classic/errors.js +var initializer2 = (inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); +}; +var ZodError = $constructor("ZodError", initializer2); +var ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error +}); + +// node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); +var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); +var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode2 = /* @__PURE__ */ _encode(ZodRealError); +var decode2 = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + +// node_modules/zod/v4/classic/schemas.js +var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + })); + }; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta3) => { + reg.add(inst, meta3); + return inst; + }; + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode2(inst, data, params); + inst.decode = (data, params) => decode2(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check2, params) => inst.check(refine(check2, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn2) => inst.check(_overwrite(fn2)); + inst.optional = () => optional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl = inst.clone(); + globalRegistry.add(cl, args[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + return inst; +}); +var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); +}); +var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date2(params)); + inst.time = (params) => inst.check(time2(params)); + inst.duration = (params) => inst.check(duration2(params)); +}); +function string2(params) { + return _string(ZodString, params); +} +var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); +}); +var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function email2(params) { + return _email(ZodEmail, params); +} +var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function guid2(params) { + return _guid(ZodGUID, params); +} +var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function url(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid3(params) { + return _cuid(ZodCUID, params); +} +var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ulid2(params) { + return _ulid(ZodULID, params); +} +var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function xid2(params) { + return _xid(ZodXID, params); +} +var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function mac2(params) { + return _mac(ZodMAC, params); +} +var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base642(params) { + return _base64(ZodBase64, params); +} +var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function e1642(params) { + return _e164(ZodE164, params); +} +var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function jwt(params) { + return _jwt(ZodJWT, params); +} +var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function stringFormat(format, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params); +} +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format = `${alg}_${enc}`; + const regex = regexes_exports[format]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format}`); + return _stringFormat(ZodCustomStringFormat, format, regex, params); +} +var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number2(params) { + return _number(ZodNumber, params); +} +var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); +}); +function int(params) { + return _int(ZodNumberFormat, params); +} +function float32(params) { + return _float32(ZodNumberFormat, params); +} +function float64(params) { + return _float64(ZodNumberFormat, params); +} +function int32(params) { + return _int32(ZodNumberFormat, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); +}); +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; +}); +function bigint2(params) { + return _bigint(ZodBigInt, params); +} +var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); +}); +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); +}); +function symbol(params) { + return _symbol(ZodSymbol, params); +} +var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); +}); +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); +}); +function _null3(params) { + return _null2(ZodNull, params); +} +var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); +}); +function any() { + return _any(ZodAny); +} +var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); +}); +function unknown() { + return _unknown(ZodUnknown); +} +var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); +}); +function never(params) { + return _never(ZodNever, params); +} +var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); +}); +function _void2(params) { + return _void(ZodVoid, params); +} +var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c3 = inst._zod.bag; + inst.minDate = c3.minimum ? new Date(c3.minimum) : null; + inst.maxDate = c3.maximum ? new Date(c3.maximum) : null; +}); +function date3(params) { + return _date(ZodDate, params); +} +var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; +}); +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); +}); +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst.options = def.options; +}); +function union(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); +}); +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); +}); +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); +}); +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function partialRecord(keyType, valueType, params) { + const k4 = clone(keyType); + k4._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k4, + valueType, + ...util_exports.normalizeParams(params) + }); +} +var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); +}); +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; +}); +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); +}); +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); +}); +function file(params) { + return _file(ZodFile, params); +} +var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; +}); +function transform(fn2) { + return new ZodTransform({ + type: "transform", + transform: fn2 + }); +} +var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType + }); +} +var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); +} +function nullish2(innerType) { + return optional(nullable(innerType)); +} +var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); +}); +function nan(params) { + return _nan(ZodNaN, params); +} +var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst.in = def.in; + inst.out = def.out; +}); +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); +}); +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); +}); +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); +}); +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); +}); +function check(fn2) { + const ch = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn2; + return ch; +} +function custom(fn2, _params) { + return _custom(ZodCustom, fn2 ?? (() => true), _params); +} +function refine(fn2, _params = {}) { + return _refine(ZodCustom, fn2, _params); +} +function superRefine(fn2) { + return _superRefine(fn2); +} +var describe2 = describe; +var meta2 = meta; +function _instanceof(cls, params = { + error: `Input not instance of ${cls.name}` +}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + return inst; +} +var stringbool = (...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString +}, ...args); +function json(params) { + const jsonSchema = lazy(() => { + return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn2, schema) { + return pipe(transform(fn2), schema); +} + +// node_modules/zod/v4/classic/compat.js +var ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function setErrorMap(map2) { + config({ + customError: map2 + }); +} +function getErrorMap() { + return config().customError; +} +var ZodFirstPartyTypeKind; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) { +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + +// node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint3, + boolean: () => boolean3, + date: () => date4, + number: () => number3, + string: () => string3 +}); +function string3(params) { + return _coercedString(ZodString, params); +} +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint3(params) { + return _coercedBigint(ZodBigInt, params); +} +function date4(params) { + return _coercedDate(ZodDate, params); +} + +// node_modules/zod/v4/classic/external.js +config(en_default()); + +// node_modules/@walkeros/core/dist/dev.mjs +var e2 = Object.defineProperty; +var n2 = (n5, i3) => { + for (var o2 in i3) + e2(n5, o2, { get: i3[o2], enumerable: true }); +}; +var i = {}; +n2(i, { BaseContextConfig: () => B2, BatchConfig: () => N2, CollectorSchemas: () => cn, ConsentSchema: () => X2, Counter: () => d2, DeepPartialEventSchema: () => re2, DestinationReferenceSchema: () => Nn, DestinationSchemas: () => Me, DestinationsMapConfig: () => A2, DisabledConfig: () => I2, EntitiesSchema: () => ie, EntitySchema: () => ne, EventSchema: () => oe, FlowConfigSchema: () => Vn, FlowSchemas: () => Tn, GenericEnvConfig: () => z2, GenericSettingsConfig: () => L3, HandlersConfig: () => P3, IdConfig: () => D2, Identifier: () => c, InitConfig: () => x2, LoopSchema: () => he, MapSchema: () => ve, MappingResultSchema: () => Pe, MappingSchemas: () => be, OptionalPrimitiveValue: () => m2, OrderedPropertiesSchema: () => $3, PartialEventSchema: () => te, PolicySchema: () => we, PrimaryConfig: () => R, PrimitiveSchema: () => Un, PrimitiveValue: () => u, ProcessingControlConfig: () => V2, PropertiesSchema: () => F2, PropertySchema: () => Q2, PropertyTypeSchema: () => _, QueueConfig: () => E, RequiredBoolean: () => s, RequiredNumber: () => a, RequiredString: () => r, RuleSchema: () => ke, RulesSchema: () => Ce, RuntimeInstanceConfig: () => U2, SetSchema: () => Se, SetupSchema: () => Wn, SourceReferenceSchema: () => Bn, SourceSchema: () => ee, SourceSchemas: () => Cn, SourceTypeSchema: () => K2, SourcesMapConfig: () => W3, TaggingVersion: () => p2, Timestamp: () => l, UserSchema: () => Y2, UtilitySchemas: () => b3, ValueConfigSchema: () => ye, ValueSchema: () => ge, ValuesSchema: () => fe, VerboseConfig: () => J, VersionSchema: () => Z, WalkerOSSchemas: () => H2, configJsonSchema: () => Fn, consentJsonSchema: () => me, createArraySchema: () => Zn, createConsentConfig: () => T2, createDataTransformationConfig: () => q3, createEnumSchema: () => ei, createMappingRulesConfig: () => M2, createObjectSchema: () => Xn, createPolicyConfig: () => O2, createTupleSchema: () => ni, destinationReferenceJsonSchema: () => Kn, entityJsonSchema: () => pe, eventJsonSchema: () => ae, loopJsonSchema: () => De, mapJsonSchema: () => Ie, orderedPropertiesJsonSchema: () => de, parseConfig: () => Gn, parseSetup: () => An, partialEventJsonSchema: () => se, policyJsonSchema: () => Re, propertiesJsonSchema: () => le, ruleJsonSchema: () => Le, rulesJsonSchema: () => ze, safeParseConfig: () => _n, safeParseSetup: () => Hn, setJsonSchema: () => xe, setupJsonSchema: () => Qn, sourceReferenceJsonSchema: () => $n, sourceTypeJsonSchema: () => ue, userJsonSchema: () => ce, valueConfigJsonSchema: () => Ee, valueJsonSchema: () => Je, z: () => external_exports, zodToSchema: () => ii }); +function t(e5, n5, i3 = "draft-7") { + return external_exports.toJSONSchema(e5, { target: i3 }); +} +var r = external_exports.string(); +var a = external_exports.number(); +var s = external_exports.boolean(); +var c = external_exports.string().min(1); +var l = external_exports.number().int().positive(); +var d2 = external_exports.number().int().nonnegative(); +var p2 = external_exports.number().describe("Tagging version number"); +var u = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]); +var m2 = u.optional(); +var b3 = {}; +n2(b3, { ErrorHandlerSchema: () => h2, HandlerSchema: () => v, LogHandlerSchema: () => S2, StorageSchema: () => f, StorageTypeSchema: () => g2, errorHandlerJsonSchema: () => k3, handlerJsonSchema: () => j2, logHandlerJsonSchema: () => C2, storageJsonSchema: () => w2, storageTypeJsonSchema: () => y3 }); +var g2 = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); +var f = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references"); +var h2 = external_exports.any().describe("Error handler function: (error, state?) => void"); +var S2 = external_exports.any().describe("Log handler function: (message, verbose?) => void"); +var v = external_exports.object({ Error: h2.describe("Error handler function"), Log: S2.describe("Log handler function") }).describe("Handler interface with error and log functions"); +var y3 = t(g2); +var w2 = t(f); +var k3 = t(h2); +var C2 = t(S2); +var j2 = t(v); +var P3 = external_exports.object({ onError: h2.optional().describe("Error handler function: (error, state?) => void"), onLog: S2.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); +var J = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); +var E = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); +var D2 = external_exports.object({}).partial(); +var x2 = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); +var I2 = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial(); +var R = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); +var L3 = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(); +var z2 = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); +function q3(e5, n5) { + return external_exports.object({ data: external_exports.union([e5, n5]).optional().describe("Data transformation rules") }).partial(); +} +function M2(e5) { + return external_exports.object({ mapping: e5.optional().describe("Event mapping rules") }).partial(); +} +function O2(e5) { + return external_exports.object({ policy: e5.optional().describe("Pre-processing policy rules") }).partial(); +} +function T2(e5) { + return external_exports.object({ consent: e5.optional().describe("Required consent states") }).partial(); +} +var U2 = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial(); +var B2 = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial(); +var N2 = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial(); +var V2 = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(); +var W3 = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial(); +var A2 = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial(); +var H2 = {}; +n2(H2, { ConsentSchema: () => X2, DeepPartialEventSchema: () => re2, EntitiesSchema: () => ie, EntitySchema: () => ne, EventSchema: () => oe, OrderedPropertiesSchema: () => $3, PartialEventSchema: () => te, PropertiesSchema: () => F2, PropertySchema: () => Q2, PropertyTypeSchema: () => _, SourceSchema: () => ee, SourceTypeSchema: () => K2, UserSchema: () => Y2, VersionSchema: () => Z, consentJsonSchema: () => me, entityJsonSchema: () => pe, eventJsonSchema: () => ae, orderedPropertiesJsonSchema: () => de, partialEventJsonSchema: () => se, propertiesJsonSchema: () => le, sourceTypeJsonSchema: () => ue, userJsonSchema: () => ce }); +var G; +var _ = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), Q2)])); +var Q2 = external_exports.lazy(() => external_exports.union([_, external_exports.array(_)])); +var F2 = external_exports.record(external_exports.string(), Q2.optional()).describe("Flexible property collection with optional values"); +var $3 = external_exports.record(external_exports.string(), external_exports.tuple([Q2, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); +var K2 = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom"); +var X2 = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); +var Y2 = F2.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); +var Z = F2.and(external_exports.object({ source: r.describe('Walker implementation version (e.g., "2.0.0")'), tagging: p2 })).describe("Walker version information"); +var ee = F2.and(external_exports.object({ type: K2.describe("Source type identifier"), id: r.describe("Source identifier (typically URL on web)"), previous_id: r.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); +var ne = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: F2.describe("Entity-specific properties"), nested: external_exports.array(ne).describe("Nested child entities"), context: $3.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); +var ie = external_exports.array(ne).describe("Array of nested entities"); +var oe = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: F2.describe("Event-specific properties"), context: $3.describe("Ordered context properties with priorities"), globals: F2.describe("Global properties shared across events"), custom: F2.describe("Custom implementation-specific properties"), user: Y2.describe("User identification and attributes"), nested: ie.describe("Related nested entities"), consent: X2.describe("Consent states at event time"), id: c.describe("Unique event identifier (timestamp-based)"), trigger: r.describe("Event trigger identifier"), entity: r.describe("Parsed entity from event name"), action: r.describe("Parsed action from event name"), timestamp: l.describe("Unix timestamp in milliseconds since epoch"), timing: a.describe("Event processing timing information"), group: r.describe("Event grouping identifier"), count: d2.describe("Event count in session"), version: Z.describe("Walker version information"), source: ee.describe("Event source information") }).describe("Complete walkerOS event structure"); +var te = oe.partial().describe("Partial event structure with all fields optional"); +var re2 = oe.partial().describe("Partial event structure with all top-level fields optional"); +var ae = t(oe); +var se = t(te); +var ce = t(Y2); +var le = t(F2); +var de = t($3); +var pe = t(ne); +var ue = t(K2); +var me = t(X2); +var be = {}; +n2(be, { ConfigSchema: () => je, LoopSchema: () => he, MapSchema: () => ve, PolicySchema: () => we, ResultSchema: () => Pe, RuleSchema: () => ke, RulesSchema: () => Ce, SetSchema: () => Se, ValueConfigSchema: () => ye, ValueSchema: () => ge, ValuesSchema: () => fe, configJsonSchema: () => qe, loopJsonSchema: () => De, mapJsonSchema: () => Ie, policyJsonSchema: () => Re, ruleJsonSchema: () => Le, rulesJsonSchema: () => ze, setJsonSchema: () => xe, valueConfigJsonSchema: () => Ee, valueJsonSchema: () => Je }); +var ge = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => G), external_exports.array(ge).describe("Array of values")])); +var fe = external_exports.array(ge).describe("Array of transformation values"); +var he = external_exports.lazy(() => external_exports.tuple([ge, ge]).describe("Loop transformation: [source, transform] tuple for array processing")); +var Se = external_exports.lazy(() => external_exports.array(ge).describe("Set: Array of values for selection or combination")); +var ve = external_exports.lazy(() => external_exports.record(external_exports.string(), ge).describe("Map: Object mapping keys to transformation values")); +var ye = G = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: ve.optional().describe("Object mapping: transform event data to structured output"), loop: he.optional().describe("Loop transformation: [source, transform] for array processing"), set: Se.optional().describe("Set of values: combine or select from multiple values"), consent: X2.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); +var we = external_exports.record(external_exports.string(), ge).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); +var ke = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: X2.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([ge, fe]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: we.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); +var Ce = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([ke, external_exports.array(ke)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); +var je = external_exports.object({ consent: X2.optional().describe("Required consent states to process any events"), data: external_exports.union([ge, fe]).optional().describe("Global data transformation applied to all events"), mapping: Ce.optional().describe("Entity-action specific mapping rules"), policy: we.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); +var Pe = external_exports.object({ eventMapping: ke.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); +var Je = t(ge); +var Ee = t(ye); +var De = t(he); +var xe = t(Se); +var Ie = t(ve); +var Re = t(we); +var Le = t(ke); +var ze = t(Ce); +var qe = t(je); +var Me = {}; +n2(Me, { BatchSchema: () => He, ConfigSchema: () => Oe, ContextSchema: () => Be, DLQSchema: () => Ze, DataSchema: () => Ge, DestinationPolicySchema: () => Ue, DestinationsSchema: () => $e, InitDestinationsSchema: () => Fe, InitSchema: () => Qe, InstanceSchema: () => _e, PartialConfigSchema: () => Te, PushBatchContextSchema: () => Ve, PushContextSchema: () => Ne, PushEventSchema: () => We, PushEventsSchema: () => Ae, PushResultSchema: () => Xe, RefSchema: () => Ke, ResultSchema: () => Ye, batchJsonSchema: () => rn, configJsonSchema: () => en, contextJsonSchema: () => on, instanceJsonSchema: () => an, partialConfigJsonSchema: () => nn, pushContextJsonSchema: () => tn, resultJsonSchema: () => sn }); +var Oe = external_exports.object({ consent: X2.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([ge, fe]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: c.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ce.optional().describe("Entity-action specific mapping rules for this destination"), policy: we.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: h2.optional(), onLog: S2.optional() }).describe("Destination configuration"); +var Te = Oe.partial().describe("Partial destination configuration with all fields optional"); +var Ue = we.describe("Destination policy rules for event pre-processing"); +var Be = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Oe.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions"); +var Ne = Be.extend({ mapping: ke.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); +var Ve = Ne.describe("Batch push context with event-specific mapping"); +var We = external_exports.object({ event: oe.describe("The event to process"), mapping: ke.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); +var Ae = external_exports.array(We).describe("Array of events with mappings"); +var He = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(oe).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: ke.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); +var Ge = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"); +var _e = external_exports.object({ config: Oe.describe("Destination configuration"), queue: external_exports.array(oe).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([oe, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); +var Qe = external_exports.object({ code: _e.describe("Destination instance with implementation"), config: Te.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); +var Fe = external_exports.record(external_exports.string(), Qe).describe("Map of destination IDs to initialization configurations"); +var $e = external_exports.record(external_exports.string(), _e).describe("Map of destination IDs to runtime instances"); +var Ke = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: _e.describe("Destination instance") }).describe("Destination reference (ID + instance)"); +var Xe = external_exports.object({ queue: external_exports.array(oe).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result"); +var Ye = external_exports.object({ successful: external_exports.array(Ke).describe("Destinations that processed successfully"), queued: external_exports.array(Ke).describe("Destinations that queued events"), failed: external_exports.array(Ke).describe("Destinations that failed to process") }).describe("Overall destination processing result"); +var Ze = external_exports.array(external_exports.tuple([oe, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]"); +var en = t(Oe); +var nn = t(Te); +var on = t(Be); +var tn = t(Ne); +var rn = t(He); +var an = t(_e); +var sn = t(Ye); +var cn = {}; +n2(cn, { CommandTypeSchema: () => ln, ConfigSchema: () => dn, DestinationsSchema: () => gn, InitConfigSchema: () => un, InstanceSchema: () => fn, PushContextSchema: () => mn, SessionDataSchema: () => pn, SourcesSchema: () => bn, commandTypeJsonSchema: () => hn, configJsonSchema: () => Sn, initConfigJsonSchema: () => yn, instanceJsonSchema: () => kn, pushContextJsonSchema: () => wn, sessionDataJsonSchema: () => vn }); +var ln = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions"); +var dn = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: p2, globalsStatic: F2.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: h2.optional(), onLog: S2.optional() }).describe("Core collector configuration"); +var pn = F2.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: c.describe("Session identifier").optional(), start: l.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: l.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: c.describe("Device identifier").optional(), count: d2.describe("Event count in session").optional(), runs: d2.describe("Number of runs").optional() })).describe("Session state and tracking data"); +var un = dn.partial().extend({ consent: X2.optional().describe("Initial consent state"), user: Y2.optional().describe("Initial user data"), globals: F2.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: F2.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); +var mn = external_exports.object({ mapping: je.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); +var bn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances"); +var gn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances"); +var fn = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: dn.describe("Current collector configuration"), consent: X2.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: F2.describe("Custom implementation-specific properties"), sources: bn.describe("Registered source instances"), destinations: gn.describe("Registered destination instances"), globals: F2.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(oe).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([pn]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: Y2.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); +var hn = t(ln); +var Sn = t(dn); +var vn = t(pn); +var yn = t(un); +var wn = t(mn); +var kn = t(fn); +var Cn = {}; +n2(Cn, { BaseEnvSchema: () => jn, ConfigSchema: () => Pn, InitSchema: () => Dn, InitSourceSchema: () => xn, InitSourcesSchema: () => In, InstanceSchema: () => En, PartialConfigSchema: () => Jn, baseEnvJsonSchema: () => Rn, configJsonSchema: () => Ln, initSourceJsonSchema: () => Mn, initSourcesJsonSchema: () => On, instanceJsonSchema: () => qn, partialConfigJsonSchema: () => zn }); +var jn = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); +var Pn = je.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: jn.optional().describe("Environment dependencies (platform-specific)"), id: c.describe("Source identifier (defaults to source key)").optional(), onError: h2.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); +var Jn = Pn.partial().describe("Partial source configuration with all fields optional"); +var En = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Pn.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); +var Dn = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise"); +var xn = external_exports.object({ code: Dn.describe("Source initialization function"), config: Jn.optional().describe("Partial configuration overrides"), env: jn.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); +var In = external_exports.record(external_exports.string(), xn).describe("Map of source IDs to initialization configurations"); +var Rn = t(jn); +var Ln = t(Pn); +var zn = t(Jn); +var qn = t(En); +var Mn = t(xn); +var On = t(In); +var Tn = {}; +n2(Tn, { ConfigSchema: () => Vn, DestinationReferenceSchema: () => Nn, PrimitiveSchema: () => Un, SetupSchema: () => Wn, SourceReferenceSchema: () => Bn, configJsonSchema: () => Fn, destinationReferenceJsonSchema: () => Kn, parseConfig: () => Gn, parseSetup: () => An, safeParseConfig: () => _n, safeParseSetup: () => Hn, setupJsonSchema: () => Qn, sourceReferenceJsonSchema: () => $n }); +var Un = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean"); +var Bn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary.") }).describe("Source package reference with configuration"); +var Nn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration") }).describe("Destination package reference with configuration"); +var Vn = external_exports.object({ platform: external_exports.enum(["web", "server"], { error: 'Platform must be "web" or "server"' }).describe('Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection'), sources: external_exports.record(external_exports.string(), Bn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), Nn).optional().describe("Destination configurations (data output) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Environment-specific variables (override root-level variables)") }).passthrough().describe("Single environment configuration for one deployment target"); +var Wn = external_exports.object({ version: external_exports.literal(1, { error: "Only version 1 is currently supported" }).describe("Configuration schema version (currently only 1 is supported)"), $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'), variables: external_exports.record(external_exports.string(), Un).optional().describe("Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)"), definitions: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Reusable configuration definitions (reference with JSON Schema $ref syntax)"), environments: external_exports.record(external_exports.string(), Vn).refine((e5) => Object.keys(e5).length > 0, { message: "At least one environment is required" }).describe("Named environment configurations (e.g., web_prod, server_stage)") }).describe("Complete multi-environment walkerOS configuration (walkeros.config.json)"); +function An(e5) { + return Wn.parse(e5); +} +function Hn(e5) { + return Wn.safeParse(e5); +} +function Gn(e5) { + return Vn.parse(e5); +} +function _n(e5) { + return Vn.safeParse(e5); +} +var Qn = external_exports.toJSONSchema(Wn, { target: "draft-7" }); +var Fn = t(Vn); +var $n = t(Bn); +var Kn = t(Nn); +function Xn(e5, n5) { + const i3 = [], o2 = {}; + for (const [n6, t4] of Object.entries(e5)) { + t4.required && i3.push(n6); + const e6 = { type: t4.type }; + if (t4.description && (e6.description = t4.description), t4.pattern && (e6.pattern = t4.pattern), void 0 !== t4.minLength && (e6.minLength = t4.minLength), void 0 !== t4.maxLength && (e6.maxLength = t4.maxLength), void 0 !== t4.minimum && (e6.minimum = t4.minimum), void 0 !== t4.maximum && (e6.maximum = t4.maximum), t4.enum && (e6.enum = [...t4.enum]), void 0 !== t4.default && (e6.default = t4.default), "object" === t4.type && t4.properties) { + const n7 = {}; + for (const [e7, i4] of Object.entries(t4.properties)) + n7[e7] = Yn(i4); + e6.properties = n7; + } + "array" === t4.type && t4.items && (e6.items = Yn(t4.items)), o2[n6] = e6; + } + const t3 = { type: "object", properties: o2 }; + return n5 && (t3.title = n5), i3.length > 0 && (t3.required = i3), t3; +} +function Yn(e5) { + const n5 = { type: e5.type }; + if (e5.description && (n5.description = e5.description), e5.pattern && (n5.pattern = e5.pattern), void 0 !== e5.minLength && (n5.minLength = e5.minLength), void 0 !== e5.maxLength && (n5.maxLength = e5.maxLength), void 0 !== e5.minimum && (n5.minimum = e5.minimum), void 0 !== e5.maximum && (n5.maximum = e5.maximum), e5.enum && (n5.enum = [...e5.enum]), void 0 !== e5.default && (n5.default = e5.default), "object" === e5.type && e5.properties) { + const i3 = {}; + for (const [n6, o2] of Object.entries(e5.properties)) + i3[n6] = Yn(o2); + n5.properties = i3; + } + return "array" === e5.type && e5.items && (n5.items = Yn(e5.items)), n5; +} +function Zn(e5, n5) { + const i3 = { type: "array", items: Yn(e5) }; + return void 0 !== n5?.minItems && (i3.minItems = n5.minItems), void 0 !== n5?.maxItems && (i3.maxItems = n5.maxItems), n5?.description && (i3.description = n5.description), n5?.title && (i3.title = n5.title), i3; +} +function ei(e5, n5 = "string", i3) { + const o2 = { type: n5, enum: [...e5] }; + return i3?.description && (o2.description = i3.description), i3?.title && (o2.title = i3.title), o2; +} +function ni(e5, n5, i3) { + return Zn({ type: "object" }, { minItems: 2, maxItems: 2, description: i3 || "Tuple with exactly 2 elements [source, transform]" }); +} +function ii(e5) { + return external_exports.toJSONSchema(e5, { target: "draft-7" }); +} + +// node_modules/@walkeros/server-source-express/dist/index.mjs +var r2 = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]); +var n3 = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.literal("*")]); +var a2 = external_exports.object({ origin: n3.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: external_exports.array(r2).describe("Allowed HTTP methods").optional(), headers: external_exports.array(external_exports.string()).describe("Allowed request headers").optional(), credentials: external_exports.boolean().describe("Allow credentials (cookies, authorization headers)").optional(), maxAge: external_exports.number().int().positive().describe("Preflight cache duration in seconds").optional() }); +var l2 = external_exports.object({ port: external_exports.number().int().min(0).max(65535).describe("HTTP server port to listen on. Use 0 for random available port. If not provided, server will not start (app only mode)").optional(), path: external_exports.string().describe("Event collection endpoint path").default("/collect"), cors: external_exports.union([external_exports.boolean(), a2]).describe("CORS configuration: false = disabled, true = allow all origins (default), object = custom configuration").default(true), status: external_exports.boolean().describe("Enable health check endpoints (/health, /ready)").default(true) }); +function c2(e5, o2 = true) { + if (false !== o2) + if (true === o2) + e5.set("Access-Control-Allow-Origin", "*"), e5.set("Access-Control-Allow-Methods", "GET, POST, OPTIONS"), e5.set("Access-Control-Allow-Headers", "Content-Type"); + else { + if (o2.origin) { + const s3 = Array.isArray(o2.origin) ? o2.origin.join(", ") : o2.origin; + e5.set("Access-Control-Allow-Origin", s3); + } + o2.methods && e5.set("Access-Control-Allow-Methods", o2.methods.join(", ")), o2.headers && e5.set("Access-Control-Allow-Headers", o2.headers.join(", ")), o2.credentials && e5.set("Access-Control-Allow-Credentials", "true"), o2.maxAge && e5.set("Access-Control-Max-Age", String(o2.maxAge)); + } +} +var d3 = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64"); +var p3 = async (t3, r3) => { + const n5 = l2.parse(t3.settings || {}), a4 = e3(); + if (a4.use(e3.json({ limit: "1mb" })), false !== n5.cors) { + const e5 = true === n5.cors ? {} : n5.cors; + a4.use(o(e5)); + } + const i3 = async (e5, o2) => { + try { + if ("OPTIONS" === e5.method) + return c2(o2, n5.cors), void o2.status(204).send(); + if ("GET" === e5.method) { + const t4 = Y(e5.url); + return t4 && "object" == typeof t4 && await r3.push(t4), o2.set("Content-Type", "image/gif"), o2.set("Cache-Control", "no-cache, no-store, must-revalidate"), void o2.send(d3); + } + if ("POST" === e5.method) { + const s3 = e5.body; + return s3 && "object" == typeof s3 ? (await r3.push(s3), void o2.json({ success: true, timestamp: Date.now() })) : void o2.status(400).json({ success: false, error: "Invalid event: body must be an object" }); + } + o2.status(405).json({ success: false, error: "Method not allowed. Use POST, GET, or OPTIONS." }); + } catch (e6) { + o2.status(500).json({ success: false, error: e6 instanceof Error ? e6.message : "Internal server error" }); + } + }; + let p4; + if (a4.post(n5.path, i3), a4.get(n5.path, i3), a4.options(n5.path, i3), n5.status && (a4.get("/health", (e5, o2) => { + o2.json({ status: "ok", timestamp: Date.now(), source: "express" }); + }), a4.get("/ready", (e5, o2) => { + o2.json({ status: "ready", timestamp: Date.now(), source: "express" }); + })), void 0 !== n5.port) { + p4 = a4.listen(n5.port, () => { + console.log(`\u2705 Express source listening on port ${n5.port}`), console.log(` POST ${n5.path} - Event collection (JSON body)`), console.log(` GET ${n5.path} - Pixel tracking (query params)`), console.log(` OPTIONS ${n5.path} - CORS preflight`), n5.status && (console.log(" GET /health - Health check"), console.log(" GET /ready - Readiness check")); + }); + const e5 = () => { + p4 && p4.close(); + }; + process.on("SIGTERM", e5), process.on("SIGINT", e5); + } + return { type: "express", config: { ...t3, settings: n5 }, push: i3, app: a4, server: p4 }; +}; + +// node_modules/@walkeros/destination-demo/dist/index.mjs +var e4 = Object.defineProperty; +var n4 = (n5, o2) => { + for (var i3 in o2) + e4(n5, i3, { get: o2[i3], enumerable: true }); +}; +var i2 = {}; +n4(i2, { env: () => t2 }); +var t2 = {}; +n4(t2, { init: () => s2, push: () => a3, simulation: () => l3 }); +var s2 = { log: void 0 }; +var a3 = { log: Object.assign(() => { +}, {}) }; +var l3 = ["call:log"]; +var g3 = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e5, env: n5 }) { + (n5?.log || console.log)(`[${{ name: "demo", ...e5?.settings }.name}] initialized`); +}, push(e5, { config: n5, env: o2 }) { + const i3 = o2?.log || console.log, t3 = { name: "demo", ...n5?.settings }, s3 = t3.values ? function(e6, n6) { + const o3 = {}; + for (const i4 of n6) { + const n7 = i4.split(".").reduce((e7, n8) => e7?.[n8], e6); + void 0 !== n7 && (o3[i4] = n7); + } + return o3; + }(e5, t3.values) : e5; + i3(`[${t3.name}] ${JSON.stringify(s3, null, 2)}`); } }; // entry.js async function entry_default(context = {}) { - const { tracker } = context; - const __simulationTracker = tracker; - const window = typeof globalThis.window !== "undefined" ? globalThis.window : void 0; - const document2 = typeof globalThis.document !== "undefined" ? globalThis.document : void 0; - const config = { + const config2 = { sources: { http: { - code: p, + code: p3, config: { settings: { path: "/collect", @@ -792,7 +13508,7 @@ async function entry_default(context = {}) { }, destinations: { demo: { - code: g, + code: g3, config: { settings: { name: "Server Collection Demo", @@ -816,7 +13532,7 @@ async function entry_default(context = {}) { } } }; - const result = await T2(config); + const result = await z(config2); return result; } export { diff --git a/packages/cli/examples/server-collection.json b/packages/cli/examples/server-collection.json deleted file mode 100644 index 663d0e169..000000000 --- a/packages/cli/examples/server-collection.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "flow": { - "platform": "server", - "sources": { - "http": { - "code": "sourceExpress", - "config": { - "settings": { - "path": "/collect", - "port": 8080, - "cors": true, - "healthCheck": true - } - } - } - }, - "destinations": { - "datamanager": { - "code": "destinationDataManager", - "config": { - "settings": { - "containerId": "${GTM_CONTAINER_ID:GTM-XXXXXXX}", - "serverUrl": "${GTM_SERVER_URL:https://gtm.example.com}" - }, - "mapping": { - "page": { - "view": { - "name": "page_view", - "data": { - "map": { - "page_title": "data.title", - "page_location": "data.url", - "page_path": "data.path", - "client_id": "user.id", - "session_id": "user.session" - } - } - } - }, - "product": { - "view": { - "name": "view_item", - "data": { - "map": { - "currency": { "value": "USD" }, - "value": "data.price", - "items": { - "loop": [ - "data", - { - "map": { - "item_id": "id", - "item_name": "name", - "price": "price" - } - } - ] - } - } - } - }, - "add": { - "name": "add_to_cart", - "data": { - "map": { - "currency": { "value": "USD" }, - "value": "data.price", - "items": { - "loop": [ - "data", - { - "map": { - "item_id": "id", - "item_name": "name", - "price": "price", - "quantity": "quantity" - } - } - ] - } - } - } - } - }, - "order": { - "complete": { - "name": "purchase", - "data": { - "map": { - "transaction_id": "data.id", - "currency": { "value": "USD" }, - "value": "data.total", - "affiliation": "data.affiliation", - "items": { - "loop": [ - "nested.product", - { - "map": { - "item_id": "data.id", - "item_name": "data.name", - "price": "data.price", - "quantity": "data.quantity" - } - } - ] - } - } - } - } - } - } - } - }, - "demo": { - "code": "destinationDemo", - "config": { - "settings": { - "name": "Server Collection Demo", - "values": ["name", "data", "context", "user", "nested", "timestamp"] - } - } - } - }, - "collector": { - "run": true, - "globals": { - "environment": "production", - "version": "1.0.0" - } - } - }, - "build": { - "packages": { - "@walkeros/collector": { - "version": "latest", - "imports": ["startFlow"] - }, - "@walkeros/server-source-express": { - "version": "latest", - "imports": ["sourceExpress"] - }, - "@walkeros/server-destination-datamanager": { - "version": "latest", - "imports": ["destinationDataManager"] - }, - "@walkeros/destination-demo": { - "version": "latest", - "imports": ["destinationDemo"] - } - }, - "code": "// Server-side event collection and forwarding\n// To add custom API forwarding, create a destination using sendServer from @walkeros/server-core:\n// import { sendServer } from '@walkeros/server-core';\n// const customAPI = {\n// push: async (event) => {\n// await sendServer('https://example.com/api/events', event, {\n// headers: { 'Authorization': 'Bearer TOKEN' },\n// method: 'POST'\n// });\n// }\n// };\n", - "template": "../templates/base.hbs", - "output": "server-collection-bundle.mjs", - "tempDir": "/tmp" - } -} diff --git a/packages/cli/examples/test.html b/packages/cli/examples/test.html new file mode 100644 index 000000000..213fd0e76 --- /dev/null +++ b/packages/cli/examples/test.html @@ -0,0 +1,43 @@ + + + + + + walkerOS Web Bundle Test + + +

walkerOS Web Bundle Test

+
Loading...
+ + + + + + + + diff --git a/packages/cli/examples/web-serve.js b/packages/cli/examples/web-serve.js new file mode 100644 index 000000000..ff413e647 --- /dev/null +++ b/packages/cli/examples/web-serve.js @@ -0,0 +1,25503 @@ +'use strict'; +(() => { + var _$ = Object.defineProperty; + var et = (e, t) => { + for (var i in t) _$(e, i, { get: t[i], enumerable: !0 }); + }; + var d = {}; + et(d, { + $brand: () => pr, + $input: () => Ms, + $output: () => Vs, + NEVER: () => zo, + TimePrecision: () => Gs, + ZodAny: () => zp, + ZodArray: () => Pp, + ZodBase64: () => lc, + ZodBase64URL: () => dc, + ZodBigInt: () => En, + ZodBigIntFormat: () => fc, + ZodBoolean: () => Zn, + ZodCIDRv4: () => uc, + ZodCIDRv6: () => cc, + ZodCUID: () => tc, + ZodCUID2: () => nc, + ZodCatch: () => Xp, + ZodCodec: () => wc, + ZodCustom: () => _i, + ZodCustomStringFormat: () => Nn, + ZodDate: () => bi, + ZodDefault: () => Mp, + ZodDiscriminatedUnion: () => Np, + ZodE164: () => mc, + ZodEmail: () => Yu, + ZodEmoji: () => Qu, + ZodEnum: () => Un, + ZodError: () => Xk, + ZodFile: () => Jp, + ZodFirstPartyTypeKind: () => Sc, + ZodFunction: () => af, + ZodGUID: () => pi, + ZodIPv4: () => ac, + ZodIPv6: () => sc, + ZodISODate: () => ci, + ZodISODateTime: () => ui, + ZodISODuration: () => di, + ZodISOTime: () => li, + ZodIntersection: () => Dp, + ZodIssueCode: () => sw, + ZodJWT: () => pc, + ZodKSUID: () => oc, + ZodLazy: () => nf, + ZodLiteral: () => Rp, + ZodMap: () => Cp, + ZodNaN: () => Yp, + ZodNanoID: () => ec, + ZodNever: () => Op, + ZodNonOptional: () => kc, + ZodNull: () => Sp, + ZodNullable: () => Vp, + ZodNumber: () => Dn, + ZodNumberFormat: () => Lt, + ZodObject: () => $i, + ZodOptional: () => _c, + ZodPipe: () => xc, + ZodPrefault: () => Bp, + ZodPromise: () => of, + ZodReadonly: () => Qp, + ZodRealError: () => ce, + ZodRecord: () => bc, + ZodSet: () => Lp, + ZodString: () => Pn, + ZodStringFormat: () => M, + ZodSuccess: () => qp, + ZodSymbol: () => xp, + ZodTemplateLiteral: () => tf, + ZodTransform: () => Fp, + ZodTuple: () => Ep, + ZodType: () => A, + ZodULID: () => rc, + ZodURL: () => hi, + ZodUUID: () => Te, + ZodUndefined: () => wp, + ZodUnion: () => gc, + ZodUnknown: () => jp, + ZodVoid: () => Up, + ZodXID: () => ic, + _ZodString: () => Hu, + _default: () => Wp, + _function: () => ew, + any: () => Zx, + array: () => yi, + base64: () => hx, + base64url: () => bx, + bigint: () => Ox, + boolean: () => kp, + catch: () => Hp, + check: () => tw, + cidrv4: () => vx, + cidrv6: () => gx, + clone: () => te, + codec: () => Hx, + coerce: () => Ic, + config: () => q, + core: () => Ee, + cuid: () => ux, + cuid2: () => cx, + custom: () => nw, + date: () => Tx, + decode: () => Fu, + decodeAsync: () => Mu, + discriminatedUnion: () => Jx, + e164: () => yx, + email: () => Yk, + emoji: () => ax, + encode: () => Ju, + encodeAsync: () => Vu, + endsWith: () => xn, + enum: () => yc, + file: () => Gx, + flattenError: () => on, + float32: () => Sx, + float64: () => Ix, + formatError: () => an, + function: () => ew, + getErrorMap: () => cw, + globalRegistry: () => Ue, + gt: () => De, + gte: () => ue, + guid: () => Qk, + hash: () => wx, + hex: () => xx, + hostname: () => kx, + httpUrl: () => ox, + includes: () => _n, + instanceof: () => rw, + int: () => Xu, + int32: () => zx, + int64: () => Ux, + intersection: () => Zp, + ipv4: () => px, + ipv6: () => fx, + iso: () => mi, + json: () => ow, + jwt: () => $x, + keyof: () => Ax, + ksuid: () => mx, + lazy: () => rf, + length: () => Tt, + literal: () => Bx, + locales: () => fn, + looseObject: () => Rx, + lowercase: () => yn, + lt: () => Ne, + lte: () => he, + map: () => Vx, + maxLength: () => Et, + maxSize: () => Zt, + mime: () => wn, + minLength: () => Ge, + minSize: () => ot, + multipleOf: () => it, + nan: () => Xx, + nanoid: () => sx, + nativeEnum: () => Wx, + negative: () => ku, + never: () => vc, + nonnegative: () => wu, + nonoptional: () => Kp, + nonpositive: () => xu, + normalize: () => Sn, + null: () => Ip, + nullable: () => vi, + nullish: () => Kx, + number: () => _p, + object: () => Cx, + optional: () => fi, + overwrite: () => Ze, + parse: () => Au, + parseAsync: () => Cu, + partialRecord: () => Fx, + pipe: () => gi, + positive: () => _u, + prefault: () => Gp, + preprocess: () => aw, + prettifyError: () => Co, + promise: () => Qx, + property: () => Su, + readonly: () => ef, + record: () => Ap, + refine: () => sf, + regex: () => bn, + regexes: () => ge, + registry: () => Jr, + safeDecode: () => Bu, + safeDecodeAsync: () => Ku, + safeEncode: () => Wu, + safeEncodeAsync: () => Gu, + safeParse: () => Lu, + safeParseAsync: () => Ru, + set: () => Mx, + setErrorMap: () => uw, + size: () => hn, + startsWith: () => kn, + strictObject: () => Lx, + string: () => qu, + stringFormat: () => _x, + stringbool: () => iw, + success: () => qx, + superRefine: () => uf, + symbol: () => Nx, + templateLiteral: () => Yx, + toJSONSchema: () => Nu, + toLowerCase: () => zn, + toUpperCase: () => jn, + transform: () => $c, + treeifyError: () => Ao, + trim: () => In, + tuple: () => Tp, + uint32: () => jx, + uint64: () => Px, + ulid: () => lx, + undefined: () => Dx, + union: () => hc, + unknown: () => Ct, + uppercase: () => $n, + url: () => ix, + util: () => O, + uuid: () => ex, + uuidv4: () => tx, + uuidv6: () => nx, + uuidv7: () => rx, + void: () => Ex, + xid: () => dx, + }); + var Ee = {}; + et(Ee, { + $ZodAny: () => ms, + $ZodArray: () => hs, + $ZodAsyncError: () => ke, + $ZodBase64: () => ns, + $ZodBase64URL: () => rs, + $ZodBigInt: () => Er, + $ZodBigIntFormat: () => us, + $ZodBoolean: () => ln, + $ZodCIDRv4: () => Qa, + $ZodCIDRv6: () => es, + $ZodCUID: () => Fa, + $ZodCUID2: () => Va, + $ZodCatch: () => Zs, + $ZodCheck: () => B, + $ZodCheckBigIntFormat: () => ba, + $ZodCheckEndsWith: () => Ua, + $ZodCheckGreaterThan: () => jr, + $ZodCheckIncludes: () => ja, + $ZodCheckLengthEquals: () => wa, + $ZodCheckLessThan: () => zr, + $ZodCheckLowerCase: () => Ia, + $ZodCheckMaxLength: () => ka, + $ZodCheckMaxSize: () => ya, + $ZodCheckMimeType: () => Na, + $ZodCheckMinLength: () => xa, + $ZodCheckMinSize: () => $a, + $ZodCheckMultipleOf: () => ga, + $ZodCheckNumberFormat: () => ha, + $ZodCheckOverwrite: () => Da, + $ZodCheckProperty: () => Pa, + $ZodCheckRegex: () => Sa, + $ZodCheckSizeEquals: () => _a, + $ZodCheckStartsWith: () => Oa, + $ZodCheckStringFormat: () => Nt, + $ZodCheckUpperCase: () => za, + $ZodCodec: () => dn, + $ZodCustom: () => Fs, + $ZodCustomStringFormat: () => as, + $ZodDate: () => gs, + $ZodDefault: () => Us, + $ZodDiscriminatedUnion: () => ys, + $ZodE164: () => is, + $ZodEmail: () => Ca, + $ZodEmoji: () => Ra, + $ZodEncodeError: () => Je, + $ZodEnum: () => ws, + $ZodError: () => rn, + $ZodFile: () => Is, + $ZodFunction: () => Ls, + $ZodGUID: () => Ta, + $ZodIPv4: () => Ha, + $ZodIPv6: () => Ya, + $ZodISODate: () => Ka, + $ZodISODateTime: () => Ga, + $ZodISODuration: () => Xa, + $ZodISOTime: () => qa, + $ZodIntersection: () => $s, + $ZodJWT: () => os, + $ZodKSUID: () => Ba, + $ZodLazy: () => Js, + $ZodLiteral: () => Ss, + $ZodMap: () => ks, + $ZodNaN: () => Es, + $ZodNanoID: () => Ja, + $ZodNever: () => fs, + $ZodNonOptional: () => Ns, + $ZodNull: () => ds, + $ZodNullable: () => Os, + $ZodNumber: () => Zr, + $ZodNumberFormat: () => ss, + $ZodObject: () => xm, + $ZodObjectJIT: () => bs, + $ZodOptional: () => js, + $ZodPipe: () => Ts, + $ZodPrefault: () => Ps, + $ZodPromise: () => Rs, + $ZodReadonly: () => As, + $ZodRealError: () => se, + $ZodRecord: () => _s, + $ZodRegistry: () => Dt, + $ZodSet: () => xs, + $ZodString: () => rt, + $ZodStringFormat: () => V, + $ZodSuccess: () => Ds, + $ZodSymbol: () => cs, + $ZodTemplateLiteral: () => Cs, + $ZodTransform: () => zs, + $ZodTuple: () => Ar, + $ZodType: () => D, + $ZodULID: () => Ma, + $ZodURL: () => La, + $ZodUUID: () => Aa, + $ZodUndefined: () => ls, + $ZodUnion: () => Tr, + $ZodUnknown: () => ps, + $ZodVoid: () => vs, + $ZodXID: () => Wa, + $brand: () => pr, + $constructor: () => h, + $input: () => Ms, + $output: () => Vs, + Doc: () => cn, + JSONSchema: () => bp, + JSONSchemaGenerator: () => On, + NEVER: () => zo, + TimePrecision: () => Gs, + _any: () => fu, + _array: () => Iu, + _base64: () => ii, + _base64url: () => oi, + _bigint: () => su, + _boolean: () => ou, + _catch: () => Vk, + _check: () => hp, + _cidrv4: () => ni, + _cidrv6: () => ri, + _coercedBigint: () => uu, + _coercedBoolean: () => au, + _coercedDate: () => yu, + _coercedNumber: () => Qs, + _coercedString: () => Bs, + _cuid: () => qr, + _cuid2: () => Xr, + _custom: () => ju, + _date: () => bu, + _decode: () => yr, + _decodeAsync: () => _r, + _default: () => Rk, + _discriminatedUnion: () => jk, + _e164: () => ai, + _email: () => Fr, + _emoji: () => Gr, + _encode: () => br, + _encodeAsync: () => $r, + _endsWith: () => xn, + _enum: () => Zk, + _file: () => zu, + _float32: () => tu, + _float64: () => nu, + _gt: () => De, + _gte: () => ue, + _guid: () => vn, + _includes: () => _n, + _int: () => eu, + _int32: () => ru, + _int64: () => cu, + _intersection: () => Ok, + _ipv4: () => ei, + _ipv6: () => ti, + _isoDate: () => qs, + _isoDateTime: () => Ks, + _isoDuration: () => Hs, + _isoTime: () => Xs, + _jwt: () => si, + _ksuid: () => Qr, + _lazy: () => Gk, + _length: () => Tt, + _literal: () => Tk, + _lowercase: () => yn, + _lt: () => Ne, + _lte: () => he, + _map: () => Nk, + _max: () => he, + _maxLength: () => Et, + _maxSize: () => Zt, + _mime: () => wn, + _min: () => ue, + _minLength: () => Ge, + _minSize: () => ot, + _multipleOf: () => it, + _nan: () => $u, + _nanoid: () => Kr, + _nativeEnum: () => Ek, + _negative: () => ku, + _never: () => gu, + _nonnegative: () => wu, + _nonoptional: () => Jk, + _nonpositive: () => xu, + _normalize: () => Sn, + _null: () => pu, + _nullable: () => Lk, + _number: () => Ys, + _optional: () => Ck, + _overwrite: () => Ze, + _parse: () => jt, + _parseAsync: () => Ot, + _pipe: () => Mk, + _positive: () => _u, + _promise: () => Kk, + _property: () => Su, + _readonly: () => Wk, + _record: () => Pk, + _refine: () => Ou, + _regex: () => bn, + _safeDecode: () => xr, + _safeDecodeAsync: () => Sr, + _safeEncode: () => kr, + _safeEncodeAsync: () => wr, + _safeParse: () => Ut, + _safeParseAsync: () => Pt, + _set: () => Dk, + _size: () => hn, + _startsWith: () => kn, + _string: () => Ws, + _stringFormat: () => At, + _stringbool: () => Pu, + _success: () => Fk, + _superRefine: () => Uu, + _symbol: () => du, + _templateLiteral: () => Bk, + _toLowerCase: () => zn, + _toUpperCase: () => jn, + _transform: () => Ak, + _trim: () => In, + _tuple: () => Uk, + _uint32: () => iu, + _uint64: () => lu, + _ulid: () => Hr, + _undefined: () => mu, + _union: () => zk, + _unknown: () => vu, + _uppercase: () => $n, + _url: () => gn, + _uuid: () => Vr, + _uuidv4: () => Mr, + _uuidv6: () => Wr, + _uuidv7: () => Br, + _void: () => hu, + _xid: () => Yr, + clone: () => te, + config: () => q, + decode: () => q$, + decodeAsync: () => H$, + encode: () => K$, + encodeAsync: () => X$, + flattenError: () => on, + formatError: () => an, + globalConfig: () => Xt, + globalRegistry: () => Ue, + isValidBase64: () => ts, + isValidBase64URL: () => ym, + isValidJWT: () => $m, + locales: () => fn, + parse: () => gr, + parseAsync: () => hr, + prettifyError: () => Co, + regexes: () => ge, + registry: () => Jr, + safeDecode: () => Q$, + safeDecodeAsync: () => t_, + safeEncode: () => Y$, + safeEncodeAsync: () => e_, + safeParse: () => Lo, + safeParseAsync: () => Ro, + toDotPath: () => nm, + toJSONSchema: () => Nu, + treeifyError: () => Ao, + util: () => O, + version: () => Za, + }); + var zo = Object.freeze({ status: 'aborted' }); + function h(e, t, i) { + function n(u, a) { + var c; + (Object.defineProperty(u, '_zod', { + value: u._zod ?? {}, + enumerable: !1, + }), + (c = u._zod).traits ?? (c.traits = new Set()), + u._zod.traits.add(e), + t(u, a)); + for (let m in s.prototype) + m in u || + Object.defineProperty(u, m, { value: s.prototype[m].bind(u) }); + ((u._zod.constr = s), (u._zod.def = a)); + } + let r = i?.Parent ?? Object; + class o extends r {} + Object.defineProperty(o, 'name', { value: e }); + function s(u) { + var a; + let c = i?.Parent ? new o() : this; + (n(c, u), (a = c._zod).deferred ?? (a.deferred = [])); + for (let m of c._zod.deferred) m(); + return c; + } + return ( + Object.defineProperty(s, 'init', { value: n }), + Object.defineProperty(s, Symbol.hasInstance, { + value: (u) => + i?.Parent && u instanceof i.Parent ? !0 : u?._zod?.traits?.has(e), + }), + Object.defineProperty(s, 'name', { value: e }), + s + ); + } + var pr = Symbol('zod_brand'), + ke = class extends Error { + constructor() { + super( + 'Encountered Promise during synchronous parse. Use .parseAsync() instead.', + ); + } + }, + Je = class extends Error { + constructor(t) { + (super(`Encountered unidirectional transform during encode: ${t}`), + (this.name = 'ZodEncodeError')); + } + }, + Xt = {}; + function q(e) { + return (e && Object.assign(Xt, e), Xt); + } + var O = {}; + et(O, { + BIGINT_FORMAT_RANGES: () => To, + Class: () => Oo, + NUMBER_FORMAT_RANGES: () => Eo, + aborted: () => Be, + allowsEval: () => Po, + assert: () => I$, + assertEqual: () => k$, + assertIs: () => w$, + assertNever: () => S$, + assertNotEqual: () => x$, + assignProp: () => Ve, + base64ToUint8Array: () => Qd, + base64urlToUint8Array: () => V$, + cached: () => It, + captureStackTrace: () => vr, + cleanEnum: () => F$, + cleanRegex: () => Qt, + clone: () => te, + cloneDef: () => j$, + createTransparentProxy: () => Z$, + defineLazy: () => L, + esc: () => fr, + escapeRegex: () => Oe, + extend: () => A$, + finalizeIssue: () => de, + floatSafeRemainder: () => Uo, + getElementAtPath: () => O$, + getEnumValues: () => Yt, + getLengthableOrigin: () => nn, + getParsedType: () => D$, + getSizableOrigin: () => tn, + hexToUint8Array: () => W$, + isObject: () => tt, + isPlainObject: () => We, + issue: () => zt, + joinValues: () => _, + jsonStringifyReplacer: () => St, + merge: () => L$, + mergeDefs: () => Me, + normalizeParams: () => j, + nullish: () => Fe, + numKeys: () => N$, + objectClone: () => z$, + omit: () => T$, + optionalKeys: () => Zo, + partial: () => R$, + pick: () => E$, + prefixIssues: () => le, + primitiveTypes: () => Do, + promiseAllObject: () => U$, + propertyKeyTypes: () => en, + randomString: () => P$, + required: () => J$, + safeExtend: () => C$, + shallowClone: () => No, + stringifyPrimitive: () => I, + uint8ArrayToBase64: () => em, + uint8ArrayToBase64url: () => M$, + uint8ArrayToHex: () => B$, + unwrapMessage: () => Ht, + }); + function k$(e) { + return e; + } + function x$(e) { + return e; + } + function w$(e) {} + function S$(e) { + throw new Error(); + } + function I$(e) {} + function Yt(e) { + let t = Object.values(e).filter((n) => typeof n == 'number'); + return Object.entries(e) + .filter(([n, r]) => t.indexOf(+n) === -1) + .map(([n, r]) => r); + } + function _(e, t = '|') { + return e.map((i) => I(i)).join(t); + } + function St(e, t) { + return typeof t == 'bigint' ? t.toString() : t; + } + function It(e) { + return { + get value() { + { + let i = e(); + return (Object.defineProperty(this, 'value', { value: i }), i); + } + throw new Error('cached value already set'); + }, + }; + } + function Fe(e) { + return e == null; + } + function Qt(e) { + let t = e.startsWith('^') ? 1 : 0, + i = e.endsWith('$') ? e.length - 1 : e.length; + return e.slice(t, i); + } + function Uo(e, t) { + let i = (e.toString().split('.')[1] || '').length, + n = t.toString(), + r = (n.split('.')[1] || '').length; + if (r === 0 && /\d?e-\d?/.test(n)) { + let a = n.match(/\d?e-(\d?)/); + a?.[1] && (r = Number.parseInt(a[1])); + } + let o = i > r ? i : r, + s = Number.parseInt(e.toFixed(o).replace('.', '')), + u = Number.parseInt(t.toFixed(o).replace('.', '')); + return (s % u) / 10 ** o; + } + var Yd = Symbol('evaluating'); + function L(e, t, i) { + let n; + Object.defineProperty(e, t, { + get() { + if (n !== Yd) return (n === void 0 && ((n = Yd), (n = i())), n); + }, + set(r) { + Object.defineProperty(e, t, { value: r }); + }, + configurable: !0, + }); + } + function z$(e) { + return Object.create( + Object.getPrototypeOf(e), + Object.getOwnPropertyDescriptors(e), + ); + } + function Ve(e, t, i) { + Object.defineProperty(e, t, { + value: i, + writable: !0, + enumerable: !0, + configurable: !0, + }); + } + function Me(...e) { + let t = {}; + for (let i of e) { + let n = Object.getOwnPropertyDescriptors(i); + Object.assign(t, n); + } + return Object.defineProperties({}, t); + } + function j$(e) { + return Me(e._zod.def); + } + function O$(e, t) { + return t ? t.reduce((i, n) => i?.[n], e) : e; + } + function U$(e) { + let t = Object.keys(e), + i = t.map((n) => e[n]); + return Promise.all(i).then((n) => { + let r = {}; + for (let o = 0; o < t.length; o++) r[t[o]] = n[o]; + return r; + }); + } + function P$(e = 10) { + let t = 'abcdefghijklmnopqrstuvwxyz', + i = ''; + for (let n = 0; n < e; n++) i += t[Math.floor(Math.random() * t.length)]; + return i; + } + function fr(e) { + return JSON.stringify(e); + } + var vr = + 'captureStackTrace' in Error ? Error.captureStackTrace : (...e) => {}; + function tt(e) { + return typeof e == 'object' && e !== null && !Array.isArray(e); + } + var Po = It(() => { + if (typeof navigator < 'u' && navigator?.userAgent?.includes('Cloudflare')) + return !1; + try { + let e = Function; + return (new e(''), !0); + } catch { + return !1; + } + }); + function We(e) { + if (tt(e) === !1) return !1; + let t = e.constructor; + if (t === void 0) return !0; + let i = t.prototype; + return !( + tt(i) === !1 || + Object.prototype.hasOwnProperty.call(i, 'isPrototypeOf') === !1 + ); + } + function No(e) { + return We(e) ? { ...e } : Array.isArray(e) ? [...e] : e; + } + function N$(e) { + let t = 0; + for (let i in e) Object.prototype.hasOwnProperty.call(e, i) && t++; + return t; + } + var D$ = (e) => { + let t = typeof e; + switch (t) { + case 'undefined': + return 'undefined'; + case 'string': + return 'string'; + case 'number': + return Number.isNaN(e) ? 'nan' : 'number'; + case 'boolean': + return 'boolean'; + case 'function': + return 'function'; + case 'bigint': + return 'bigint'; + case 'symbol': + return 'symbol'; + case 'object': + return Array.isArray(e) + ? 'array' + : e === null + ? 'null' + : e.then && + typeof e.then == 'function' && + e.catch && + typeof e.catch == 'function' + ? 'promise' + : typeof Map < 'u' && e instanceof Map + ? 'map' + : typeof Set < 'u' && e instanceof Set + ? 'set' + : typeof Date < 'u' && e instanceof Date + ? 'date' + : typeof File < 'u' && e instanceof File + ? 'file' + : 'object'; + default: + throw new Error(`Unknown data type: ${t}`); + } + }, + en = new Set(['string', 'number', 'symbol']), + Do = new Set([ + 'string', + 'number', + 'bigint', + 'boolean', + 'symbol', + 'undefined', + ]); + function Oe(e) { + return e.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + function te(e, t, i) { + let n = new e._zod.constr(t ?? e._zod.def); + return ((!t || i?.parent) && (n._zod.parent = e), n); + } + function j(e) { + let t = e; + if (!t) return {}; + if (typeof t == 'string') return { error: () => t }; + if (t?.message !== void 0) { + if (t?.error !== void 0) + throw new Error('Cannot specify both `message` and `error` params'); + t.error = t.message; + } + return ( + delete t.message, + typeof t.error == 'string' ? { ...t, error: () => t.error } : t + ); + } + function Z$(e) { + let t; + return new Proxy( + {}, + { + get(i, n, r) { + return (t ?? (t = e()), Reflect.get(t, n, r)); + }, + set(i, n, r, o) { + return (t ?? (t = e()), Reflect.set(t, n, r, o)); + }, + has(i, n) { + return (t ?? (t = e()), Reflect.has(t, n)); + }, + deleteProperty(i, n) { + return (t ?? (t = e()), Reflect.deleteProperty(t, n)); + }, + ownKeys(i) { + return (t ?? (t = e()), Reflect.ownKeys(t)); + }, + getOwnPropertyDescriptor(i, n) { + return (t ?? (t = e()), Reflect.getOwnPropertyDescriptor(t, n)); + }, + defineProperty(i, n, r) { + return (t ?? (t = e()), Reflect.defineProperty(t, n, r)); + }, + }, + ); + } + function I(e) { + return typeof e == 'bigint' + ? e.toString() + 'n' + : typeof e == 'string' + ? `"${e}"` + : `${e}`; + } + function Zo(e) { + return Object.keys(e).filter( + (t) => e[t]._zod.optin === 'optional' && e[t]._zod.optout === 'optional', + ); + } + var Eo = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE], + }, + To = { + int64: [BigInt('-9223372036854775808'), BigInt('9223372036854775807')], + uint64: [BigInt(0), BigInt('18446744073709551615')], + }; + function E$(e, t) { + let i = e._zod.def, + n = Me(e._zod.def, { + get shape() { + let r = {}; + for (let o in t) { + if (!(o in i.shape)) throw new Error(`Unrecognized key: "${o}"`); + t[o] && (r[o] = i.shape[o]); + } + return (Ve(this, 'shape', r), r); + }, + checks: [], + }); + return te(e, n); + } + function T$(e, t) { + let i = e._zod.def, + n = Me(e._zod.def, { + get shape() { + let r = { ...e._zod.def.shape }; + for (let o in t) { + if (!(o in i.shape)) throw new Error(`Unrecognized key: "${o}"`); + t[o] && delete r[o]; + } + return (Ve(this, 'shape', r), r); + }, + checks: [], + }); + return te(e, n); + } + function A$(e, t) { + if (!We(t)) + throw new Error('Invalid input to extend: expected a plain object'); + let i = e._zod.def.checks; + if (i && i.length > 0) + throw new Error( + 'Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.', + ); + let r = Me(e._zod.def, { + get shape() { + let o = { ...e._zod.def.shape, ...t }; + return (Ve(this, 'shape', o), o); + }, + checks: [], + }); + return te(e, r); + } + function C$(e, t) { + if (!We(t)) + throw new Error('Invalid input to safeExtend: expected a plain object'); + let i = { + ...e._zod.def, + get shape() { + let n = { ...e._zod.def.shape, ...t }; + return (Ve(this, 'shape', n), n); + }, + checks: e._zod.def.checks, + }; + return te(e, i); + } + function L$(e, t) { + let i = Me(e._zod.def, { + get shape() { + let n = { ...e._zod.def.shape, ...t._zod.def.shape }; + return (Ve(this, 'shape', n), n); + }, + get catchall() { + return t._zod.def.catchall; + }, + checks: [], + }); + return te(e, i); + } + function R$(e, t, i) { + let n = Me(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in r)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && + (o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]); + } + else + for (let s in r) + o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]; + return (Ve(this, 'shape', o), o); + }, + checks: [], + }); + return te(t, n); + } + function J$(e, t, i) { + let n = Me(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in o)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && (o[s] = new e({ type: 'nonoptional', innerType: r[s] })); + } + else + for (let s in r) + o[s] = new e({ type: 'nonoptional', innerType: r[s] }); + return (Ve(this, 'shape', o), o); + }, + checks: [], + }); + return te(t, n); + } + function Be(e, t = 0) { + if (e.aborted === !0) return !0; + for (let i = t; i < e.issues.length; i++) + if (e.issues[i]?.continue !== !0) return !0; + return !1; + } + function le(e, t) { + return t.map((i) => { + var n; + return ((n = i).path ?? (n.path = []), i.path.unshift(e), i); + }); + } + function Ht(e) { + return typeof e == 'string' ? e : e?.message; + } + function de(e, t, i) { + let n = { ...e, path: e.path ?? [] }; + if (!e.message) { + let r = + Ht(e.inst?._zod.def?.error?.(e)) ?? + Ht(t?.error?.(e)) ?? + Ht(i.customError?.(e)) ?? + Ht(i.localeError?.(e)) ?? + 'Invalid input'; + n.message = r; + } + return ( + delete n.inst, + delete n.continue, + t?.reportInput || delete n.input, + n + ); + } + function tn(e) { + return e instanceof Set + ? 'set' + : e instanceof Map + ? 'map' + : e instanceof File + ? 'file' + : 'unknown'; + } + function nn(e) { + return Array.isArray(e) + ? 'array' + : typeof e == 'string' + ? 'string' + : 'unknown'; + } + function zt(...e) { + let [t, i, n] = e; + return typeof t == 'string' + ? { message: t, code: 'custom', input: i, inst: n } + : { ...t }; + } + function F$(e) { + return Object.entries(e) + .filter(([t, i]) => Number.isNaN(Number.parseInt(t, 10))) + .map((t) => t[1]); + } + function Qd(e) { + let t = atob(e), + i = new Uint8Array(t.length); + for (let n = 0; n < t.length; n++) i[n] = t.charCodeAt(n); + return i; + } + function em(e) { + let t = ''; + for (let i = 0; i < e.length; i++) t += String.fromCharCode(e[i]); + return btoa(t); + } + function V$(e) { + let t = e.replace(/-/g, '+').replace(/_/g, '/'), + i = '='.repeat((4 - (t.length % 4)) % 4); + return Qd(t + i); + } + function M$(e) { + return em(e).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); + } + function W$(e) { + let t = e.replace(/^0x/, ''); + if (t.length % 2 !== 0) throw new Error('Invalid hex string length'); + let i = new Uint8Array(t.length / 2); + for (let n = 0; n < t.length; n += 2) + i[n / 2] = Number.parseInt(t.slice(n, n + 2), 16); + return i; + } + function B$(e) { + return Array.from(e) + .map((t) => t.toString(16).padStart(2, '0')) + .join(''); + } + var Oo = class { + constructor(...t) {} + }; + var tm = (e, t) => { + ((e.name = '$ZodError'), + Object.defineProperty(e, '_zod', { value: e._zod, enumerable: !1 }), + Object.defineProperty(e, 'issues', { value: t, enumerable: !1 }), + (e.message = JSON.stringify(t, St, 2)), + Object.defineProperty(e, 'toString', { + value: () => e.message, + enumerable: !1, + })); + }, + rn = h('$ZodError', tm), + se = h('$ZodError', tm, { Parent: Error }); + function on(e, t = (i) => i.message) { + let i = {}, + n = []; + for (let r of e.issues) + r.path.length > 0 + ? ((i[r.path[0]] = i[r.path[0]] || []), i[r.path[0]].push(t(r))) + : n.push(t(r)); + return { formErrors: n, fieldErrors: i }; + } + function an(e, t = (i) => i.message) { + let i = { _errors: [] }, + n = (r) => { + for (let o of r.issues) + if (o.code === 'invalid_union' && o.errors.length) + o.errors.map((s) => n({ issues: s })); + else if (o.code === 'invalid_key') n({ issues: o.issues }); + else if (o.code === 'invalid_element') n({ issues: o.issues }); + else if (o.path.length === 0) i._errors.push(t(o)); + else { + let s = i, + u = 0; + for (; u < o.path.length; ) { + let a = o.path[u]; + (u === o.path.length - 1 + ? ((s[a] = s[a] || { _errors: [] }), s[a]._errors.push(t(o))) + : (s[a] = s[a] || { _errors: [] }), + (s = s[a]), + u++); + } + } + }; + return (n(e), i); + } + function Ao(e, t = (i) => i.message) { + let i = { errors: [] }, + n = (r, o = []) => { + var s, u; + for (let a of r.issues) + if (a.code === 'invalid_union' && a.errors.length) + a.errors.map((c) => n({ issues: c }, a.path)); + else if (a.code === 'invalid_key') n({ issues: a.issues }, a.path); + else if (a.code === 'invalid_element') + n({ issues: a.issues }, a.path); + else { + let c = [...o, ...a.path]; + if (c.length === 0) { + i.errors.push(t(a)); + continue; + } + let m = i, + p = 0; + for (; p < c.length; ) { + let f = c[p], + v = p === c.length - 1; + (typeof f == 'string' + ? (m.properties ?? (m.properties = {}), + (s = m.properties)[f] ?? (s[f] = { errors: [] }), + (m = m.properties[f])) + : (m.items ?? (m.items = []), + (u = m.items)[f] ?? (u[f] = { errors: [] }), + (m = m.items[f])), + v && m.errors.push(t(a)), + p++); + } + } + }; + return (n(e), i); + } + function nm(e) { + let t = [], + i = e.map((n) => (typeof n == 'object' ? n.key : n)); + for (let n of i) + typeof n == 'number' + ? t.push(`[${n}]`) + : typeof n == 'symbol' + ? t.push(`[${JSON.stringify(String(n))}]`) + : /[^\w$]/.test(n) + ? t.push(`[${JSON.stringify(n)}]`) + : (t.length && t.push('.'), t.push(n)); + return t.join(''); + } + function Co(e) { + let t = [], + i = [...e.issues].sort( + (n, r) => (n.path ?? []).length - (r.path ?? []).length, + ); + for (let n of i) + (t.push(`✖ ${n.message}`), + n.path?.length && t.push(` → at ${nm(n.path)}`)); + return t.join(` +`); + } + var jt = (e) => (t, i, n, r) => { + let o = n ? Object.assign(n, { async: !1 }) : { async: !1 }, + s = t._zod.run({ value: i, issues: [] }, o); + if (s instanceof Promise) throw new ke(); + if (s.issues.length) { + let u = new (r?.Err ?? e)(s.issues.map((a) => de(a, o, q()))); + throw (vr(u, r?.callee), u); + } + return s.value; + }, + gr = jt(se), + Ot = (e) => async (t, i, n, r) => { + let o = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + s = t._zod.run({ value: i, issues: [] }, o); + if ((s instanceof Promise && (s = await s), s.issues.length)) { + let u = new (r?.Err ?? e)(s.issues.map((a) => de(a, o, q()))); + throw (vr(u, r?.callee), u); + } + return s.value; + }, + hr = Ot(se), + Ut = (e) => (t, i, n) => { + let r = n ? { ...n, async: !1 } : { async: !1 }, + o = t._zod.run({ value: i, issues: [] }, r); + if (o instanceof Promise) throw new ke(); + return o.issues.length + ? { + success: !1, + error: new (e ?? rn)(o.issues.map((s) => de(s, r, q()))), + } + : { success: !0, data: o.value }; + }, + Lo = Ut(se), + Pt = (e) => async (t, i, n) => { + let r = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + o = t._zod.run({ value: i, issues: [] }, r); + return ( + o instanceof Promise && (o = await o), + o.issues.length + ? { success: !1, error: new e(o.issues.map((s) => de(s, r, q()))) } + : { success: !0, data: o.value } + ); + }, + Ro = Pt(se), + br = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return jt(e)(t, i, r); + }, + K$ = br(se), + yr = (e) => (t, i, n) => jt(e)(t, i, n), + q$ = yr(se), + $r = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return Ot(e)(t, i, r); + }, + X$ = $r(se), + _r = (e) => async (t, i, n) => Ot(e)(t, i, n), + H$ = _r(se), + kr = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return Ut(e)(t, i, r); + }, + Y$ = kr(se), + xr = (e) => (t, i, n) => Ut(e)(t, i, n), + Q$ = xr(se), + wr = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return Pt(e)(t, i, r); + }, + e_ = wr(se), + Sr = (e) => async (t, i, n) => Pt(e)(t, i, n), + t_ = Sr(se); + var ge = {}; + et(ge, { + base64: () => ta, + base64url: () => Ir, + bigint: () => ua, + boolean: () => da, + browserEmail: () => c_, + cidrv4: () => Qo, + cidrv6: () => ea, + cuid: () => Jo, + cuid2: () => Fo, + date: () => ia, + datetime: () => aa, + domain: () => d_, + duration: () => Go, + e164: () => ra, + email: () => qo, + emoji: () => Xo, + extendedDuration: () => n_, + guid: () => Ko, + hex: () => m_, + hostname: () => na, + html5Email: () => a_, + idnEmail: () => u_, + integer: () => ca, + ipv4: () => Ho, + ipv6: () => Yo, + ksuid: () => Wo, + lowercase: () => fa, + md5_base64: () => f_, + md5_base64url: () => v_, + md5_hex: () => p_, + nanoid: () => Bo, + null: () => ma, + number: () => la, + rfc5322Email: () => s_, + sha1_base64: () => h_, + sha1_base64url: () => b_, + sha1_hex: () => g_, + sha256_base64: () => $_, + sha256_base64url: () => __, + sha256_hex: () => y_, + sha384_base64: () => x_, + sha384_base64url: () => w_, + sha384_hex: () => k_, + sha512_base64: () => I_, + sha512_base64url: () => z_, + sha512_hex: () => S_, + string: () => sa, + time: () => oa, + ulid: () => Vo, + undefined: () => pa, + unicodeEmail: () => rm, + uppercase: () => va, + uuid: () => nt, + uuid4: () => r_, + uuid6: () => i_, + uuid7: () => o_, + xid: () => Mo, + }); + var Jo = /^[cC][^\s-]{8,}$/, + Fo = /^[0-9a-z]+$/, + Vo = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, + Mo = /^[0-9a-vA-V]{20}$/, + Wo = /^[A-Za-z0-9]{27}$/, + Bo = /^[a-zA-Z0-9_-]{21}$/, + Go = + /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, + n_ = + /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, + Ko = + /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, + nt = (e) => + e + ? new RegExp( + `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`, + ) + : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, + r_ = nt(4), + i_ = nt(6), + o_ = nt(7), + qo = + /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, + a_ = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + s_ = + /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + rm = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, + u_ = rm, + c_ = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + l_ = '^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$'; + function Xo() { + return new RegExp(l_, 'u'); + } + var Ho = + /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, + Yo = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, + Qo = + /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, + ea = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, + ta = + /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, + Ir = /^[A-Za-z0-9_-]*$/, + na = + /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, + d_ = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, + ra = /^\+(?:[0-9]){6,14}[0-9]$/, + im = + '(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))', + ia = new RegExp(`^${im}$`); + function om(e) { + let t = '(?:[01]\\d|2[0-3]):[0-5]\\d'; + return typeof e.precision == 'number' + ? e.precision === -1 + ? `${t}` + : e.precision === 0 + ? `${t}:[0-5]\\d` + : `${t}:[0-5]\\d\\.\\d{${e.precision}}` + : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; + } + function oa(e) { + return new RegExp(`^${om(e)}$`); + } + function aa(e) { + let t = om({ precision: e.precision }), + i = ['Z']; + (e.local && i.push(''), + e.offset && i.push('([+-](?:[01]\\d|2[0-3]):[0-5]\\d)')); + let n = `${t}(?:${i.join('|')})`; + return new RegExp(`^${im}T(?:${n})$`); + } + var sa = (e) => { + let t = e + ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ''}}` + : '[\\s\\S]*'; + return new RegExp(`^${t}$`); + }, + ua = /^-?\d+n?$/, + ca = /^-?\d+$/, + la = /^-?\d+(?:\.\d+)?/, + da = /^(?:true|false)$/i, + ma = /^null$/i; + var pa = /^undefined$/i; + var fa = /^[^A-Z]*$/, + va = /^[^a-z]*$/, + m_ = /^[0-9a-fA-F]*$/; + function sn(e, t) { + return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`); + } + function un(e) { + return new RegExp(`^[A-Za-z0-9_-]{${e}}$`); + } + var p_ = /^[0-9a-fA-F]{32}$/, + f_ = sn(22, '=='), + v_ = un(22), + g_ = /^[0-9a-fA-F]{40}$/, + h_ = sn(27, '='), + b_ = un(27), + y_ = /^[0-9a-fA-F]{64}$/, + $_ = sn(43, '='), + __ = un(43), + k_ = /^[0-9a-fA-F]{96}$/, + x_ = sn(64, ''), + w_ = un(64), + S_ = /^[0-9a-fA-F]{128}$/, + I_ = sn(86, '=='), + z_ = un(86); + var B = h('$ZodCheck', (e, t) => { + var i; + (e._zod ?? (e._zod = {}), + (e._zod.def = t), + (i = e._zod).onattach ?? (i.onattach = [])); + }), + sm = { number: 'number', bigint: 'bigint', object: 'date' }, + zr = h('$ZodCheckLessThan', (e, t) => { + B.init(e, t); + let i = sm[typeof t.value]; + (e._zod.onattach.push((n) => { + let r = n._zod.bag, + o = + (t.inclusive ? r.maximum : r.exclusiveMaximum) ?? + Number.POSITIVE_INFINITY; + t.value < o && + (t.inclusive + ? (r.maximum = t.value) + : (r.exclusiveMaximum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value <= t.value : n.value < t.value) || + n.issues.push({ + origin: i, + code: 'too_big', + maximum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + jr = h('$ZodCheckGreaterThan', (e, t) => { + B.init(e, t); + let i = sm[typeof t.value]; + (e._zod.onattach.push((n) => { + let r = n._zod.bag, + o = + (t.inclusive ? r.minimum : r.exclusiveMinimum) ?? + Number.NEGATIVE_INFINITY; + t.value > o && + (t.inclusive + ? (r.minimum = t.value) + : (r.exclusiveMinimum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value >= t.value : n.value > t.value) || + n.issues.push({ + origin: i, + code: 'too_small', + minimum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + ga = h('$ZodCheckMultipleOf', (e, t) => { + (B.init(e, t), + e._zod.onattach.push((i) => { + var n; + (n = i._zod.bag).multipleOf ?? (n.multipleOf = t.value); + }), + (e._zod.check = (i) => { + if (typeof i.value != typeof t.value) + throw new Error( + 'Cannot mix number and bigint in multiple_of check.', + ); + (typeof i.value == 'bigint' + ? i.value % t.value === BigInt(0) + : Uo(i.value, t.value) === 0) || + i.issues.push({ + origin: typeof i.value, + code: 'not_multiple_of', + divisor: t.value, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + ha = h('$ZodCheckNumberFormat', (e, t) => { + (B.init(e, t), (t.format = t.format || 'float64')); + let i = t.format?.includes('int'), + n = i ? 'int' : 'number', + [r, o] = Eo[t.format]; + (e._zod.onattach.push((s) => { + let u = s._zod.bag; + ((u.format = t.format), + (u.minimum = r), + (u.maximum = o), + i && (u.pattern = ca)); + }), + (e._zod.check = (s) => { + let u = s.value; + if (i) { + if (!Number.isInteger(u)) { + s.issues.push({ + expected: n, + format: t.format, + code: 'invalid_type', + continue: !1, + input: u, + inst: e, + }); + return; + } + if (!Number.isSafeInteger(u)) { + u > 0 + ? s.issues.push({ + input: u, + code: 'too_big', + maximum: Number.MAX_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: n, + continue: !t.abort, + }) + : s.issues.push({ + input: u, + code: 'too_small', + minimum: Number.MIN_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: n, + continue: !t.abort, + }); + return; + } + } + (u < r && + s.issues.push({ + origin: 'number', + input: u, + code: 'too_small', + minimum: r, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + u > o && + s.issues.push({ + origin: 'number', + input: u, + code: 'too_big', + maximum: o, + inst: e, + })); + })); + }), + ba = h('$ZodCheckBigIntFormat', (e, t) => { + B.init(e, t); + let [i, n] = To[t.format]; + (e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), (o.minimum = i), (o.maximum = n)); + }), + (e._zod.check = (r) => { + let o = r.value; + (o < i && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_small', + minimum: i, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + o > n && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_big', + maximum: n, + inst: e, + })); + })); + }), + ya = h('$ZodCheckMaxSize', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + t.maximum < r && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size <= t.maximum || + n.issues.push({ + origin: tn(r), + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + $a = h('$ZodCheckMinSize', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + t.minimum > r && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size >= t.minimum || + n.issues.push({ + origin: tn(r), + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + _a = h('$ZodCheckSizeEquals', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.size), (r.maximum = t.size), (r.size = t.size)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.size; + if (o === t.size) return; + let s = o > t.size; + n.issues.push({ + origin: tn(r), + ...(s + ? { code: 'too_big', maximum: t.size } + : { code: 'too_small', minimum: t.size }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + ka = h('$ZodCheckMaxLength', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + t.maximum < r && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length <= t.maximum) return; + let s = nn(r); + n.issues.push({ + origin: s, + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + xa = h('$ZodCheckMinLength', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + t.minimum > r && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length >= t.minimum) return; + let s = nn(r); + n.issues.push({ + origin: s, + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + wa = h('$ZodCheckLengthEquals', (e, t) => { + var i; + (B.init(e, t), + (i = e._zod.def).when ?? + (i.when = (n) => { + let r = n.value; + return !Fe(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.length), + (r.maximum = t.length), + (r.length = t.length)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.length; + if (o === t.length) return; + let s = nn(r), + u = o > t.length; + n.issues.push({ + origin: s, + ...(u + ? { code: 'too_big', maximum: t.length } + : { code: 'too_small', minimum: t.length }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Nt = h('$ZodCheckStringFormat', (e, t) => { + var i, n; + (B.init(e, t), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), + t.pattern && + (o.patterns ?? (o.patterns = new Set()), + o.patterns.add(t.pattern))); + }), + t.pattern + ? ((i = e._zod).check ?? + (i.check = (r) => { + ((t.pattern.lastIndex = 0), + !t.pattern.test(r.value) && + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: t.format, + input: r.value, + ...(t.pattern ? { pattern: t.pattern.toString() } : {}), + inst: e, + continue: !t.abort, + })); + })) + : ((n = e._zod).check ?? (n.check = () => {}))); + }), + Sa = h('$ZodCheckRegex', (e, t) => { + (Nt.init(e, t), + (e._zod.check = (i) => { + ((t.pattern.lastIndex = 0), + !t.pattern.test(i.value) && + i.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'regex', + input: i.value, + pattern: t.pattern.toString(), + inst: e, + continue: !t.abort, + })); + })); + }), + Ia = h('$ZodCheckLowerCase', (e, t) => { + (t.pattern ?? (t.pattern = fa), Nt.init(e, t)); + }), + za = h('$ZodCheckUpperCase', (e, t) => { + (t.pattern ?? (t.pattern = va), Nt.init(e, t)); + }), + ja = h('$ZodCheckIncludes', (e, t) => { + B.init(e, t); + let i = Oe(t.includes), + n = new RegExp( + typeof t.position == 'number' ? `^.{${t.position}}${i}` : i, + ); + ((t.pattern = n), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + (o.patterns ?? (o.patterns = new Set()), o.patterns.add(n)); + }), + (e._zod.check = (r) => { + r.value.includes(t.includes, t.position) || + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'includes', + includes: t.includes, + input: r.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Oa = h('$ZodCheckStartsWith', (e, t) => { + B.init(e, t); + let i = new RegExp(`^${Oe(t.prefix)}.*`); + (t.pattern ?? (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns ?? (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.startsWith(t.prefix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'starts_with', + prefix: t.prefix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Ua = h('$ZodCheckEndsWith', (e, t) => { + B.init(e, t); + let i = new RegExp(`.*${Oe(t.suffix)}$`); + (t.pattern ?? (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns ?? (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.endsWith(t.suffix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'ends_with', + suffix: t.suffix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function am(e, t, i) { + e.issues.length && t.issues.push(...le(i, e.issues)); + } + var Pa = h('$ZodCheckProperty', (e, t) => { + (B.init(e, t), + (e._zod.check = (i) => { + let n = t.schema._zod.run( + { value: i.value[t.property], issues: [] }, + {}, + ); + if (n instanceof Promise) return n.then((r) => am(r, i, t.property)); + am(n, i, t.property); + })); + }), + Na = h('$ZodCheckMimeType', (e, t) => { + B.init(e, t); + let i = new Set(t.mime); + (e._zod.onattach.push((n) => { + n._zod.bag.mime = t.mime; + }), + (e._zod.check = (n) => { + i.has(n.value.type) || + n.issues.push({ + code: 'invalid_value', + values: t.mime, + input: n.value.type, + inst: e, + continue: !t.abort, + }); + })); + }), + Da = h('$ZodCheckOverwrite', (e, t) => { + (B.init(e, t), + (e._zod.check = (i) => { + i.value = t.tx(i.value); + })); + }); + var cn = class { + constructor(t = []) { + ((this.content = []), (this.indent = 0), this && (this.args = t)); + } + indented(t) { + ((this.indent += 1), t(this), (this.indent -= 1)); + } + write(t) { + if (typeof t == 'function') { + (t(this, { execution: 'sync' }), t(this, { execution: 'async' })); + return; + } + let n = t + .split( + ` +`, + ) + .filter((s) => s), + r = Math.min(...n.map((s) => s.length - s.trimStart().length)), + o = n + .map((s) => s.slice(r)) + .map((s) => ' '.repeat(this.indent * 2) + s); + for (let s of o) this.content.push(s); + } + compile() { + let t = Function, + i = this?.args, + r = [...(this?.content ?? ['']).map((o) => ` ${o}`)]; + return new t( + ...i, + r.join(` +`), + ); + } + }; + var Za = { major: 4, minor: 1, patch: 12 }; + var D = h('$ZodType', (e, t) => { + var i; + (e ?? (e = {}), + (e._zod.def = t), + (e._zod.bag = e._zod.bag || {}), + (e._zod.version = Za)); + let n = [...(e._zod.def.checks ?? [])]; + e._zod.traits.has('$ZodCheck') && n.unshift(e); + for (let r of n) for (let o of r._zod.onattach) o(e); + if (n.length === 0) + ((i = e._zod).deferred ?? (i.deferred = []), + e._zod.deferred?.push(() => { + e._zod.run = e._zod.parse; + })); + else { + let r = (s, u, a) => { + let c = Be(s), + m; + for (let p of u) { + if (p._zod.def.when) { + if (!p._zod.def.when(s)) continue; + } else if (c) continue; + let f = s.issues.length, + v = p._zod.check(s); + if (v instanceof Promise && a?.async === !1) throw new ke(); + if (m || v instanceof Promise) + m = (m ?? Promise.resolve()).then(async () => { + (await v, s.issues.length !== f && (c || (c = Be(s, f)))); + }); + else { + if (s.issues.length === f) continue; + c || (c = Be(s, f)); + } + } + return m ? m.then(() => s) : s; + }, + o = (s, u, a) => { + if (Be(s)) return ((s.aborted = !0), s); + let c = r(u, n, a); + if (c instanceof Promise) { + if (a.async === !1) throw new ke(); + return c.then((m) => e._zod.parse(m, a)); + } + return e._zod.parse(c, a); + }; + e._zod.run = (s, u) => { + if (u.skipChecks) return e._zod.parse(s, u); + if (u.direction === 'backward') { + let c = e._zod.parse( + { value: s.value, issues: [] }, + { ...u, skipChecks: !0 }, + ); + return c instanceof Promise + ? c.then((m) => o(m, s, u)) + : o(c, s, u); + } + let a = e._zod.parse(s, u); + if (a instanceof Promise) { + if (u.async === !1) throw new ke(); + return a.then((c) => r(c, n, u)); + } + return r(a, n, u); + }; + } + e['~standard'] = { + validate: (r) => { + try { + let o = Lo(e, r); + return o.success ? { value: o.data } : { issues: o.error?.issues }; + } catch { + return Ro(e, r).then((s) => + s.success ? { value: s.data } : { issues: s.error?.issues }, + ); + } + }, + vendor: 'zod', + version: 1, + }; + }), + rt = h('$ZodString', (e, t) => { + (D.init(e, t), + (e._zod.pattern = + [...(e?._zod.bag?.patterns ?? [])].pop() ?? sa(e._zod.bag)), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = String(i.value); + } catch {} + return ( + typeof i.value == 'string' || + i.issues.push({ + expected: 'string', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ); + })); + }), + V = h('$ZodStringFormat', (e, t) => { + (Nt.init(e, t), rt.init(e, t)); + }), + Ta = h('$ZodGUID', (e, t) => { + (t.pattern ?? (t.pattern = Ko), V.init(e, t)); + }), + Aa = h('$ZodUUID', (e, t) => { + if (t.version) { + let n = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[ + t.version + ]; + if (n === void 0) + throw new Error(`Invalid UUID version: "${t.version}"`); + t.pattern ?? (t.pattern = nt(n)); + } else t.pattern ?? (t.pattern = nt()); + V.init(e, t); + }), + Ca = h('$ZodEmail', (e, t) => { + (t.pattern ?? (t.pattern = qo), V.init(e, t)); + }), + La = h('$ZodURL', (e, t) => { + (V.init(e, t), + (e._zod.check = (i) => { + try { + let n = i.value.trim(), + r = new URL(n); + (t.hostname && + ((t.hostname.lastIndex = 0), + t.hostname.test(r.hostname) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid hostname', + pattern: na.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + t.protocol && + ((t.protocol.lastIndex = 0), + t.protocol.test( + r.protocol.endsWith(':') + ? r.protocol.slice(0, -1) + : r.protocol, + ) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid protocol', + pattern: t.protocol.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + t.normalize ? (i.value = r.href) : (i.value = n)); + return; + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'url', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + Ra = h('$ZodEmoji', (e, t) => { + (t.pattern ?? (t.pattern = Xo()), V.init(e, t)); + }), + Ja = h('$ZodNanoID', (e, t) => { + (t.pattern ?? (t.pattern = Bo), V.init(e, t)); + }), + Fa = h('$ZodCUID', (e, t) => { + (t.pattern ?? (t.pattern = Jo), V.init(e, t)); + }), + Va = h('$ZodCUID2', (e, t) => { + (t.pattern ?? (t.pattern = Fo), V.init(e, t)); + }), + Ma = h('$ZodULID', (e, t) => { + (t.pattern ?? (t.pattern = Vo), V.init(e, t)); + }), + Wa = h('$ZodXID', (e, t) => { + (t.pattern ?? (t.pattern = Mo), V.init(e, t)); + }), + Ba = h('$ZodKSUID', (e, t) => { + (t.pattern ?? (t.pattern = Wo), V.init(e, t)); + }), + Ga = h('$ZodISODateTime', (e, t) => { + (t.pattern ?? (t.pattern = aa(t)), V.init(e, t)); + }), + Ka = h('$ZodISODate', (e, t) => { + (t.pattern ?? (t.pattern = ia), V.init(e, t)); + }), + qa = h('$ZodISOTime', (e, t) => { + (t.pattern ?? (t.pattern = oa(t)), V.init(e, t)); + }), + Xa = h('$ZodISODuration', (e, t) => { + (t.pattern ?? (t.pattern = Go), V.init(e, t)); + }), + Ha = h('$ZodIPv4', (e, t) => { + (t.pattern ?? (t.pattern = Ho), + V.init(e, t), + e._zod.onattach.push((i) => { + let n = i._zod.bag; + n.format = 'ipv4'; + })); + }), + Ya = h('$ZodIPv6', (e, t) => { + (t.pattern ?? (t.pattern = Yo), + V.init(e, t), + e._zod.onattach.push((i) => { + let n = i._zod.bag; + n.format = 'ipv6'; + }), + (e._zod.check = (i) => { + try { + new URL(`http://[${i.value}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'ipv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + Qa = h('$ZodCIDRv4', (e, t) => { + (t.pattern ?? (t.pattern = Qo), V.init(e, t)); + }), + es = h('$ZodCIDRv6', (e, t) => { + (t.pattern ?? (t.pattern = ea), + V.init(e, t), + (e._zod.check = (i) => { + let n = i.value.split('/'); + try { + if (n.length !== 2) throw new Error(); + let [r, o] = n; + if (!o) throw new Error(); + let s = Number(o); + if (`${s}` !== o) throw new Error(); + if (s < 0 || s > 128) throw new Error(); + new URL(`http://[${r}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'cidrv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }); + function ts(e) { + if (e === '') return !0; + if (e.length % 4 !== 0) return !1; + try { + return (atob(e), !0); + } catch { + return !1; + } + } + var ns = h('$ZodBase64', (e, t) => { + (t.pattern ?? (t.pattern = ta), + V.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64'; + }), + (e._zod.check = (i) => { + ts(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function ym(e) { + if (!Ir.test(e)) return !1; + let t = e.replace(/[-_]/g, (n) => (n === '-' ? '+' : '/')), + i = t.padEnd(Math.ceil(t.length / 4) * 4, '='); + return ts(i); + } + var rs = h('$ZodBase64URL', (e, t) => { + (t.pattern ?? (t.pattern = Ir), + V.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64url'; + }), + (e._zod.check = (i) => { + ym(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64url', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + is = h('$ZodE164', (e, t) => { + (t.pattern ?? (t.pattern = ra), V.init(e, t)); + }); + function $m(e, t = null) { + try { + let i = e.split('.'); + if (i.length !== 3) return !1; + let [n] = i; + if (!n) return !1; + let r = JSON.parse(atob(n)); + return !( + ('typ' in r && r?.typ !== 'JWT') || + !r.alg || + (t && (!('alg' in r) || r.alg !== t)) + ); + } catch { + return !1; + } + } + var os = h('$ZodJWT', (e, t) => { + (V.init(e, t), + (e._zod.check = (i) => { + $m(i.value, t.alg) || + i.issues.push({ + code: 'invalid_format', + format: 'jwt', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + as = h('$ZodCustomStringFormat', (e, t) => { + (V.init(e, t), + (e._zod.check = (i) => { + t.fn(i.value) || + i.issues.push({ + code: 'invalid_format', + format: t.format, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Zr = h('$ZodNumber', (e, t) => { + (D.init(e, t), + (e._zod.pattern = e._zod.bag.pattern ?? la), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = Number(i.value); + } catch {} + let r = i.value; + if (typeof r == 'number' && !Number.isNaN(r) && Number.isFinite(r)) + return i; + let o = + typeof r == 'number' + ? Number.isNaN(r) + ? 'NaN' + : Number.isFinite(r) + ? void 0 + : 'Infinity' + : void 0; + return ( + i.issues.push({ + expected: 'number', + code: 'invalid_type', + input: r, + inst: e, + ...(o ? { received: o } : {}), + }), + i + ); + })); + }), + ss = h('$ZodNumber', (e, t) => { + (ha.init(e, t), Zr.init(e, t)); + }), + ln = h('$ZodBoolean', (e, t) => { + (D.init(e, t), + (e._zod.pattern = da), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = !!i.value; + } catch {} + let r = i.value; + return ( + typeof r == 'boolean' || + i.issues.push({ + expected: 'boolean', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + Er = h('$ZodBigInt', (e, t) => { + (D.init(e, t), + (e._zod.pattern = ua), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = BigInt(i.value); + } catch {} + return ( + typeof i.value == 'bigint' || + i.issues.push({ + expected: 'bigint', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ); + })); + }), + us = h('$ZodBigInt', (e, t) => { + (ba.init(e, t), Er.init(e, t)); + }), + cs = h('$ZodSymbol', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + typeof r == 'symbol' || + i.issues.push({ + expected: 'symbol', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + ls = h('$ZodUndefined', (e, t) => { + (D.init(e, t), + (e._zod.pattern = pa), + (e._zod.values = new Set([void 0])), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + typeof r > 'u' || + i.issues.push({ + expected: 'undefined', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + ds = h('$ZodNull', (e, t) => { + (D.init(e, t), + (e._zod.pattern = ma), + (e._zod.values = new Set([null])), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === null || + i.issues.push({ + expected: 'null', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + ms = h('$ZodAny', (e, t) => { + (D.init(e, t), (e._zod.parse = (i) => i)); + }), + ps = h('$ZodUnknown', (e, t) => { + (D.init(e, t), (e._zod.parse = (i) => i)); + }), + fs = h('$ZodNever', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => ( + i.issues.push({ + expected: 'never', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ))); + }), + vs = h('$ZodVoid', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + typeof r > 'u' || + i.issues.push({ + expected: 'void', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + gs = h('$ZodDate', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = new Date(i.value); + } catch {} + let r = i.value, + o = r instanceof Date; + return ( + (o && !Number.isNaN(r.getTime())) || + i.issues.push({ + expected: 'date', + code: 'invalid_type', + input: r, + ...(o ? { received: 'Invalid Date' } : {}), + inst: e, + }), + i + ); + })); + }); + function cm(e, t, i) { + (e.issues.length && t.issues.push(...le(i, e.issues)), + (t.value[i] = e.value)); + } + var hs = h('$ZodArray', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!Array.isArray(r)) + return ( + i.issues.push({ + expected: 'array', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + i.value = Array(r.length); + let o = []; + for (let s = 0; s < r.length; s++) { + let u = r[s], + a = t.element._zod.run({ value: u, issues: [] }, n); + a instanceof Promise + ? o.push(a.then((c) => cm(c, i, s))) + : cm(a, i, s); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function Dr(e, t, i, n) { + (e.issues.length && t.issues.push(...le(i, e.issues)), + e.value === void 0 + ? i in n && (t.value[i] = void 0) + : (t.value[i] = e.value)); + } + function _m(e) { + let t = Object.keys(e.shape); + for (let n of t) + if (!e.shape?.[n]?._zod?.traits?.has('$ZodType')) + throw new Error(`Invalid element at key "${n}": expected a Zod schema`); + let i = Zo(e.shape); + return { + ...e, + keys: t, + keySet: new Set(t), + numKeys: t.length, + optionalKeys: new Set(i), + }; + } + function km(e, t, i, n, r, o) { + let s = [], + u = r.keySet, + a = r.catchall._zod, + c = a.def.type; + for (let m of Object.keys(t)) { + if (u.has(m)) continue; + if (c === 'never') { + s.push(m); + continue; + } + let p = a.run({ value: t[m], issues: [] }, n); + p instanceof Promise + ? e.push(p.then((f) => Dr(f, i, m, t))) + : Dr(p, i, m, t); + } + return ( + s.length && + i.issues.push({ + code: 'unrecognized_keys', + keys: s, + input: t, + inst: o, + }), + e.length ? Promise.all(e).then(() => i) : i + ); + } + var xm = h('$ZodObject', (e, t) => { + if ((D.init(e, t), !Object.getOwnPropertyDescriptor(t, 'shape')?.get)) { + let u = t.shape; + Object.defineProperty(t, 'shape', { + get: () => { + let a = { ...u }; + return (Object.defineProperty(t, 'shape', { value: a }), a); + }, + }); + } + let n = It(() => _m(t)); + L(e._zod, 'propValues', () => { + let u = t.shape, + a = {}; + for (let c in u) { + let m = u[c]._zod; + if (m.values) { + a[c] ?? (a[c] = new Set()); + for (let p of m.values) a[c].add(p); + } + } + return a; + }); + let r = tt, + o = t.catchall, + s; + e._zod.parse = (u, a) => { + s ?? (s = n.value); + let c = u.value; + if (!r(c)) + return ( + u.issues.push({ + expected: 'object', + code: 'invalid_type', + input: c, + inst: e, + }), + u + ); + u.value = {}; + let m = [], + p = s.shape; + for (let f of s.keys) { + let b = p[f]._zod.run({ value: c[f], issues: [] }, a); + b instanceof Promise + ? m.push(b.then(($) => Dr($, u, f, c))) + : Dr(b, u, f, c); + } + return o + ? km(m, c, u, a, n.value, e) + : m.length + ? Promise.all(m).then(() => u) + : u; + }; + }), + bs = h('$ZodObjectJIT', (e, t) => { + xm.init(e, t); + let i = e._zod.parse, + n = It(() => _m(t)), + r = (f) => { + let v = new cn(['shape', 'payload', 'ctx']), + b = n.value, + $ = (w) => { + let S = fr(w); + return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`; + }; + v.write('const input = payload.value;'); + let g = Object.create(null), + k = 0; + for (let w of b.keys) g[w] = `key_${k++}`; + v.write('const newResult = {};'); + for (let w of b.keys) { + let S = g[w], + P = fr(w); + (v.write(`const ${S} = ${$(w)};`), + v.write(` + if (${S}.issues.length) { + payload.issues = payload.issues.concat(${S}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${P}, ...iss.path] : [${P}] + }))); + } + + + if (${S}.value === undefined) { + if (${P} in input) { + newResult[${P}] = undefined; + } + } else { + newResult[${P}] = ${S}.value; + } + + `)); + } + (v.write('payload.value = newResult;'), v.write('return payload;')); + let x = v.compile(); + return (w, S) => x(f, w, S); + }, + o, + s = tt, + u = !Xt.jitless, + c = u && Po.value, + m = t.catchall, + p; + e._zod.parse = (f, v) => { + p ?? (p = n.value); + let b = f.value; + return s(b) + ? u && c && v?.async === !1 && v.jitless !== !0 + ? (o || (o = r(t.shape)), + (f = o(f, v)), + m ? km([], b, f, v, p, e) : f) + : i(f, v) + : (f.issues.push({ + expected: 'object', + code: 'invalid_type', + input: b, + inst: e, + }), + f); + }; + }); + function lm(e, t, i, n) { + for (let o of e) if (o.issues.length === 0) return ((t.value = o.value), t); + let r = e.filter((o) => !Be(o)); + return r.length === 1 + ? ((t.value = r[0].value), r[0]) + : (t.issues.push({ + code: 'invalid_union', + input: t.value, + inst: i, + errors: e.map((o) => o.issues.map((s) => de(s, n, q()))), + }), + t); + } + var Tr = h('$ZodUnion', (e, t) => { + (D.init(e, t), + L(e._zod, 'optin', () => + t.options.some((r) => r._zod.optin === 'optional') + ? 'optional' + : void 0, + ), + L(e._zod, 'optout', () => + t.options.some((r) => r._zod.optout === 'optional') + ? 'optional' + : void 0, + ), + L(e._zod, 'values', () => { + if (t.options.every((r) => r._zod.values)) + return new Set(t.options.flatMap((r) => Array.from(r._zod.values))); + }), + L(e._zod, 'pattern', () => { + if (t.options.every((r) => r._zod.pattern)) { + let r = t.options.map((o) => o._zod.pattern); + return new RegExp(`^(${r.map((o) => Qt(o.source)).join('|')})$`); + } + })); + let i = t.options.length === 1, + n = t.options[0]._zod.run; + e._zod.parse = (r, o) => { + if (i) return n(r, o); + let s = !1, + u = []; + for (let a of t.options) { + let c = a._zod.run({ value: r.value, issues: [] }, o); + if (c instanceof Promise) (u.push(c), (s = !0)); + else { + if (c.issues.length === 0) return c; + u.push(c); + } + } + return s ? Promise.all(u).then((a) => lm(a, r, e, o)) : lm(u, r, e, o); + }; + }), + ys = h('$ZodDiscriminatedUnion', (e, t) => { + Tr.init(e, t); + let i = e._zod.parse; + L(e._zod, 'propValues', () => { + let r = {}; + for (let o of t.options) { + let s = o._zod.propValues; + if (!s || Object.keys(s).length === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(o)}"`, + ); + for (let [u, a] of Object.entries(s)) { + r[u] || (r[u] = new Set()); + for (let c of a) r[u].add(c); + } + } + return r; + }); + let n = It(() => { + let r = t.options, + o = new Map(); + for (let s of r) { + let u = s._zod.propValues?.[t.discriminator]; + if (!u || u.size === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(s)}"`, + ); + for (let a of u) { + if (o.has(a)) + throw new Error(`Duplicate discriminator value "${String(a)}"`); + o.set(a, s); + } + } + return o; + }); + e._zod.parse = (r, o) => { + let s = r.value; + if (!tt(s)) + return ( + r.issues.push({ + code: 'invalid_type', + expected: 'object', + input: s, + inst: e, + }), + r + ); + let u = n.value.get(s?.[t.discriminator]); + return u + ? u._zod.run(r, o) + : t.unionFallback + ? i(r, o) + : (r.issues.push({ + code: 'invalid_union', + errors: [], + note: 'No matching discriminator', + discriminator: t.discriminator, + input: s, + path: [t.discriminator], + inst: e, + }), + r); + }; + }), + $s = h('$ZodIntersection', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value, + o = t.left._zod.run({ value: r, issues: [] }, n), + s = t.right._zod.run({ value: r, issues: [] }, n); + return o instanceof Promise || s instanceof Promise + ? Promise.all([o, s]).then(([a, c]) => dm(i, a, c)) + : dm(i, o, s); + })); + }); + function Ea(e, t) { + if (e === t) return { valid: !0, data: e }; + if (e instanceof Date && t instanceof Date && +e == +t) + return { valid: !0, data: e }; + if (We(e) && We(t)) { + let i = Object.keys(t), + n = Object.keys(e).filter((o) => i.indexOf(o) !== -1), + r = { ...e, ...t }; + for (let o of n) { + let s = Ea(e[o], t[o]); + if (!s.valid) + return { valid: !1, mergeErrorPath: [o, ...s.mergeErrorPath] }; + r[o] = s.data; + } + return { valid: !0, data: r }; + } + if (Array.isArray(e) && Array.isArray(t)) { + if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; + let i = []; + for (let n = 0; n < e.length; n++) { + let r = e[n], + o = t[n], + s = Ea(r, o); + if (!s.valid) + return { valid: !1, mergeErrorPath: [n, ...s.mergeErrorPath] }; + i.push(s.data); + } + return { valid: !0, data: i }; + } + return { valid: !1, mergeErrorPath: [] }; + } + function dm(e, t, i) { + if ( + (t.issues.length && e.issues.push(...t.issues), + i.issues.length && e.issues.push(...i.issues), + Be(e)) + ) + return e; + let n = Ea(t.value, i.value); + if (!n.valid) + throw new Error( + `Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`, + ); + return ((e.value = n.data), e); + } + var Ar = h('$ZodTuple', (e, t) => { + D.init(e, t); + let i = t.items, + n = + i.length - + [...i].reverse().findIndex((r) => r._zod.optin !== 'optional'); + e._zod.parse = (r, o) => { + let s = r.value; + if (!Array.isArray(s)) + return ( + r.issues.push({ + input: s, + inst: e, + expected: 'tuple', + code: 'invalid_type', + }), + r + ); + r.value = []; + let u = []; + if (!t.rest) { + let c = s.length > i.length, + m = s.length < n - 1; + if (c || m) + return ( + r.issues.push({ + ...(c + ? { code: 'too_big', maximum: i.length } + : { code: 'too_small', minimum: i.length }), + input: s, + inst: e, + origin: 'array', + }), + r + ); + } + let a = -1; + for (let c of i) { + if ((a++, a >= s.length && a >= n)) continue; + let m = c._zod.run({ value: s[a], issues: [] }, o); + m instanceof Promise ? u.push(m.then((p) => Or(p, r, a))) : Or(m, r, a); + } + if (t.rest) { + let c = s.slice(i.length); + for (let m of c) { + a++; + let p = t.rest._zod.run({ value: m, issues: [] }, o); + p instanceof Promise + ? u.push(p.then((f) => Or(f, r, a))) + : Or(p, r, a); + } + } + return u.length ? Promise.all(u).then(() => r) : r; + }; + }); + function Or(e, t, i) { + (e.issues.length && t.issues.push(...le(i, e.issues)), + (t.value[i] = e.value)); + } + var _s = h('$ZodRecord', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!We(r)) + return ( + i.issues.push({ + expected: 'record', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + if (t.keyType._zod.values) { + let s = t.keyType._zod.values; + i.value = {}; + for (let a of s) + if ( + typeof a == 'string' || + typeof a == 'number' || + typeof a == 'symbol' + ) { + let c = t.valueType._zod.run({ value: r[a], issues: [] }, n); + c instanceof Promise + ? o.push( + c.then((m) => { + (m.issues.length && i.issues.push(...le(a, m.issues)), + (i.value[a] = m.value)); + }), + ) + : (c.issues.length && i.issues.push(...le(a, c.issues)), + (i.value[a] = c.value)); + } + let u; + for (let a in r) s.has(a) || ((u = u ?? []), u.push(a)); + u && + u.length > 0 && + i.issues.push({ + code: 'unrecognized_keys', + input: r, + inst: e, + keys: u, + }); + } else { + i.value = {}; + for (let s of Reflect.ownKeys(r)) { + if (s === '__proto__') continue; + let u = t.keyType._zod.run({ value: s, issues: [] }, n); + if (u instanceof Promise) + throw new Error( + 'Async schemas not supported in object keys currently', + ); + if (u.issues.length) { + (i.issues.push({ + code: 'invalid_key', + origin: 'record', + issues: u.issues.map((c) => de(c, n, q())), + input: s, + path: [s], + inst: e, + }), + (i.value[u.value] = u.value)); + continue; + } + let a = t.valueType._zod.run({ value: r[s], issues: [] }, n); + a instanceof Promise + ? o.push( + a.then((c) => { + (c.issues.length && i.issues.push(...le(s, c.issues)), + (i.value[u.value] = c.value)); + }), + ) + : (a.issues.length && i.issues.push(...le(s, a.issues)), + (i.value[u.value] = a.value)); + } + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }), + ks = h('$ZodMap', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Map)) + return ( + i.issues.push({ + expected: 'map', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + i.value = new Map(); + for (let [s, u] of r) { + let a = t.keyType._zod.run({ value: s, issues: [] }, n), + c = t.valueType._zod.run({ value: u, issues: [] }, n); + a instanceof Promise || c instanceof Promise + ? o.push( + Promise.all([a, c]).then(([m, p]) => { + mm(m, p, i, s, r, e, n); + }), + ) + : mm(a, c, i, s, r, e, n); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function mm(e, t, i, n, r, o, s) { + (e.issues.length && + (en.has(typeof n) + ? i.issues.push(...le(n, e.issues)) + : i.issues.push({ + code: 'invalid_key', + origin: 'map', + input: r, + inst: o, + issues: e.issues.map((u) => de(u, s, q())), + })), + t.issues.length && + (en.has(typeof n) + ? i.issues.push(...le(n, t.issues)) + : i.issues.push({ + origin: 'map', + code: 'invalid_element', + input: r, + inst: o, + key: n, + issues: t.issues.map((u) => de(u, s, q())), + })), + i.value.set(e.value, t.value)); + } + var xs = h('$ZodSet', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Set)) + return ( + i.issues.push({ + input: r, + inst: e, + expected: 'set', + code: 'invalid_type', + }), + i + ); + let o = []; + i.value = new Set(); + for (let s of r) { + let u = t.valueType._zod.run({ value: s, issues: [] }, n); + u instanceof Promise ? o.push(u.then((a) => pm(a, i))) : pm(u, i); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function pm(e, t) { + (e.issues.length && t.issues.push(...e.issues), t.value.add(e.value)); + } + var ws = h('$ZodEnum', (e, t) => { + D.init(e, t); + let i = Yt(t.entries), + n = new Set(i); + ((e._zod.values = n), + (e._zod.pattern = new RegExp( + `^(${i + .filter((r) => en.has(typeof r)) + .map((r) => (typeof r == 'string' ? Oe(r) : r.toString())) + .join('|')})$`, + )), + (e._zod.parse = (r, o) => { + let s = r.value; + return ( + n.has(s) || + r.issues.push({ + code: 'invalid_value', + values: i, + input: s, + inst: e, + }), + r + ); + })); + }), + Ss = h('$ZodLiteral', (e, t) => { + if ((D.init(e, t), t.values.length === 0)) + throw new Error('Cannot create literal schema with no valid values'); + ((e._zod.values = new Set(t.values)), + (e._zod.pattern = new RegExp( + `^(${t.values.map((i) => (typeof i == 'string' ? Oe(i) : i ? Oe(i.toString()) : String(i))).join('|')})$`, + )), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + e._zod.values.has(r) || + i.issues.push({ + code: 'invalid_value', + values: t.values, + input: r, + inst: e, + }), + i + ); + })); + }), + Is = h('$ZodFile', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r instanceof File || + i.issues.push({ + expected: 'file', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + zs = h('$ZodTransform', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Je(e.constructor.name); + let r = t.transform(i.value, i); + if (n.async) + return (r instanceof Promise ? r : Promise.resolve(r)).then( + (s) => ((i.value = s), i), + ); + if (r instanceof Promise) throw new ke(); + return ((i.value = r), i); + })); + }); + function fm(e, t) { + return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e; + } + var js = h('$ZodOptional', (e, t) => { + (D.init(e, t), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + L(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, void 0]) + : void 0, + ), + L(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${Qt(i.source)})?$`) : void 0; + }), + (e._zod.parse = (i, n) => { + if (t.innerType._zod.optin === 'optional') { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => fm(o, i.value)) + : fm(r, i.value); + } + return i.value === void 0 ? i : t.innerType._zod.run(i, n); + })); + }), + Os = h('$ZodNullable', (e, t) => { + (D.init(e, t), + L(e._zod, 'optin', () => t.innerType._zod.optin), + L(e._zod, 'optout', () => t.innerType._zod.optout), + L(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${Qt(i.source)}|null)$`) : void 0; + }), + L(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, null]) + : void 0, + ), + (e._zod.parse = (i, n) => + i.value === null ? i : t.innerType._zod.run(i, n))); + }), + Us = h('$ZodDefault', (e, t) => { + (D.init(e, t), + (e._zod.optin = 'optional'), + L(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + if (i.value === void 0) return ((i.value = t.defaultValue), i); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => vm(o, t)) : vm(r, t); + })); + }); + function vm(e, t) { + return (e.value === void 0 && (e.value = t.defaultValue), e); + } + var Ps = h('$ZodPrefault', (e, t) => { + (D.init(e, t), + (e._zod.optin = 'optional'), + L(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => ( + n.direction === 'backward' || + (i.value === void 0 && (i.value = t.defaultValue)), + t.innerType._zod.run(i, n) + ))); + }), + Ns = h('$ZodNonOptional', (e, t) => { + (D.init(e, t), + L(e._zod, 'values', () => { + let i = t.innerType._zod.values; + return i ? new Set([...i].filter((n) => n !== void 0)) : void 0; + }), + (e._zod.parse = (i, n) => { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => gm(o, e)) : gm(r, e); + })); + }); + function gm(e, t) { + return ( + !e.issues.length && + e.value === void 0 && + e.issues.push({ + code: 'invalid_type', + expected: 'nonoptional', + input: e.value, + inst: t, + }), + e + ); + } + var Ds = h('$ZodSuccess', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Je('ZodSuccess'); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => ((i.value = o.issues.length === 0), i)) + : ((i.value = r.issues.length === 0), i); + })); + }), + Zs = h('$ZodCatch', (e, t) => { + (D.init(e, t), + L(e._zod, 'optin', () => t.innerType._zod.optin), + L(e._zod, 'optout', () => t.innerType._zod.optout), + L(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then( + (o) => ( + (i.value = o.value), + o.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: o.issues.map((s) => de(s, n, q())) }, + input: i.value, + })), + (i.issues = [])), + i + ), + ) + : ((i.value = r.value), + r.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: r.issues.map((o) => de(o, n, q())) }, + input: i.value, + })), + (i.issues = [])), + i); + })); + }), + Es = h('$ZodNaN', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => ( + (typeof i.value != 'number' || !Number.isNaN(i.value)) && + i.issues.push({ + input: i.value, + inst: e, + expected: 'nan', + code: 'invalid_type', + }), + i + ))); + }), + Ts = h('$ZodPipe', (e, t) => { + (D.init(e, t), + L(e._zod, 'values', () => t.in._zod.values), + L(e._zod, 'optin', () => t.in._zod.optin), + L(e._zod, 'optout', () => t.out._zod.optout), + L(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') { + let o = t.out._zod.run(i, n); + return o instanceof Promise + ? o.then((s) => Ur(s, t.in, n)) + : Ur(o, t.in, n); + } + let r = t.in._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Ur(o, t.out, n)) + : Ur(r, t.out, n); + })); + }); + function Ur(e, t, i) { + return e.issues.length + ? ((e.aborted = !0), e) + : t._zod.run({ value: e.value, issues: e.issues }, i); + } + var dn = h('$ZodCodec', (e, t) => { + (D.init(e, t), + L(e._zod, 'values', () => t.in._zod.values), + L(e._zod, 'optin', () => t.in._zod.optin), + L(e._zod, 'optout', () => t.out._zod.optout), + L(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if ((n.direction || 'forward') === 'forward') { + let o = t.in._zod.run(i, n); + return o instanceof Promise + ? o.then((s) => Pr(s, t, n)) + : Pr(o, t, n); + } else { + let o = t.out._zod.run(i, n); + return o instanceof Promise + ? o.then((s) => Pr(s, t, n)) + : Pr(o, t, n); + } + })); + }); + function Pr(e, t, i) { + if (e.issues.length) return ((e.aborted = !0), e); + if ((i.direction || 'forward') === 'forward') { + let r = t.transform(e.value, e); + return r instanceof Promise + ? r.then((o) => Nr(e, o, t.out, i)) + : Nr(e, r, t.out, i); + } else { + let r = t.reverseTransform(e.value, e); + return r instanceof Promise + ? r.then((o) => Nr(e, o, t.in, i)) + : Nr(e, r, t.in, i); + } + } + function Nr(e, t, i, n) { + return e.issues.length + ? ((e.aborted = !0), e) + : i._zod.run({ value: t, issues: e.issues }, n); + } + var As = h('$ZodReadonly', (e, t) => { + (D.init(e, t), + L(e._zod, 'propValues', () => t.innerType._zod.propValues), + L(e._zod, 'values', () => t.innerType._zod.values), + L(e._zod, 'optin', () => t.innerType._zod.optin), + L(e._zod, 'optout', () => t.innerType._zod.optout), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then(hm) : hm(r); + })); + }); + function hm(e) { + return ((e.value = Object.freeze(e.value)), e); + } + var Cs = h('$ZodTemplateLiteral', (e, t) => { + D.init(e, t); + let i = []; + for (let n of t.parts) + if (typeof n == 'object' && n !== null) { + if (!n._zod.pattern) + throw new Error( + `Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`, + ); + let r = + n._zod.pattern instanceof RegExp + ? n._zod.pattern.source + : n._zod.pattern; + if (!r) + throw new Error(`Invalid template literal part: ${n._zod.traits}`); + let o = r.startsWith('^') ? 1 : 0, + s = r.endsWith('$') ? r.length - 1 : r.length; + i.push(r.slice(o, s)); + } else if (n === null || Do.has(typeof n)) i.push(Oe(`${n}`)); + else throw new Error(`Invalid template literal part: ${n}`); + ((e._zod.pattern = new RegExp(`^${i.join('')}$`)), + (e._zod.parse = (n, r) => + typeof n.value != 'string' + ? (n.issues.push({ + input: n.value, + inst: e, + expected: 'template_literal', + code: 'invalid_type', + }), + n) + : ((e._zod.pattern.lastIndex = 0), + e._zod.pattern.test(n.value) || + n.issues.push({ + input: n.value, + inst: e, + code: 'invalid_format', + format: t.format ?? 'template_literal', + pattern: e._zod.pattern.source, + }), + n))); + }), + Ls = h( + '$ZodFunction', + (e, t) => ( + D.init(e, t), + (e._def = t), + (e._zod.def = t), + (e.implement = (i) => { + if (typeof i != 'function') + throw new Error('implement() must be called with a function'); + return function (...n) { + let r = e._def.input ? gr(e._def.input, n) : n, + o = Reflect.apply(i, this, r); + return e._def.output ? gr(e._def.output, o) : o; + }; + }), + (e.implementAsync = (i) => { + if (typeof i != 'function') + throw new Error('implementAsync() must be called with a function'); + return async function (...n) { + let r = e._def.input ? await hr(e._def.input, n) : n, + o = await Reflect.apply(i, this, r); + return e._def.output ? await hr(e._def.output, o) : o; + }; + }), + (e._zod.parse = (i, n) => + typeof i.value != 'function' + ? (i.issues.push({ + code: 'invalid_type', + expected: 'function', + input: i.value, + inst: e, + }), + i) + : (e._def.output && e._def.output._zod.def.type === 'promise' + ? (i.value = e.implementAsync(i.value)) + : (i.value = e.implement(i.value)), + i)), + (e.input = (...i) => { + let n = e.constructor; + return Array.isArray(i[0]) + ? new n({ + type: 'function', + input: new Ar({ type: 'tuple', items: i[0], rest: i[1] }), + output: e._def.output, + }) + : new n({ type: 'function', input: i[0], output: e._def.output }); + }), + (e.output = (i) => { + let n = e.constructor; + return new n({ type: 'function', input: e._def.input, output: i }); + }), + e + ), + ), + Rs = h('$ZodPromise', (e, t) => { + (D.init(e, t), + (e._zod.parse = (i, n) => + Promise.resolve(i.value).then((r) => + t.innerType._zod.run({ value: r, issues: [] }, n), + ))); + }), + Js = h('$ZodLazy', (e, t) => { + (D.init(e, t), + L(e._zod, 'innerType', () => t.getter()), + L(e._zod, 'pattern', () => e._zod.innerType._zod.pattern), + L(e._zod, 'propValues', () => e._zod.innerType._zod.propValues), + L(e._zod, 'optin', () => e._zod.innerType._zod.optin ?? void 0), + L(e._zod, 'optout', () => e._zod.innerType._zod.optout ?? void 0), + (e._zod.parse = (i, n) => e._zod.innerType._zod.run(i, n))); + }), + Fs = h('$ZodCustom', (e, t) => { + (B.init(e, t), + D.init(e, t), + (e._zod.parse = (i, n) => i), + (e._zod.check = (i) => { + let n = i.value, + r = t.fn(n); + if (r instanceof Promise) return r.then((o) => bm(o, i, n, e)); + bm(r, i, n, e); + })); + }); + function bm(e, t, i, n) { + if (!e) { + let r = { + code: 'custom', + input: i, + inst: n, + path: [...(n._zod.def.path ?? [])], + continue: !n._zod.def.abort, + }; + (n._zod.def.params && (r.params = n._zod.def.params), + t.issues.push(zt(r))); + } + } + var fn = {}; + et(fn, { + ar: () => wm, + az: () => Sm, + be: () => zm, + bg: () => jm, + ca: () => Om, + cs: () => Um, + da: () => Pm, + de: () => Nm, + en: () => Cr, + eo: () => Dm, + es: () => Zm, + fa: () => Em, + fi: () => Tm, + fr: () => Am, + frCA: () => Cm, + he: () => Lm, + hu: () => Rm, + id: () => Jm, + is: () => Fm, + it: () => Vm, + ja: () => Mm, + ka: () => Wm, + kh: () => Bm, + km: () => Lr, + ko: () => Gm, + lt: () => qm, + mk: () => Xm, + ms: () => Hm, + nl: () => Ym, + no: () => Qm, + ota: () => ep, + pl: () => np, + ps: () => tp, + pt: () => rp, + ru: () => op, + sl: () => ap, + sv: () => sp, + ta: () => up, + th: () => cp, + tr: () => lp, + ua: () => dp, + uk: () => Rr, + ur: () => mp, + vi: () => pp, + yo: () => gp, + zhCN: () => fp, + zhTW: () => vp, + }); + var O_ = () => { + let e = { + string: { unit: 'حرف', verb: 'أن يحوي' }, + file: { unit: 'بايت', verb: 'أن يحوي' }, + array: { unit: 'عنصر', verb: 'أن يحوي' }, + set: { unit: 'عنصر', verb: 'أن يحوي' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'مدخل', + email: 'بريد إلكتروني', + url: 'رابط', + emoji: 'إيموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاريخ ووقت بمعيار ISO', + date: 'تاريخ بمعيار ISO', + time: 'وقت بمعيار ISO', + duration: 'مدة بمعيار ISO', + ipv4: 'عنوان IPv4', + ipv6: 'عنوان IPv6', + cidrv4: 'مدى عناوين بصيغة IPv4', + cidrv6: 'مدى عناوين بصيغة IPv6', + base64: 'نَص بترميز base64-encoded', + base64url: 'نَص بترميز base64url-encoded', + json_string: 'نَص على هيئة JSON', + e164: 'رقم هاتف بمعيار E.164', + jwt: 'JWT', + template_literal: 'مدخل', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `مدخلات غير مقبولة: يفترض إدخال ${r.expected}، ولكن تم إدخال ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `مدخلات غير مقبولة: يفترض إدخال ${I(r.values[0])}` + : `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? ` أكبر من اللازم: يفترض أن تكون ${r.origin ?? 'القيمة'} ${o} ${r.maximum.toString()} ${s.unit ?? 'عنصر'}` + : `أكبر من اللازم: يفترض أن تكون ${r.origin ?? 'القيمة'} ${o} ${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${o} ${r.minimum.toString()} ${s.unit}` + : `أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${o} ${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"` + : o.format === 'ends_with' + ? `نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"` + : o.format === 'includes' + ? `نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"` + : o.format === 'regex' + ? `نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}` + : `${n[o.format] ?? r.format} غير مقبول`; + } + case 'not_multiple_of': + return `رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`; + case 'unrecognized_keys': + return `معرف${r.keys.length > 1 ? 'ات' : ''} غريب${r.keys.length > 1 ? 'ة' : ''}: ${_(r.keys, '، ')}`; + case 'invalid_key': + return `معرف غير مقبول في ${r.origin}`; + case 'invalid_union': + return 'مدخل غير مقبول'; + case 'invalid_element': + return `مدخل غير مقبول في ${r.origin}`; + default: + return 'مدخل غير مقبول'; + } + }; + }; + function wm() { + return { localeError: O_() }; + } + var U_ = () => { + let e = { + string: { unit: 'simvol', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'element', verb: 'olmalıdır' }, + set: { unit: 'element', verb: 'olmalıdır' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Yanlış dəyər: gözlənilən ${r.expected}, daxil olan ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Yanlış dəyər: gözlənilən ${I(r.values[0])}` + : `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Çox böyük: gözlənilən ${r.origin ?? 'dəyər'} ${o}${r.maximum.toString()} ${s.unit ?? 'element'}` + : `Çox böyük: gözlənilən ${r.origin ?? 'dəyər'} ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Çox kiçik: gözlənilən ${r.origin} ${o}${r.minimum.toString()} ${s.unit}` + : `Çox kiçik: gözlənilən ${r.origin} ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Yanlış mətn: "${o.prefix}" ilə başlamalıdır` + : o.format === 'ends_with' + ? `Yanlış mətn: "${o.suffix}" ilə bitməlidir` + : o.format === 'includes' + ? `Yanlış mətn: "${o.includes}" daxil olmalıdır` + : o.format === 'regex' + ? `Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır` + : `Yanlış ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Yanlış ədəd: ${r.divisor} ilə bölünə bilən olmalıdır`; + case 'unrecognized_keys': + return `Tanınmayan açar${r.keys.length > 1 ? 'lar' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `${r.origin} daxilində yanlış açar`; + case 'invalid_union': + return 'Yanlış dəyər'; + case 'invalid_element': + return `${r.origin} daxilində yanlış dəyər`; + default: + return 'Yanlış dəyər'; + } + }; + }; + function Sm() { + return { localeError: U_() }; + } + function Im(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var P_ = () => { + let e = { + string: { + unit: { one: 'сімвал', few: 'сімвалы', many: 'сімвалаў' }, + verb: 'мець', + }, + array: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + set: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + file: { + unit: { one: 'байт', few: 'байты', many: 'байтаў' }, + verb: 'мець', + }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'лік'; + case 'object': { + if (Array.isArray(r)) return 'масіў'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'увод', + email: 'email адрас', + url: 'URL', + emoji: 'эмодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата і час', + date: 'ISO дата', + time: 'ISO час', + duration: 'ISO працягласць', + ipv4: 'IPv4 адрас', + ipv6: 'IPv6 адрас', + cidrv4: 'IPv4 дыяпазон', + cidrv6: 'IPv6 дыяпазон', + base64: 'радок у фармаце base64', + base64url: 'радок у фармаце base64url', + json_string: 'JSON радок', + e164: 'нумар E.164', + jwt: 'JWT', + template_literal: 'увод', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Няправільны ўвод: чакаўся ${r.expected}, атрымана ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Няправільны ўвод: чакалася ${I(r.values[0])}` + : `Няправільны варыянт: чакаўся адзін з ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + if (s) { + let u = Number(r.maximum), + a = Im(u, s.unit.one, s.unit.few, s.unit.many); + return `Занадта вялікі: чакалася, што ${r.origin ?? 'значэнне'} павінна ${s.verb} ${o}${r.maximum.toString()} ${a}`; + } + return `Занадта вялікі: чакалася, што ${r.origin ?? 'значэнне'} павінна быць ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + if (s) { + let u = Number(r.minimum), + a = Im(u, s.unit.one, s.unit.few, s.unit.many); + return `Занадта малы: чакалася, што ${r.origin} павінна ${s.verb} ${o}${r.minimum.toString()} ${a}`; + } + return `Занадта малы: чакалася, што ${r.origin} павінна быць ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Няправільны радок: павінен пачынацца з "${o.prefix}"` + : o.format === 'ends_with' + ? `Няправільны радок: павінен заканчвацца на "${o.suffix}"` + : o.format === 'includes' + ? `Няправільны радок: павінен змяшчаць "${o.includes}"` + : o.format === 'regex' + ? `Няправільны радок: павінен адпавядаць шаблону ${o.pattern}` + : `Няправільны ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Няправільны лік: павінен быць кратным ${r.divisor}`; + case 'unrecognized_keys': + return `Нераспазнаны ${r.keys.length > 1 ? 'ключы' : 'ключ'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Няправільны ключ у ${r.origin}`; + case 'invalid_union': + return 'Няправільны ўвод'; + case 'invalid_element': + return `Няправільнае значэнне ў ${r.origin}`; + default: + return 'Няправільны ўвод'; + } + }; + }; + function zm() { + return { localeError: P_() }; + } + var N_ = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'число'; + case 'object': { + if (Array.isArray(e)) return 'масив'; + if (e === null) return 'null'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return t; + }, + D_ = () => { + let e = { + string: { unit: 'символа', verb: 'да съдържа' }, + file: { unit: 'байта', verb: 'да съдържа' }, + array: { unit: 'елемента', verb: 'да съдържа' }, + set: { unit: 'елемента', verb: 'да съдържа' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'вход', + email: 'имейл адрес', + url: 'URL', + emoji: 'емоджи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO време', + date: 'ISO дата', + time: 'ISO време', + duration: 'ISO продължителност', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'base64-кодиран низ', + base64url: 'base64url-кодиран низ', + json_string: 'JSON низ', + e164: 'E.164 номер', + jwt: 'JWT', + template_literal: 'вход', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Невалиден вход: очакван ${n.expected}, получен ${N_(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Невалиден вход: очакван ${I(n.values[0])}` + : `Невалидна опция: очаквано едно от ${_(n.values, '|')}`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `Твърде голямо: очаква се ${n.origin ?? 'стойност'} да съдържа ${r}${n.maximum.toString()} ${o.unit ?? 'елемента'}` + : `Твърде голямо: очаква се ${n.origin ?? 'стойност'} да бъде ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `Твърде малко: очаква се ${n.origin} да съдържа ${r}${n.minimum.toString()} ${o.unit}` + : `Твърде малко: очаква се ${n.origin} да бъде ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + if (r.format === 'starts_with') + return `Невалиден низ: трябва да започва с "${r.prefix}"`; + if (r.format === 'ends_with') + return `Невалиден низ: трябва да завършва с "${r.suffix}"`; + if (r.format === 'includes') + return `Невалиден низ: трябва да включва "${r.includes}"`; + if (r.format === 'regex') + return `Невалиден низ: трябва да съвпада с ${r.pattern}`; + let o = 'Невалиден'; + return ( + r.format === 'emoji' && (o = 'Невалидно'), + r.format === 'datetime' && (o = 'Невалидно'), + r.format === 'date' && (o = 'Невалидна'), + r.format === 'time' && (o = 'Невалидно'), + r.format === 'duration' && (o = 'Невалидна'), + `${o} ${i[r.format] ?? n.format}` + ); + } + case 'not_multiple_of': + return `Невалидно число: трябва да бъде кратно на ${n.divisor}`; + case 'unrecognized_keys': + return `Неразпознат${n.keys.length > 1 ? 'и' : ''} ключ${n.keys.length > 1 ? 'ове' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Невалиден ключ в ${n.origin}`; + case 'invalid_union': + return 'Невалиден вход'; + case 'invalid_element': + return `Невалидна стойност в ${n.origin}`; + default: + return 'Невалиден вход'; + } + }; + }; + function jm() { + return { localeError: D_() }; + } + var Z_ = () => { + let e = { + string: { unit: 'caràcters', verb: 'contenir' }, + file: { unit: 'bytes', verb: 'contenir' }, + array: { unit: 'elements', verb: 'contenir' }, + set: { unit: 'elements', verb: 'contenir' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'entrada', + email: 'adreça electrònica', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'durada ISO', + ipv4: 'adreça IPv4', + ipv6: 'adreça IPv6', + cidrv4: 'rang IPv4', + cidrv6: 'rang IPv6', + base64: 'cadena codificada en base64', + base64url: 'cadena codificada en base64url', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Tipus invàlid: s'esperava ${r.expected}, s'ha rebut ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Valor invàlid: s'esperava ${I(r.values[0])}` + : `Opció invàlida: s'esperava una de ${_(r.values, ' o ')}`; + case 'too_big': { + let o = r.inclusive ? 'com a màxim' : 'menys de', + s = t(r.origin); + return s + ? `Massa gran: s'esperava que ${r.origin ?? 'el valor'} contingués ${o} ${r.maximum.toString()} ${s.unit ?? 'elements'}` + : `Massa gran: s'esperava que ${r.origin ?? 'el valor'} fos ${o} ${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? 'com a mínim' : 'més de', + s = t(r.origin); + return s + ? `Massa petit: s'esperava que ${r.origin} contingués ${o} ${r.minimum.toString()} ${s.unit}` + : `Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Format invàlid: ha de començar amb "${o.prefix}"` + : o.format === 'ends_with' + ? `Format invàlid: ha d'acabar amb "${o.suffix}"` + : o.format === 'includes' + ? `Format invàlid: ha d'incloure "${o.includes}"` + : o.format === 'regex' + ? `Format invàlid: ha de coincidir amb el patró ${o.pattern}` + : `Format invàlid per a ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Número invàlid: ha de ser múltiple de ${r.divisor}`; + case 'unrecognized_keys': + return `Clau${r.keys.length > 1 ? 's' : ''} no reconeguda${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Clau invàlida a ${r.origin}`; + case 'invalid_union': + return 'Entrada invàlida'; + case 'invalid_element': + return `Element invàlid a ${r.origin}`; + default: + return 'Entrada invàlida'; + } + }; + }; + function Om() { + return { localeError: Z_() }; + } + var E_ = () => { + let e = { + string: { unit: 'znaků', verb: 'mít' }, + file: { unit: 'bajtů', verb: 'mít' }, + array: { unit: 'prvků', verb: 'mít' }, + set: { unit: 'prvků', verb: 'mít' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'číslo'; + case 'string': + return 'řetězec'; + case 'boolean': + return 'boolean'; + case 'bigint': + return 'bigint'; + case 'function': + return 'funkce'; + case 'symbol': + return 'symbol'; + case 'undefined': + return 'undefined'; + case 'object': { + if (Array.isArray(r)) return 'pole'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'regulární výraz', + email: 'e-mailová adresa', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'datum a čas ve formátu ISO', + date: 'datum ve formátu ISO', + time: 'čas ve formátu ISO', + duration: 'doba trvání ISO', + ipv4: 'IPv4 adresa', + ipv6: 'IPv6 adresa', + cidrv4: 'rozsah IPv4', + cidrv6: 'rozsah IPv6', + base64: 'řetězec zakódovaný ve formátu base64', + base64url: 'řetězec zakódovaný ve formátu base64url', + json_string: 'řetězec ve formátu JSON', + e164: 'číslo E.164', + jwt: 'JWT', + template_literal: 'vstup', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Neplatný vstup: očekáváno ${r.expected}, obdrženo ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Neplatný vstup: očekáváno ${I(r.values[0])}` + : `Neplatná možnost: očekávána jedna z hodnot ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Hodnota je příliš velká: ${r.origin ?? 'hodnota'} musí mít ${o}${r.maximum.toString()} ${s.unit ?? 'prvků'}` + : `Hodnota je příliš velká: ${r.origin ?? 'hodnota'} musí být ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Hodnota je příliš malá: ${r.origin ?? 'hodnota'} musí mít ${o}${r.minimum.toString()} ${s.unit ?? 'prvků'}` + : `Hodnota je příliš malá: ${r.origin ?? 'hodnota'} musí být ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Neplatný řetězec: musí začínat na "${o.prefix}"` + : o.format === 'ends_with' + ? `Neplatný řetězec: musí končit na "${o.suffix}"` + : o.format === 'includes' + ? `Neplatný řetězec: musí obsahovat "${o.includes}"` + : o.format === 'regex' + ? `Neplatný řetězec: musí odpovídat vzoru ${o.pattern}` + : `Neplatný formát ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Neplatné číslo: musí být násobkem ${r.divisor}`; + case 'unrecognized_keys': + return `Neznámé klíče: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Neplatný klíč v ${r.origin}`; + case 'invalid_union': + return 'Neplatný vstup'; + case 'invalid_element': + return `Neplatná hodnota v ${r.origin}`; + default: + return 'Neplatný vstup'; + } + }; + }; + function Um() { + return { localeError: E_() }; + } + var T_ = () => { + let e = { + string: { unit: 'tegn', verb: 'havde' }, + file: { unit: 'bytes', verb: 'havde' }, + array: { unit: 'elementer', verb: 'indeholdt' }, + set: { unit: 'elementer', verb: 'indeholdt' }, + }, + t = { + string: 'streng', + number: 'tal', + boolean: 'boolean', + array: 'liste', + object: 'objekt', + set: 'sæt', + file: 'fil', + }; + function i(s) { + return e[s] ?? null; + } + function n(s) { + return t[s] ?? s; + } + let r = (s) => { + let u = typeof s; + switch (u) { + case 'number': + return Number.isNaN(s) ? 'NaN' : 'tal'; + case 'object': + return Array.isArray(s) + ? 'liste' + : s === null + ? 'null' + : Object.getPrototypeOf(s) !== Object.prototype && s.constructor + ? s.constructor.name + : 'objekt'; + } + return u; + }, + o = { + regex: 'input', + email: 'e-mailadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslæt', + date: 'ISO-dato', + time: 'ISO-klokkeslæt', + duration: 'ISO-varighed', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodet streng', + base64url: 'base64url-kodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (s) => { + switch (s.code) { + case 'invalid_type': + return `Ugyldigt input: forventede ${n(s.expected)}, fik ${n(r(s.input))}`; + case 'invalid_value': + return s.values.length === 1 + ? `Ugyldig værdi: forventede ${I(s.values[0])}` + : `Ugyldigt valg: forventede en af følgende ${_(s.values, '|')}`; + case 'too_big': { + let u = s.inclusive ? '<=' : '<', + a = i(s.origin), + c = n(s.origin); + return a + ? `For stor: forventede ${c ?? 'value'} ${a.verb} ${u} ${s.maximum.toString()} ${a.unit ?? 'elementer'}` + : `For stor: forventede ${c ?? 'value'} havde ${u} ${s.maximum.toString()}`; + } + case 'too_small': { + let u = s.inclusive ? '>=' : '>', + a = i(s.origin), + c = n(s.origin); + return a + ? `For lille: forventede ${c} ${a.verb} ${u} ${s.minimum.toString()} ${a.unit}` + : `For lille: forventede ${c} havde ${u} ${s.minimum.toString()}`; + } + case 'invalid_format': { + let u = s; + return u.format === 'starts_with' + ? `Ugyldig streng: skal starte med "${u.prefix}"` + : u.format === 'ends_with' + ? `Ugyldig streng: skal ende med "${u.suffix}"` + : u.format === 'includes' + ? `Ugyldig streng: skal indeholde "${u.includes}"` + : u.format === 'regex' + ? `Ugyldig streng: skal matche mønsteret ${u.pattern}` + : `Ugyldig ${o[u.format] ?? s.format}`; + } + case 'not_multiple_of': + return `Ugyldigt tal: skal være deleligt med ${s.divisor}`; + case 'unrecognized_keys': + return `${s.keys.length > 1 ? 'Ukendte nøgler' : 'Ukendt nøgle'}: ${_(s.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøgle i ${s.origin}`; + case 'invalid_union': + return 'Ugyldigt input: matcher ingen af de tilladte typer'; + case 'invalid_element': + return `Ugyldig værdi i ${s.origin}`; + default: + return 'Ugyldigt input'; + } + }; + }; + function Pm() { + return { localeError: T_() }; + } + var A_ = () => { + let e = { + string: { unit: 'Zeichen', verb: 'zu haben' }, + file: { unit: 'Bytes', verb: 'zu haben' }, + array: { unit: 'Elemente', verb: 'zu haben' }, + set: { unit: 'Elemente', verb: 'zu haben' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'Zahl'; + case 'object': { + if (Array.isArray(r)) return 'Array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'Eingabe', + email: 'E-Mail-Adresse', + url: 'URL', + emoji: 'Emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-Datum und -Uhrzeit', + date: 'ISO-Datum', + time: 'ISO-Uhrzeit', + duration: 'ISO-Dauer', + ipv4: 'IPv4-Adresse', + ipv6: 'IPv6-Adresse', + cidrv4: 'IPv4-Bereich', + cidrv6: 'IPv6-Bereich', + base64: 'Base64-codierter String', + base64url: 'Base64-URL-codierter String', + json_string: 'JSON-String', + e164: 'E.164-Nummer', + jwt: 'JWT', + template_literal: 'Eingabe', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Ungültige Eingabe: erwartet ${r.expected}, erhalten ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Ungültige Eingabe: erwartet ${I(r.values[0])}` + : `Ungültige Option: erwartet eine von ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Zu groß: erwartet, dass ${r.origin ?? 'Wert'} ${o}${r.maximum.toString()} ${s.unit ?? 'Elemente'} hat` + : `Zu groß: erwartet, dass ${r.origin ?? 'Wert'} ${o}${r.maximum.toString()} ist`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${s.unit} hat` + : `Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Ungültiger String: muss mit "${o.prefix}" beginnen` + : o.format === 'ends_with' + ? `Ungültiger String: muss mit "${o.suffix}" enden` + : o.format === 'includes' + ? `Ungültiger String: muss "${o.includes}" enthalten` + : o.format === 'regex' + ? `Ungültiger String: muss dem Muster ${o.pattern} entsprechen` + : `Ungültig: ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Ungültige Zahl: muss ein Vielfaches von ${r.divisor} sein`; + case 'unrecognized_keys': + return `${r.keys.length > 1 ? 'Unbekannte Schlüssel' : 'Unbekannter Schlüssel'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Ungültiger Schlüssel in ${r.origin}`; + case 'invalid_union': + return 'Ungültige Eingabe'; + case 'invalid_element': + return `Ungültiger Wert in ${r.origin}`; + default: + return 'Ungültige Eingabe'; + } + }; + }; + function Nm() { + return { localeError: A_() }; + } + var C_ = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(e)) return 'array'; + if (e === null) return 'null'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return t; + }, + L_ = () => { + let e = { + string: { unit: 'characters', verb: 'to have' }, + file: { unit: 'bytes', verb: 'to have' }, + array: { unit: 'items', verb: 'to have' }, + set: { unit: 'items', verb: 'to have' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Invalid input: expected ${n.expected}, received ${C_(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Invalid input: expected ${I(n.values[0])}` + : `Invalid option: expected one of ${_(n.values, '|')}`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `Too big: expected ${n.origin ?? 'value'} to have ${r}${n.maximum.toString()} ${o.unit ?? 'elements'}` + : `Too big: expected ${n.origin ?? 'value'} to be ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `Too small: expected ${n.origin} to have ${r}${n.minimum.toString()} ${o.unit}` + : `Too small: expected ${n.origin} to be ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `Invalid string: must start with "${r.prefix}"` + : r.format === 'ends_with' + ? `Invalid string: must end with "${r.suffix}"` + : r.format === 'includes' + ? `Invalid string: must include "${r.includes}"` + : r.format === 'regex' + ? `Invalid string: must match pattern ${r.pattern}` + : `Invalid ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `Invalid number: must be a multiple of ${n.divisor}`; + case 'unrecognized_keys': + return `Unrecognized key${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Invalid key in ${n.origin}`; + case 'invalid_union': + return 'Invalid input'; + case 'invalid_element': + return `Invalid value in ${n.origin}`; + default: + return 'Invalid input'; + } + }; + }; + function Cr() { + return { localeError: L_() }; + } + var R_ = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'nombro'; + case 'object': { + if (Array.isArray(e)) return 'tabelo'; + if (e === null) return 'senvalora'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return t; + }, + J_ = () => { + let e = { + string: { unit: 'karaktrojn', verb: 'havi' }, + file: { unit: 'bajtojn', verb: 'havi' }, + array: { unit: 'elementojn', verb: 'havi' }, + set: { unit: 'elementojn', verb: 'havi' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'enigo', + email: 'retadreso', + url: 'URL', + emoji: 'emoĝio', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datotempo', + date: 'ISO-dato', + time: 'ISO-tempo', + duration: 'ISO-daŭro', + ipv4: 'IPv4-adreso', + ipv6: 'IPv6-adreso', + cidrv4: 'IPv4-rango', + cidrv6: 'IPv6-rango', + base64: '64-ume kodita karaktraro', + base64url: 'URL-64-ume kodita karaktraro', + json_string: 'JSON-karaktraro', + e164: 'E.164-nombro', + jwt: 'JWT', + template_literal: 'enigo', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Nevalida enigo: atendiĝis ${n.expected}, riceviĝis ${R_(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Nevalida enigo: atendiĝis ${I(n.values[0])}` + : `Nevalida opcio: atendiĝis unu el ${_(n.values, '|')}`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `Tro granda: atendiĝis ke ${n.origin ?? 'valoro'} havu ${r}${n.maximum.toString()} ${o.unit ?? 'elementojn'}` + : `Tro granda: atendiĝis ke ${n.origin ?? 'valoro'} havu ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `Tro malgranda: atendiĝis ke ${n.origin} havu ${r}${n.minimum.toString()} ${o.unit}` + : `Tro malgranda: atendiĝis ke ${n.origin} estu ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `Nevalida karaktraro: devas komenciĝi per "${r.prefix}"` + : r.format === 'ends_with' + ? `Nevalida karaktraro: devas finiĝi per "${r.suffix}"` + : r.format === 'includes' + ? `Nevalida karaktraro: devas inkluzivi "${r.includes}"` + : r.format === 'regex' + ? `Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}` + : `Nevalida ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `Nevalida nombro: devas esti oblo de ${n.divisor}`; + case 'unrecognized_keys': + return `Nekonata${n.keys.length > 1 ? 'j' : ''} ŝlosilo${n.keys.length > 1 ? 'j' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Nevalida ŝlosilo en ${n.origin}`; + case 'invalid_union': + return 'Nevalida enigo'; + case 'invalid_element': + return `Nevalida valoro en ${n.origin}`; + default: + return 'Nevalida enigo'; + } + }; + }; + function Dm() { + return { localeError: J_() }; + } + var F_ = () => { + let e = { + string: { unit: 'caracteres', verb: 'tener' }, + file: { unit: 'bytes', verb: 'tener' }, + array: { unit: 'elementos', verb: 'tener' }, + set: { unit: 'elementos', verb: 'tener' }, + }, + t = { + string: 'texto', + number: 'número', + boolean: 'booleano', + array: 'arreglo', + object: 'objeto', + set: 'conjunto', + file: 'archivo', + date: 'fecha', + bigint: 'número grande', + symbol: 'símbolo', + undefined: 'indefinido', + null: 'nulo', + function: 'función', + map: 'mapa', + record: 'registro', + tuple: 'tupla', + enum: 'enumeración', + union: 'unión', + literal: 'literal', + promise: 'promesa', + void: 'vacío', + never: 'nunca', + unknown: 'desconocido', + any: 'cualquiera', + }; + function i(s) { + return e[s] ?? null; + } + function n(s) { + return t[s] ?? s; + } + let r = (s) => { + let u = typeof s; + switch (u) { + case 'number': + return Number.isNaN(s) ? 'NaN' : 'number'; + case 'object': + return Array.isArray(s) + ? 'array' + : s === null + ? 'null' + : Object.getPrototypeOf(s) !== Object.prototype + ? s.constructor.name + : 'object'; + } + return u; + }, + o = { + regex: 'entrada', + email: 'dirección de correo electrónico', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'fecha y hora ISO', + date: 'fecha ISO', + time: 'hora ISO', + duration: 'duración ISO', + ipv4: 'dirección IPv4', + ipv6: 'dirección IPv6', + cidrv4: 'rango IPv4', + cidrv6: 'rango IPv6', + base64: 'cadena codificada en base64', + base64url: 'URL codificada en base64', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (s) => { + switch (s.code) { + case 'invalid_type': + return `Entrada inválida: se esperaba ${n(s.expected)}, recibido ${n(r(s.input))}`; + case 'invalid_value': + return s.values.length === 1 + ? `Entrada inválida: se esperaba ${I(s.values[0])}` + : `Opción inválida: se esperaba una de ${_(s.values, '|')}`; + case 'too_big': { + let u = s.inclusive ? '<=' : '<', + a = i(s.origin), + c = n(s.origin); + return a + ? `Demasiado grande: se esperaba que ${c ?? 'valor'} tuviera ${u}${s.maximum.toString()} ${a.unit ?? 'elementos'}` + : `Demasiado grande: se esperaba que ${c ?? 'valor'} fuera ${u}${s.maximum.toString()}`; + } + case 'too_small': { + let u = s.inclusive ? '>=' : '>', + a = i(s.origin), + c = n(s.origin); + return a + ? `Demasiado pequeño: se esperaba que ${c} tuviera ${u}${s.minimum.toString()} ${a.unit}` + : `Demasiado pequeño: se esperaba que ${c} fuera ${u}${s.minimum.toString()}`; + } + case 'invalid_format': { + let u = s; + return u.format === 'starts_with' + ? `Cadena inválida: debe comenzar con "${u.prefix}"` + : u.format === 'ends_with' + ? `Cadena inválida: debe terminar en "${u.suffix}"` + : u.format === 'includes' + ? `Cadena inválida: debe incluir "${u.includes}"` + : u.format === 'regex' + ? `Cadena inválida: debe coincidir con el patrón ${u.pattern}` + : `Inválido ${o[u.format] ?? s.format}`; + } + case 'not_multiple_of': + return `Número inválido: debe ser múltiplo de ${s.divisor}`; + case 'unrecognized_keys': + return `Llave${s.keys.length > 1 ? 's' : ''} desconocida${s.keys.length > 1 ? 's' : ''}: ${_(s.keys, ', ')}`; + case 'invalid_key': + return `Llave inválida en ${n(s.origin)}`; + case 'invalid_union': + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido en ${n(s.origin)}`; + default: + return 'Entrada inválida'; + } + }; + }; + function Zm() { + return { localeError: F_() }; + } + var V_ = () => { + let e = { + string: { unit: 'کاراکتر', verb: 'داشته باشد' }, + file: { unit: 'بایت', verb: 'داشته باشد' }, + array: { unit: 'آیتم', verb: 'داشته باشد' }, + set: { unit: 'آیتم', verb: 'داشته باشد' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'عدد'; + case 'object': { + if (Array.isArray(r)) return 'آرایه'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ورودی', + email: 'آدرس ایمیل', + url: 'URL', + emoji: 'ایموجی', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاریخ و زمان ایزو', + date: 'تاریخ ایزو', + time: 'زمان ایزو', + duration: 'مدت زمان ایزو', + ipv4: 'IPv4 آدرس', + ipv6: 'IPv6 آدرس', + cidrv4: 'IPv4 دامنه', + cidrv6: 'IPv6 دامنه', + base64: 'base64-encoded رشته', + base64url: 'base64url-encoded رشته', + json_string: 'JSON رشته', + e164: 'E.164 عدد', + jwt: 'JWT', + template_literal: 'ورودی', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `ورودی نامعتبر: می‌بایست ${r.expected} می‌بود، ${i(r.input)} دریافت شد`; + case 'invalid_value': + return r.values.length === 1 + ? `ورودی نامعتبر: می‌بایست ${I(r.values[0])} می‌بود` + : `گزینه نامعتبر: می‌بایست یکی از ${_(r.values, '|')} می‌بود`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `خیلی بزرگ: ${r.origin ?? 'مقدار'} باید ${o}${r.maximum.toString()} ${s.unit ?? 'عنصر'} باشد` + : `خیلی بزرگ: ${r.origin ?? 'مقدار'} باید ${o}${r.maximum.toString()} باشد`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `خیلی کوچک: ${r.origin} باید ${o}${r.minimum.toString()} ${s.unit} باشد` + : `خیلی کوچک: ${r.origin} باید ${o}${r.minimum.toString()} باشد`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `رشته نامعتبر: باید با "${o.prefix}" شروع شود` + : o.format === 'ends_with' + ? `رشته نامعتبر: باید با "${o.suffix}" تمام شود` + : o.format === 'includes' + ? `رشته نامعتبر: باید شامل "${o.includes}" باشد` + : o.format === 'regex' + ? `رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد` + : `${n[o.format] ?? r.format} نامعتبر`; + } + case 'not_multiple_of': + return `عدد نامعتبر: باید مضرب ${r.divisor} باشد`; + case 'unrecognized_keys': + return `کلید${r.keys.length > 1 ? 'های' : ''} ناشناس: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `کلید ناشناس در ${r.origin}`; + case 'invalid_union': + return 'ورودی نامعتبر'; + case 'invalid_element': + return `مقدار نامعتبر در ${r.origin}`; + default: + return 'ورودی نامعتبر'; + } + }; + }; + function Em() { + return { localeError: V_() }; + } + var M_ = () => { + let e = { + string: { unit: 'merkkiä', subject: 'merkkijonon' }, + file: { unit: 'tavua', subject: 'tiedoston' }, + array: { unit: 'alkiota', subject: 'listan' }, + set: { unit: 'alkiota', subject: 'joukon' }, + number: { unit: '', subject: 'luvun' }, + bigint: { unit: '', subject: 'suuren kokonaisluvun' }, + int: { unit: '', subject: 'kokonaisluvun' }, + date: { unit: '', subject: 'päivämäärän' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'säännöllinen lauseke', + email: 'sähköpostiosoite', + url: 'URL-osoite', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-aikaleima', + date: 'ISO-päivämäärä', + time: 'ISO-aika', + duration: 'ISO-kesto', + ipv4: 'IPv4-osoite', + ipv6: 'IPv6-osoite', + cidrv4: 'IPv4-alue', + cidrv6: 'IPv6-alue', + base64: 'base64-koodattu merkkijono', + base64url: 'base64url-koodattu merkkijono', + json_string: 'JSON-merkkijono', + e164: 'E.164-luku', + jwt: 'JWT', + template_literal: 'templaattimerkkijono', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Virheellinen tyyppi: odotettiin ${r.expected}, oli ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Virheellinen syöte: täytyy olla ${I(r.values[0])}` + : `Virheellinen valinta: täytyy olla yksi seuraavista: ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Liian suuri: ${s.subject} täytyy olla ${o}${r.maximum.toString()} ${s.unit}`.trim() + : `Liian suuri: arvon täytyy olla ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Liian pieni: ${s.subject} täytyy olla ${o}${r.minimum.toString()} ${s.unit}`.trim() + : `Liian pieni: arvon täytyy olla ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Virheellinen syöte: täytyy alkaa "${o.prefix}"` + : o.format === 'ends_with' + ? `Virheellinen syöte: täytyy loppua "${o.suffix}"` + : o.format === 'includes' + ? `Virheellinen syöte: täytyy sisältää "${o.includes}"` + : o.format === 'regex' + ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}` + : `Virheellinen ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Virheellinen luku: täytyy olla luvun ${r.divisor} monikerta`; + case 'unrecognized_keys': + return `${r.keys.length > 1 ? 'Tuntemattomat avaimet' : 'Tuntematon avain'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return 'Virheellinen avain tietueessa'; + case 'invalid_union': + return 'Virheellinen unioni'; + case 'invalid_element': + return 'Virheellinen arvo joukossa'; + default: + return 'Virheellinen syöte'; + } + }; + }; + function Tm() { + return { localeError: M_() }; + } + var W_ = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'nombre'; + case 'object': { + if (Array.isArray(r)) return 'tableau'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'entrée', + email: 'adresse e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date et heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Entrée invalide : ${r.expected} attendu, ${i(r.input)} reçu`; + case 'invalid_value': + return r.values.length === 1 + ? `Entrée invalide : ${I(r.values[0])} attendu` + : `Option invalide : une valeur parmi ${_(r.values, '|')} attendue`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Trop grand : ${r.origin ?? 'valeur'} doit ${s.verb} ${o}${r.maximum.toString()} ${s.unit ?? 'élément(s)'}` + : `Trop grand : ${r.origin ?? 'valeur'} doit être ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Trop petit : ${r.origin} doit ${s.verb} ${o}${r.minimum.toString()} ${s.unit}` + : `Trop petit : ${r.origin} doit être ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${o.prefix}"` + : o.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${o.suffix}"` + : o.format === 'includes' + ? `Chaîne invalide : doit inclure "${o.includes}"` + : o.format === 'regex' + ? `Chaîne invalide : doit correspondre au modèle ${o.pattern}` + : `${n[o.format] ?? r.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${r.divisor}`; + case 'unrecognized_keys': + return `Clé${r.keys.length > 1 ? 's' : ''} non reconnue${r.keys.length > 1 ? 's' : ''} : ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${r.origin}`; + case 'invalid_union': + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${r.origin}`; + default: + return 'Entrée invalide'; + } + }; + }; + function Am() { + return { localeError: W_() }; + } + var B_ = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'entrée', + email: 'adresse courriel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date-heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Entrée invalide : attendu ${r.expected}, reçu ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Entrée invalide : attendu ${I(r.values[0])}` + : `Option invalide : attendu l'une des valeurs suivantes ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '≤' : '<', + s = t(r.origin); + return s + ? `Trop grand : attendu que ${r.origin ?? 'la valeur'} ait ${o}${r.maximum.toString()} ${s.unit}` + : `Trop grand : attendu que ${r.origin ?? 'la valeur'} soit ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '≥' : '>', + s = t(r.origin); + return s + ? `Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${s.unit}` + : `Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${o.prefix}"` + : o.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${o.suffix}"` + : o.format === 'includes' + ? `Chaîne invalide : doit inclure "${o.includes}"` + : o.format === 'regex' + ? `Chaîne invalide : doit correspondre au motif ${o.pattern}` + : `${n[o.format] ?? r.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${r.divisor}`; + case 'unrecognized_keys': + return `Clé${r.keys.length > 1 ? 's' : ''} non reconnue${r.keys.length > 1 ? 's' : ''} : ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${r.origin}`; + case 'invalid_union': + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${r.origin}`; + default: + return 'Entrée invalide'; + } + }; + }; + function Cm() { + return { localeError: B_() }; + } + var G_ = () => { + let e = { + string: { unit: 'אותיות', verb: 'לכלול' }, + file: { unit: 'בייטים', verb: 'לכלול' }, + array: { unit: 'פריטים', verb: 'לכלול' }, + set: { unit: 'פריטים', verb: 'לכלול' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'קלט', + email: 'כתובת אימייל', + url: 'כתובת רשת', + emoji: "אימוג'י", + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'תאריך וזמן ISO', + date: 'תאריך ISO', + time: 'זמן ISO', + duration: 'משך זמן ISO', + ipv4: 'כתובת IPv4', + ipv6: 'כתובת IPv6', + cidrv4: 'טווח IPv4', + cidrv6: 'טווח IPv6', + base64: 'מחרוזת בבסיס 64', + base64url: 'מחרוזת בבסיס 64 לכתובות רשת', + json_string: 'מחרוזת JSON', + e164: 'מספר E.164', + jwt: 'JWT', + template_literal: 'קלט', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `קלט לא תקין: צריך ${r.expected}, התקבל ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `קלט לא תקין: צריך ${I(r.values[0])}` + : `קלט לא תקין: צריך אחת מהאפשרויות ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `גדול מדי: ${r.origin ?? 'value'} צריך להיות ${o}${r.maximum.toString()} ${s.unit ?? 'elements'}` + : `גדול מדי: ${r.origin ?? 'value'} צריך להיות ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `קטן מדי: ${r.origin} צריך להיות ${o}${r.minimum.toString()} ${s.unit}` + : `קטן מדי: ${r.origin} צריך להיות ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"` + : o.format === 'ends_with' + ? `מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"` + : o.format === 'includes' + ? `מחרוזת לא תקינה: חייבת לכלול "${o.includes}"` + : o.format === 'regex' + ? `מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}` + : `${n[o.format] ?? r.format} לא תקין`; + } + case 'not_multiple_of': + return `מספר לא תקין: חייב להיות מכפלה של ${r.divisor}`; + case 'unrecognized_keys': + return `מפתח${r.keys.length > 1 ? 'ות' : ''} לא מזוה${r.keys.length > 1 ? 'ים' : 'ה'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `מפתח לא תקין ב${r.origin}`; + case 'invalid_union': + return 'קלט לא תקין'; + case 'invalid_element': + return `ערך לא תקין ב${r.origin}`; + default: + return 'קלט לא תקין'; + } + }; + }; + function Lm() { + return { localeError: G_() }; + } + var K_ = () => { + let e = { + string: { unit: 'karakter', verb: 'legyen' }, + file: { unit: 'byte', verb: 'legyen' }, + array: { unit: 'elem', verb: 'legyen' }, + set: { unit: 'elem', verb: 'legyen' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'szám'; + case 'object': { + if (Array.isArray(r)) return 'tömb'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'bemenet', + email: 'email cím', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO időbélyeg', + date: 'ISO dátum', + time: 'ISO idő', + duration: 'ISO időintervallum', + ipv4: 'IPv4 cím', + ipv6: 'IPv6 cím', + cidrv4: 'IPv4 tartomány', + cidrv6: 'IPv6 tartomány', + base64: 'base64-kódolt string', + base64url: 'base64url-kódolt string', + json_string: 'JSON string', + e164: 'E.164 szám', + jwt: 'JWT', + template_literal: 'bemenet', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Érvénytelen bemenet: a várt érték ${r.expected}, a kapott érték ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Érvénytelen bemenet: a várt érték ${I(r.values[0])}` + : `Érvénytelen opció: valamelyik érték várt ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Túl nagy: ${r.origin ?? 'érték'} mérete túl nagy ${o}${r.maximum.toString()} ${s.unit ?? 'elem'}` + : `Túl nagy: a bemeneti érték ${r.origin ?? 'érték'} túl nagy: ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Túl kicsi: a bemeneti érték ${r.origin} mérete túl kicsi ${o}${r.minimum.toString()} ${s.unit}` + : `Túl kicsi: a bemeneti érték ${r.origin} túl kicsi ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie` + : o.format === 'ends_with' + ? `Érvénytelen string: "${o.suffix}" értékkel kell végződnie` + : o.format === 'includes' + ? `Érvénytelen string: "${o.includes}" értéket kell tartalmaznia` + : o.format === 'regex' + ? `Érvénytelen string: ${o.pattern} mintának kell megfelelnie` + : `Érvénytelen ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Érvénytelen szám: ${r.divisor} többszörösének kell lennie`; + case 'unrecognized_keys': + return `Ismeretlen kulcs${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Érvénytelen kulcs ${r.origin}`; + case 'invalid_union': + return 'Érvénytelen bemenet'; + case 'invalid_element': + return `Érvénytelen érték: ${r.origin}`; + default: + return 'Érvénytelen bemenet'; + } + }; + }; + function Rm() { + return { localeError: K_() }; + } + var q_ = () => { + let e = { + string: { unit: 'karakter', verb: 'memiliki' }, + file: { unit: 'byte', verb: 'memiliki' }, + array: { unit: 'item', verb: 'memiliki' }, + set: { unit: 'item', verb: 'memiliki' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'input', + email: 'alamat email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tanggal dan waktu format ISO', + date: 'tanggal format ISO', + time: 'jam format ISO', + duration: 'durasi format ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'rentang alamat IPv4', + cidrv6: 'rentang alamat IPv6', + base64: 'string dengan enkode base64', + base64url: 'string dengan enkode base64url', + json_string: 'string JSON', + e164: 'angka E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Input tidak valid: diharapkan ${r.expected}, diterima ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Input tidak valid: diharapkan ${I(r.values[0])}` + : `Pilihan tidak valid: diharapkan salah satu dari ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Terlalu besar: diharapkan ${r.origin ?? 'value'} memiliki ${o}${r.maximum.toString()} ${s.unit ?? 'elemen'}` + : `Terlalu besar: diharapkan ${r.origin ?? 'value'} menjadi ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${s.unit}` + : `Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `String tidak valid: harus dimulai dengan "${o.prefix}"` + : o.format === 'ends_with' + ? `String tidak valid: harus berakhir dengan "${o.suffix}"` + : o.format === 'includes' + ? `String tidak valid: harus menyertakan "${o.includes}"` + : o.format === 'regex' + ? `String tidak valid: harus sesuai pola ${o.pattern}` + : `${n[o.format] ?? r.format} tidak valid`; + } + case 'not_multiple_of': + return `Angka tidak valid: harus kelipatan dari ${r.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali ${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak valid di ${r.origin}`; + case 'invalid_union': + return 'Input tidak valid'; + case 'invalid_element': + return `Nilai tidak valid di ${r.origin}`; + default: + return 'Input tidak valid'; + } + }; + }; + function Jm() { + return { localeError: q_() }; + } + var X_ = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'númer'; + case 'object': { + if (Array.isArray(e)) return 'fylki'; + if (e === null) return 'null'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return t; + }, + H_ = () => { + let e = { + string: { unit: 'stafi', verb: 'að hafa' }, + file: { unit: 'bæti', verb: 'að hafa' }, + array: { unit: 'hluti', verb: 'að hafa' }, + set: { unit: 'hluti', verb: 'að hafa' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'gildi', + email: 'netfang', + url: 'vefslóð', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dagsetning og tími', + date: 'ISO dagsetning', + time: 'ISO tími', + duration: 'ISO tímalengd', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded strengur', + base64url: 'base64url-encoded strengur', + json_string: 'JSON strengur', + e164: 'E.164 tölugildi', + jwt: 'JWT', + template_literal: 'gildi', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Rangt gildi: Þú slóst inn ${X_(n.input)} þar sem á að vera ${n.expected}`; + case 'invalid_value': + return n.values.length === 1 + ? `Rangt gildi: gert ráð fyrir ${I(n.values[0])}` + : `Ógilt val: má vera eitt af eftirfarandi ${_(n.values, '|')}`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `Of stórt: gert er ráð fyrir að ${n.origin ?? 'gildi'} hafi ${r}${n.maximum.toString()} ${o.unit ?? 'hluti'}` + : `Of stórt: gert er ráð fyrir að ${n.origin ?? 'gildi'} sé ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `Of lítið: gert er ráð fyrir að ${n.origin} hafi ${r}${n.minimum.toString()} ${o.unit}` + : `Of lítið: gert er ráð fyrir að ${n.origin} sé ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `Ógildur strengur: verður að byrja á "${r.prefix}"` + : r.format === 'ends_with' + ? `Ógildur strengur: verður að enda á "${r.suffix}"` + : r.format === 'includes' + ? `Ógildur strengur: verður að innihalda "${r.includes}"` + : r.format === 'regex' + ? `Ógildur strengur: verður að fylgja mynstri ${r.pattern}` + : `Rangt ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `Röng tala: verður að vera margfeldi af ${n.divisor}`; + case 'unrecognized_keys': + return `Óþekkt ${n.keys.length > 1 ? 'ir lyklar' : 'ur lykill'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Rangur lykill í ${n.origin}`; + case 'invalid_union': + return 'Rangt gildi'; + case 'invalid_element': + return `Rangt gildi í ${n.origin}`; + default: + return 'Rangt gildi'; + } + }; + }; + function Fm() { + return { localeError: H_() }; + } + var Y_ = () => { + let e = { + string: { unit: 'caratteri', verb: 'avere' }, + file: { unit: 'byte', verb: 'avere' }, + array: { unit: 'elementi', verb: 'avere' }, + set: { unit: 'elementi', verb: 'avere' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'numero'; + case 'object': { + if (Array.isArray(r)) return 'vettore'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'input', + email: 'indirizzo email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e ora ISO', + date: 'data ISO', + time: 'ora ISO', + duration: 'durata ISO', + ipv4: 'indirizzo IPv4', + ipv6: 'indirizzo IPv6', + cidrv4: 'intervallo IPv4', + cidrv6: 'intervallo IPv6', + base64: 'stringa codificata in base64', + base64url: 'URL codificata in base64', + json_string: 'stringa JSON', + e164: 'numero E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Input non valido: atteso ${r.expected}, ricevuto ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Input non valido: atteso ${I(r.values[0])}` + : `Opzione non valida: atteso uno tra ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Troppo grande: ${r.origin ?? 'valore'} deve avere ${o}${r.maximum.toString()} ${s.unit ?? 'elementi'}` + : `Troppo grande: ${r.origin ?? 'valore'} deve essere ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${s.unit}` + : `Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Stringa non valida: deve iniziare con "${o.prefix}"` + : o.format === 'ends_with' + ? `Stringa non valida: deve terminare con "${o.suffix}"` + : o.format === 'includes' + ? `Stringa non valida: deve includere "${o.includes}"` + : o.format === 'regex' + ? `Stringa non valida: deve corrispondere al pattern ${o.pattern}` + : `Invalid ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Numero non valido: deve essere un multiplo di ${r.divisor}`; + case 'unrecognized_keys': + return `Chiav${r.keys.length > 1 ? 'i' : 'e'} non riconosciut${r.keys.length > 1 ? 'e' : 'a'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Chiave non valida in ${r.origin}`; + case 'invalid_union': + return 'Input non valido'; + case 'invalid_element': + return `Valore non valido in ${r.origin}`; + default: + return 'Input non valido'; + } + }; + }; + function Vm() { + return { localeError: Y_() }; + } + var Q_ = () => { + let e = { + string: { unit: '文字', verb: 'である' }, + file: { unit: 'バイト', verb: 'である' }, + array: { unit: '要素', verb: 'である' }, + set: { unit: '要素', verb: 'である' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : '数値'; + case 'object': { + if (Array.isArray(r)) return '配列'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: '入力値', + email: 'メールアドレス', + url: 'URL', + emoji: '絵文字', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日時', + date: 'ISO日付', + time: 'ISO時刻', + duration: 'ISO期間', + ipv4: 'IPv4アドレス', + ipv6: 'IPv6アドレス', + cidrv4: 'IPv4範囲', + cidrv6: 'IPv6範囲', + base64: 'base64エンコード文字列', + base64url: 'base64urlエンコード文字列', + json_string: 'JSON文字列', + e164: 'E.164番号', + jwt: 'JWT', + template_literal: '入力値', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `無効な入力: ${r.expected}が期待されましたが、${i(r.input)}が入力されました`; + case 'invalid_value': + return r.values.length === 1 + ? `無効な入力: ${I(r.values[0])}が期待されました` + : `無効な選択: ${_(r.values, '、')}のいずれかである必要があります`; + case 'too_big': { + let o = r.inclusive ? '以下である' : 'より小さい', + s = t(r.origin); + return s + ? `大きすぎる値: ${r.origin ?? '値'}は${r.maximum.toString()}${s.unit ?? '要素'}${o}必要があります` + : `大きすぎる値: ${r.origin ?? '値'}は${r.maximum.toString()}${o}必要があります`; + } + case 'too_small': { + let o = r.inclusive ? '以上である' : 'より大きい', + s = t(r.origin); + return s + ? `小さすぎる値: ${r.origin}は${r.minimum.toString()}${s.unit}${o}必要があります` + : `小さすぎる値: ${r.origin}は${r.minimum.toString()}${o}必要があります`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `無効な文字列: "${o.prefix}"で始まる必要があります` + : o.format === 'ends_with' + ? `無効な文字列: "${o.suffix}"で終わる必要があります` + : o.format === 'includes' + ? `無効な文字列: "${o.includes}"を含む必要があります` + : o.format === 'regex' + ? `無効な文字列: パターン${o.pattern}に一致する必要があります` + : `無効な${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `無効な数値: ${r.divisor}の倍数である必要があります`; + case 'unrecognized_keys': + return `認識されていないキー${r.keys.length > 1 ? '群' : ''}: ${_(r.keys, '、')}`; + case 'invalid_key': + return `${r.origin}内の無効なキー`; + case 'invalid_union': + return '無効な入力'; + case 'invalid_element': + return `${r.origin}内の無効な値`; + default: + return '無効な入力'; + } + }; + }; + function Mm() { + return { localeError: Q_() }; + } + var ek = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'რიცხვი'; + case 'object': { + if (Array.isArray(e)) return 'მასივი'; + if (e === null) return 'null'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return ( + { + string: 'სტრინგი', + boolean: 'ბულეანი', + undefined: 'undefined', + bigint: 'bigint', + symbol: 'symbol', + function: 'ფუნქცია', + }[t] ?? t + ); + }, + tk = () => { + let e = { + string: { unit: 'სიმბოლო', verb: 'უნდა შეიცავდეს' }, + file: { unit: 'ბაიტი', verb: 'უნდა შეიცავდეს' }, + array: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + set: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'შეყვანა', + email: 'ელ-ფოსტის მისამართი', + url: 'URL', + emoji: 'ემოჯი', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'თარიღი-დრო', + date: 'თარიღი', + time: 'დრო', + duration: 'ხანგრძლივობა', + ipv4: 'IPv4 მისამართი', + ipv6: 'IPv6 მისამართი', + cidrv4: 'IPv4 დიაპაზონი', + cidrv6: 'IPv6 დიაპაზონი', + base64: 'base64-კოდირებული სტრინგი', + base64url: 'base64url-კოდირებული სტრინგი', + json_string: 'JSON სტრინგი', + e164: 'E.164 ნომერი', + jwt: 'JWT', + template_literal: 'შეყვანა', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `არასწორი შეყვანა: მოსალოდნელი ${n.expected}, მიღებული ${ek(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `არასწორი შეყვანა: მოსალოდნელი ${I(n.values[0])}` + : `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${_(n.values, '|')}-დან`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `ზედმეტად დიდი: მოსალოდნელი ${n.origin ?? 'მნიშვნელობა'} ${o.verb} ${r}${n.maximum.toString()} ${o.unit}` + : `ზედმეტად დიდი: მოსალოდნელი ${n.origin ?? 'მნიშვნელობა'} იყოს ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${o.verb} ${r}${n.minimum.toString()} ${o.unit}` + : `ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით` + : r.format === 'ends_with' + ? `არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით` + : r.format === 'includes' + ? `არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს` + : r.format === 'regex' + ? `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}` + : `არასწორი ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`; + case 'unrecognized_keys': + return `უცნობი გასაღებ${n.keys.length > 1 ? 'ები' : 'ი'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `არასწორი გასაღები ${n.origin}-ში`; + case 'invalid_union': + return 'არასწორი შეყვანა'; + case 'invalid_element': + return `არასწორი მნიშვნელობა ${n.origin}-ში`; + default: + return 'არასწორი შეყვანა'; + } + }; + }; + function Wm() { + return { localeError: tk() }; + } + var nk = () => { + let e = { + string: { unit: 'តួអក្សរ', verb: 'គួរមាន' }, + file: { unit: 'បៃ', verb: 'គួរមាន' }, + array: { unit: 'ធាតុ', verb: 'គួរមាន' }, + set: { unit: 'ធាតុ', verb: 'គួរមាន' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'មិនមែនជាលេខ (NaN)' : 'លេខ'; + case 'object': { + if (Array.isArray(r)) return 'អារេ (Array)'; + if (r === null) return 'គ្មានតម្លៃ (null)'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ទិន្នន័យបញ្ចូល', + email: 'អាសយដ្ឋានអ៊ីមែល', + url: 'URL', + emoji: 'សញ្ញាអារម្មណ៍', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'កាលបរិច្ឆេទ និងម៉ោង ISO', + date: 'កាលបរិច្ឆេទ ISO', + time: 'ម៉ោង ISO', + duration: 'រយៈពេល ISO', + ipv4: 'អាសយដ្ឋាន IPv4', + ipv6: 'អាសយដ្ឋាន IPv6', + cidrv4: 'ដែនអាសយដ្ឋាន IPv4', + cidrv6: 'ដែនអាសយដ្ឋាន IPv6', + base64: 'ខ្សែអក្សរអ៊ិកូដ base64', + base64url: 'ខ្សែអក្សរអ៊ិកូដ base64url', + json_string: 'ខ្សែអក្សរ JSON', + e164: 'លេខ E.164', + jwt: 'JWT', + template_literal: 'ទិន្នន័យបញ្ចូល', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r.expected} ប៉ុន្តែទទួលបាន ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${I(r.values[0])}` + : `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `ធំពេក៖ ត្រូវការ ${r.origin ?? 'តម្លៃ'} ${o} ${r.maximum.toString()} ${s.unit ?? 'ធាតុ'}` + : `ធំពេក៖ ត្រូវការ ${r.origin ?? 'តម្លៃ'} ${o} ${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `តូចពេក៖ ត្រូវការ ${r.origin} ${o} ${r.minimum.toString()} ${s.unit}` + : `តូចពេក៖ ត្រូវការ ${r.origin} ${o} ${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"` + : o.format === 'ends_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"` + : o.format === 'includes' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"` + : o.format === 'regex' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}` + : `មិនត្រឹមត្រូវ៖ ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`; + case 'unrecognized_keys': + return `រកឃើញសោមិនស្គាល់៖ ${_(r.keys, ', ')}`; + case 'invalid_key': + return `សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`; + case 'invalid_union': + return 'ទិន្នន័យមិនត្រឹមត្រូវ'; + case 'invalid_element': + return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`; + default: + return 'ទិន្នន័យមិនត្រឹមត្រូវ'; + } + }; + }; + function Lr() { + return { localeError: nk() }; + } + function Bm() { + return Lr(); + } + var rk = () => { + let e = { + string: { unit: '문자', verb: 'to have' }, + file: { unit: '바이트', verb: 'to have' }, + array: { unit: '개', verb: 'to have' }, + set: { unit: '개', verb: 'to have' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: '입력', + email: '이메일 주소', + url: 'URL', + emoji: '이모지', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 날짜시간', + date: 'ISO 날짜', + time: 'ISO 시간', + duration: 'ISO 기간', + ipv4: 'IPv4 주소', + ipv6: 'IPv6 주소', + cidrv4: 'IPv4 범위', + cidrv6: 'IPv6 범위', + base64: 'base64 인코딩 문자열', + base64url: 'base64url 인코딩 문자열', + json_string: 'JSON 문자열', + e164: 'E.164 번호', + jwt: 'JWT', + template_literal: '입력', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `잘못된 입력: 예상 타입은 ${r.expected}, 받은 타입은 ${i(r.input)}입니다`; + case 'invalid_value': + return r.values.length === 1 + ? `잘못된 입력: 값은 ${I(r.values[0])} 이어야 합니다` + : `잘못된 옵션: ${_(r.values, '또는 ')} 중 하나여야 합니다`; + case 'too_big': { + let o = r.inclusive ? '이하' : '미만', + s = o === '미만' ? '이어야 합니다' : '여야 합니다', + u = t(r.origin), + a = u?.unit ?? '요소'; + return u + ? `${r.origin ?? '값'}이 너무 큽니다: ${r.maximum.toString()}${a} ${o}${s}` + : `${r.origin ?? '값'}이 너무 큽니다: ${r.maximum.toString()} ${o}${s}`; + } + case 'too_small': { + let o = r.inclusive ? '이상' : '초과', + s = o === '이상' ? '이어야 합니다' : '여야 합니다', + u = t(r.origin), + a = u?.unit ?? '요소'; + return u + ? `${r.origin ?? '값'}이 너무 작습니다: ${r.minimum.toString()}${a} ${o}${s}` + : `${r.origin ?? '값'}이 너무 작습니다: ${r.minimum.toString()} ${o}${s}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다` + : o.format === 'ends_with' + ? `잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다` + : o.format === 'includes' + ? `잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다` + : o.format === 'regex' + ? `잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다` + : `잘못된 ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `잘못된 숫자: ${r.divisor}의 배수여야 합니다`; + case 'unrecognized_keys': + return `인식할 수 없는 키: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `잘못된 키: ${r.origin}`; + case 'invalid_union': + return '잘못된 입력'; + case 'invalid_element': + return `잘못된 값: ${r.origin}`; + default: + return '잘못된 입력'; + } + }; + }; + function Gm() { + return { localeError: rk() }; + } + var ik = (e) => pn(typeof e, e), + pn = (e, t = void 0) => { + switch (e) { + case 'number': + return Number.isNaN(t) ? 'NaN' : 'skaičius'; + case 'bigint': + return 'sveikasis skaičius'; + case 'string': + return 'eilutė'; + case 'boolean': + return 'loginė reikšmė'; + case 'undefined': + case 'void': + return 'neapibrėžta reikšmė'; + case 'function': + return 'funkcija'; + case 'symbol': + return 'simbolis'; + case 'object': + return t === void 0 + ? 'nežinomas objektas' + : t === null + ? 'nulinė reikšmė' + : Array.isArray(t) + ? 'masyvas' + : Object.getPrototypeOf(t) !== Object.prototype && t.constructor + ? t.constructor.name + : 'objektas'; + case 'null': + return 'nulinė reikšmė'; + } + return e; + }, + mn = (e) => e.charAt(0).toUpperCase() + e.slice(1); + function Km(e) { + let t = Math.abs(e), + i = t % 10, + n = t % 100; + return (n >= 11 && n <= 19) || i === 0 ? 'many' : i === 1 ? 'one' : 'few'; + } + var ok = () => { + let e = { + string: { + unit: { one: 'simbolis', few: 'simboliai', many: 'simbolių' }, + verb: { + smaller: { + inclusive: 'turi būti ne ilgesnė kaip', + notInclusive: 'turi būti trumpesnė kaip', + }, + bigger: { + inclusive: 'turi būti ne trumpesnė kaip', + notInclusive: 'turi būti ilgesnė kaip', + }, + }, + }, + file: { + unit: { one: 'baitas', few: 'baitai', many: 'baitų' }, + verb: { + smaller: { + inclusive: 'turi būti ne didesnis kaip', + notInclusive: 'turi būti mažesnis kaip', + }, + bigger: { + inclusive: 'turi būti ne mažesnis kaip', + notInclusive: 'turi būti didesnis kaip', + }, + }, + }, + array: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + set: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + }; + function t(n, r, o, s) { + let u = e[n] ?? null; + return u === null + ? u + : { + unit: u.unit[r], + verb: u.verb[s][o ? 'inclusive' : 'notInclusive'], + }; + } + let i = { + regex: 'įvestis', + email: 'el. pašto adresas', + url: 'URL', + emoji: 'jaustukas', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO data ir laikas', + date: 'ISO data', + time: 'ISO laikas', + duration: 'ISO trukmė', + ipv4: 'IPv4 adresas', + ipv6: 'IPv6 adresas', + cidrv4: 'IPv4 tinklo prefiksas (CIDR)', + cidrv6: 'IPv6 tinklo prefiksas (CIDR)', + base64: 'base64 užkoduota eilutė', + base64url: 'base64url užkoduota eilutė', + json_string: 'JSON eilutė', + e164: 'E.164 numeris', + jwt: 'JWT', + template_literal: 'įvestis', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Gautas tipas ${ik(n.input)}, o tikėtasi - ${pn(n.expected)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Privalo būti ${I(n.values[0])}` + : `Privalo būti vienas iš ${_(n.values, '|')} pasirinkimų`; + case 'too_big': { + let r = pn(n.origin), + o = t( + n.origin, + Km(Number(n.maximum)), + n.inclusive ?? !1, + 'smaller', + ); + if (o?.verb) + return `${mn(r ?? n.origin ?? 'reikšmė')} ${o.verb} ${n.maximum.toString()} ${o.unit ?? 'elementų'}`; + let s = n.inclusive ? 'ne didesnis kaip' : 'mažesnis kaip'; + return `${mn(r ?? n.origin ?? 'reikšmė')} turi būti ${s} ${n.maximum.toString()} ${o?.unit}`; + } + case 'too_small': { + let r = pn(n.origin), + o = t(n.origin, Km(Number(n.minimum)), n.inclusive ?? !1, 'bigger'); + if (o?.verb) + return `${mn(r ?? n.origin ?? 'reikšmė')} ${o.verb} ${n.minimum.toString()} ${o.unit ?? 'elementų'}`; + let s = n.inclusive ? 'ne mažesnis kaip' : 'didesnis kaip'; + return `${mn(r ?? n.origin ?? 'reikšmė')} turi būti ${s} ${n.minimum.toString()} ${o?.unit}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `Eilutė privalo prasidėti "${r.prefix}"` + : r.format === 'ends_with' + ? `Eilutė privalo pasibaigti "${r.suffix}"` + : r.format === 'includes' + ? `Eilutė privalo įtraukti "${r.includes}"` + : r.format === 'regex' + ? `Eilutė privalo atitikti ${r.pattern}` + : `Neteisingas ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `Skaičius privalo būti ${n.divisor} kartotinis.`; + case 'unrecognized_keys': + return `Neatpažint${n.keys.length > 1 ? 'i' : 'as'} rakt${n.keys.length > 1 ? 'ai' : 'as'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return 'Rastas klaidingas raktas'; + case 'invalid_union': + return 'Klaidinga įvestis'; + case 'invalid_element': { + let r = pn(n.origin); + return `${mn(r ?? n.origin ?? 'reikšmė')} turi klaidingą įvestį`; + } + default: + return 'Klaidinga įvestis'; + } + }; + }; + function qm() { + return { localeError: ok() }; + } + var ak = () => { + let e = { + string: { unit: 'знаци', verb: 'да имаат' }, + file: { unit: 'бајти', verb: 'да имаат' }, + array: { unit: 'ставки', verb: 'да имаат' }, + set: { unit: 'ставки', verb: 'да имаат' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'број'; + case 'object': { + if (Array.isArray(r)) return 'низа'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'внес', + email: 'адреса на е-пошта', + url: 'URL', + emoji: 'емоџи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO датум и време', + date: 'ISO датум', + time: 'ISO време', + duration: 'ISO времетраење', + ipv4: 'IPv4 адреса', + ipv6: 'IPv6 адреса', + cidrv4: 'IPv4 опсег', + cidrv6: 'IPv6 опсег', + base64: 'base64-енкодирана низа', + base64url: 'base64url-енкодирана низа', + json_string: 'JSON низа', + e164: 'E.164 број', + jwt: 'JWT', + template_literal: 'внес', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Грешен внес: се очекува ${r.expected}, примено ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Invalid input: expected ${I(r.values[0])}` + : `Грешана опција: се очекува една ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Премногу голем: се очекува ${r.origin ?? 'вредноста'} да има ${o}${r.maximum.toString()} ${s.unit ?? 'елементи'}` + : `Премногу голем: се очекува ${r.origin ?? 'вредноста'} да биде ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Премногу мал: се очекува ${r.origin} да има ${o}${r.minimum.toString()} ${s.unit}` + : `Премногу мал: се очекува ${r.origin} да биде ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Неважечка низа: мора да започнува со "${o.prefix}"` + : o.format === 'ends_with' + ? `Неважечка низа: мора да завршува со "${o.suffix}"` + : o.format === 'includes' + ? `Неважечка низа: мора да вклучува "${o.includes}"` + : o.format === 'regex' + ? `Неважечка низа: мора да одгоара на патернот ${o.pattern}` + : `Invalid ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Грешен број: мора да биде делив со ${r.divisor}`; + case 'unrecognized_keys': + return `${r.keys.length > 1 ? 'Непрепознаени клучеви' : 'Непрепознаен клуч'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Грешен клуч во ${r.origin}`; + case 'invalid_union': + return 'Грешен внес'; + case 'invalid_element': + return `Грешна вредност во ${r.origin}`; + default: + return 'Грешен внес'; + } + }; + }; + function Xm() { + return { localeError: ak() }; + } + var sk = () => { + let e = { + string: { unit: 'aksara', verb: 'mempunyai' }, + file: { unit: 'bait', verb: 'mempunyai' }, + array: { unit: 'elemen', verb: 'mempunyai' }, + set: { unit: 'elemen', verb: 'mempunyai' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'nombor'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'input', + email: 'alamat e-mel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tarikh masa ISO', + date: 'tarikh ISO', + time: 'masa ISO', + duration: 'tempoh ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'julat IPv4', + cidrv6: 'julat IPv6', + base64: 'string dikodkan base64', + base64url: 'string dikodkan base64url', + json_string: 'string JSON', + e164: 'nombor E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Input tidak sah: dijangka ${r.expected}, diterima ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Input tidak sah: dijangka ${I(r.values[0])}` + : `Pilihan tidak sah: dijangka salah satu daripada ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Terlalu besar: dijangka ${r.origin ?? 'nilai'} ${s.verb} ${o}${r.maximum.toString()} ${s.unit ?? 'elemen'}` + : `Terlalu besar: dijangka ${r.origin ?? 'nilai'} adalah ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Terlalu kecil: dijangka ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}` + : `Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `String tidak sah: mesti bermula dengan "${o.prefix}"` + : o.format === 'ends_with' + ? `String tidak sah: mesti berakhir dengan "${o.suffix}"` + : o.format === 'includes' + ? `String tidak sah: mesti mengandungi "${o.includes}"` + : o.format === 'regex' + ? `String tidak sah: mesti sepadan dengan corak ${o.pattern}` + : `${n[o.format] ?? r.format} tidak sah`; + } + case 'not_multiple_of': + return `Nombor tidak sah: perlu gandaan ${r.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak sah dalam ${r.origin}`; + case 'invalid_union': + return 'Input tidak sah'; + case 'invalid_element': + return `Nilai tidak sah dalam ${r.origin}`; + default: + return 'Input tidak sah'; + } + }; + }; + function Hm() { + return { localeError: sk() }; + } + var uk = () => { + let e = { + string: { unit: 'tekens' }, + file: { unit: 'bytes' }, + array: { unit: 'elementen' }, + set: { unit: 'elementen' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'getal'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'invoer', + email: 'emailadres', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum en tijd', + date: 'ISO datum', + time: 'ISO tijd', + duration: 'ISO duur', + ipv4: 'IPv4-adres', + ipv6: 'IPv6-adres', + cidrv4: 'IPv4-bereik', + cidrv6: 'IPv6-bereik', + base64: 'base64-gecodeerde tekst', + base64url: 'base64 URL-gecodeerde tekst', + json_string: 'JSON string', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'invoer', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Ongeldige invoer: verwacht ${r.expected}, ontving ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Ongeldige invoer: verwacht ${I(r.values[0])}` + : `Ongeldige optie: verwacht één van ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Te lang: verwacht dat ${r.origin ?? 'waarde'} ${o}${r.maximum.toString()} ${s.unit ?? 'elementen'} bevat` + : `Te lang: verwacht dat ${r.origin ?? 'waarde'} ${o}${r.maximum.toString()} is`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Te kort: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${s.unit} bevat` + : `Te kort: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Ongeldige tekst: moet met "${o.prefix}" beginnen` + : o.format === 'ends_with' + ? `Ongeldige tekst: moet op "${o.suffix}" eindigen` + : o.format === 'includes' + ? `Ongeldige tekst: moet "${o.includes}" bevatten` + : o.format === 'regex' + ? `Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}` + : `Ongeldig: ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`; + case 'unrecognized_keys': + return `Onbekende key${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Ongeldige key in ${r.origin}`; + case 'invalid_union': + return 'Ongeldige invoer'; + case 'invalid_element': + return `Ongeldige waarde in ${r.origin}`; + default: + return 'Ongeldige invoer'; + } + }; + }; + function Ym() { + return { localeError: uk() }; + } + var ck = () => { + let e = { + string: { unit: 'tegn', verb: 'å ha' }, + file: { unit: 'bytes', verb: 'å ha' }, + array: { unit: 'elementer', verb: 'å inneholde' }, + set: { unit: 'elementer', verb: 'å inneholde' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'tall'; + case 'object': { + if (Array.isArray(r)) return 'liste'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'input', + email: 'e-postadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslett', + date: 'ISO-dato', + time: 'ISO-klokkeslett', + duration: 'ISO-varighet', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spekter', + cidrv6: 'IPv6-spekter', + base64: 'base64-enkodet streng', + base64url: 'base64url-enkodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Ugyldig input: forventet ${r.expected}, fikk ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Ugyldig verdi: forventet ${I(r.values[0])}` + : `Ugyldig valg: forventet en av ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `For stor(t): forventet ${r.origin ?? 'value'} til å ha ${o}${r.maximum.toString()} ${s.unit ?? 'elementer'}` + : `For stor(t): forventet ${r.origin ?? 'value'} til å ha ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `For lite(n): forventet ${r.origin} til å ha ${o}${r.minimum.toString()} ${s.unit}` + : `For lite(n): forventet ${r.origin} til å ha ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Ugyldig streng: må starte med "${o.prefix}"` + : o.format === 'ends_with' + ? `Ugyldig streng: må ende med "${o.suffix}"` + : o.format === 'includes' + ? `Ugyldig streng: må inneholde "${o.includes}"` + : o.format === 'regex' + ? `Ugyldig streng: må matche mønsteret ${o.pattern}` + : `Ugyldig ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Ugyldig tall: må være et multiplum av ${r.divisor}`; + case 'unrecognized_keys': + return `${r.keys.length > 1 ? 'Ukjente nøkler' : 'Ukjent nøkkel'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøkkel i ${r.origin}`; + case 'invalid_union': + return 'Ugyldig input'; + case 'invalid_element': + return `Ugyldig verdi i ${r.origin}`; + default: + return 'Ugyldig input'; + } + }; + }; + function Qm() { + return { localeError: ck() }; + } + var lk = () => { + let e = { + string: { unit: 'harf', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'unsur', verb: 'olmalıdır' }, + set: { unit: 'unsur', verb: 'olmalıdır' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'numara'; + case 'object': { + if (Array.isArray(r)) return 'saf'; + if (r === null) return 'gayb'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'giren', + email: 'epostagâh', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO hengâmı', + date: 'ISO tarihi', + time: 'ISO zamanı', + duration: 'ISO müddeti', + ipv4: 'IPv4 nişânı', + ipv6: 'IPv6 nişânı', + cidrv4: 'IPv4 menzili', + cidrv6: 'IPv6 menzili', + base64: 'base64-şifreli metin', + base64url: 'base64url-şifreli metin', + json_string: 'JSON metin', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'giren', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Fâsit giren: umulan ${r.expected}, alınan ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Fâsit giren: umulan ${I(r.values[0])}` + : `Fâsit tercih: mûteberler ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Fazla büyük: ${r.origin ?? 'value'}, ${o}${r.maximum.toString()} ${s.unit ?? 'elements'} sahip olmalıydı.` + : `Fazla büyük: ${r.origin ?? 'value'}, ${o}${r.maximum.toString()} olmalıydı.`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Fazla küçük: ${r.origin}, ${o}${r.minimum.toString()} ${s.unit} sahip olmalıydı.` + : `Fazla küçük: ${r.origin}, ${o}${r.minimum.toString()} olmalıydı.`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Fâsit metin: "${o.prefix}" ile başlamalı.` + : o.format === 'ends_with' + ? `Fâsit metin: "${o.suffix}" ile bitmeli.` + : o.format === 'includes' + ? `Fâsit metin: "${o.includes}" ihtivâ etmeli.` + : o.format === 'regex' + ? `Fâsit metin: ${o.pattern} nakşına uymalı.` + : `Fâsit ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Fâsit sayı: ${r.divisor} katı olmalıydı.`; + case 'unrecognized_keys': + return `Tanınmayan anahtar ${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `${r.origin} için tanınmayan anahtar var.`; + case 'invalid_union': + return 'Giren tanınamadı.'; + case 'invalid_element': + return `${r.origin} için tanınmayan kıymet var.`; + default: + return 'Kıymet tanınamadı.'; + } + }; + }; + function ep() { + return { localeError: lk() }; + } + var dk = () => { + let e = { + string: { unit: 'توکي', verb: 'ولري' }, + file: { unit: 'بایټس', verb: 'ولري' }, + array: { unit: 'توکي', verb: 'ولري' }, + set: { unit: 'توکي', verb: 'ولري' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'عدد'; + case 'object': { + if (Array.isArray(r)) return 'ارې'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ورودي', + email: 'بریښنالیک', + url: 'یو آر ال', + emoji: 'ایموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'نیټه او وخت', + date: 'نېټه', + time: 'وخت', + duration: 'موده', + ipv4: 'د IPv4 پته', + ipv6: 'د IPv6 پته', + cidrv4: 'د IPv4 ساحه', + cidrv6: 'د IPv6 ساحه', + base64: 'base64-encoded متن', + base64url: 'base64url-encoded متن', + json_string: 'JSON متن', + e164: 'د E.164 شمېره', + jwt: 'JWT', + template_literal: 'ورودي', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `ناسم ورودي: باید ${r.expected} وای, مګر ${i(r.input)} ترلاسه شو`; + case 'invalid_value': + return r.values.length === 1 + ? `ناسم ورودي: باید ${I(r.values[0])} وای` + : `ناسم انتخاب: باید یو له ${_(r.values, '|')} څخه وای`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `ډیر لوی: ${r.origin ?? 'ارزښت'} باید ${o}${r.maximum.toString()} ${s.unit ?? 'عنصرونه'} ولري` + : `ډیر لوی: ${r.origin ?? 'ارزښت'} باید ${o}${r.maximum.toString()} وي`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `ډیر کوچنی: ${r.origin} باید ${o}${r.minimum.toString()} ${s.unit} ولري` + : `ډیر کوچنی: ${r.origin} باید ${o}${r.minimum.toString()} وي`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `ناسم متن: باید د "${o.prefix}" سره پیل شي` + : o.format === 'ends_with' + ? `ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي` + : o.format === 'includes' + ? `ناسم متن: باید "${o.includes}" ولري` + : o.format === 'regex' + ? `ناسم متن: باید د ${o.pattern} سره مطابقت ولري` + : `${n[o.format] ?? r.format} ناسم دی`; + } + case 'not_multiple_of': + return `ناسم عدد: باید د ${r.divisor} مضرب وي`; + case 'unrecognized_keys': + return `ناسم ${r.keys.length > 1 ? 'کلیډونه' : 'کلیډ'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `ناسم کلیډ په ${r.origin} کې`; + case 'invalid_union': + return 'ناسمه ورودي'; + case 'invalid_element': + return `ناسم عنصر په ${r.origin} کې`; + default: + return 'ناسمه ورودي'; + } + }; + }; + function tp() { + return { localeError: dk() }; + } + var mk = () => { + let e = { + string: { unit: 'znaków', verb: 'mieć' }, + file: { unit: 'bajtów', verb: 'mieć' }, + array: { unit: 'elementów', verb: 'mieć' }, + set: { unit: 'elementów', verb: 'mieć' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'liczba'; + case 'object': { + if (Array.isArray(r)) return 'tablica'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'wyrażenie', + email: 'adres email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i godzina w formacie ISO', + date: 'data w formacie ISO', + time: 'godzina w formacie ISO', + duration: 'czas trwania ISO', + ipv4: 'adres IPv4', + ipv6: 'adres IPv6', + cidrv4: 'zakres IPv4', + cidrv6: 'zakres IPv6', + base64: 'ciąg znaków zakodowany w formacie base64', + base64url: 'ciąg znaków zakodowany w formacie base64url', + json_string: 'ciąg znaków w formacie JSON', + e164: 'liczba E.164', + jwt: 'JWT', + template_literal: 'wejście', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Nieprawidłowe dane wejściowe: oczekiwano ${r.expected}, otrzymano ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Nieprawidłowe dane wejściowe: oczekiwano ${I(r.values[0])}` + : `Nieprawidłowa opcja: oczekiwano jednej z wartości ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Za duża wartość: oczekiwano, że ${r.origin ?? 'wartość'} będzie mieć ${o}${r.maximum.toString()} ${s.unit ?? 'elementów'}` + : `Zbyt duż(y/a/e): oczekiwano, że ${r.origin ?? 'wartość'} będzie wynosić ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Za mała wartość: oczekiwano, że ${r.origin ?? 'wartość'} będzie mieć ${o}${r.minimum.toString()} ${s.unit ?? 'elementów'}` + : `Zbyt mał(y/a/e): oczekiwano, że ${r.origin ?? 'wartość'} będzie wynosić ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"` + : o.format === 'ends_with' + ? `Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"` + : o.format === 'includes' + ? `Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"` + : o.format === 'regex' + ? `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}` + : `Nieprawidłow(y/a/e) ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`; + case 'unrecognized_keys': + return `Nierozpoznane klucze${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Nieprawidłowy klucz w ${r.origin}`; + case 'invalid_union': + return 'Nieprawidłowe dane wejściowe'; + case 'invalid_element': + return `Nieprawidłowa wartość w ${r.origin}`; + default: + return 'Nieprawidłowe dane wejściowe'; + } + }; + }; + function np() { + return { localeError: mk() }; + } + var pk = () => { + let e = { + string: { unit: 'caracteres', verb: 'ter' }, + file: { unit: 'bytes', verb: 'ter' }, + array: { unit: 'itens', verb: 'ter' }, + set: { unit: 'itens', verb: 'ter' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'número'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'nulo'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'padrão', + email: 'endereço de e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'duração ISO', + ipv4: 'endereço IPv4', + ipv6: 'endereço IPv6', + cidrv4: 'faixa de IPv4', + cidrv6: 'faixa de IPv6', + base64: 'texto codificado em base64', + base64url: 'URL codificada em base64', + json_string: 'texto JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Tipo inválido: esperado ${r.expected}, recebido ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Entrada inválida: esperado ${I(r.values[0])}` + : `Opção inválida: esperada uma das ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Muito grande: esperado que ${r.origin ?? 'valor'} tivesse ${o}${r.maximum.toString()} ${s.unit ?? 'elementos'}` + : `Muito grande: esperado que ${r.origin ?? 'valor'} fosse ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${s.unit}` + : `Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Texto inválido: deve começar com "${o.prefix}"` + : o.format === 'ends_with' + ? `Texto inválido: deve terminar com "${o.suffix}"` + : o.format === 'includes' + ? `Texto inválido: deve incluir "${o.includes}"` + : o.format === 'regex' + ? `Texto inválido: deve corresponder ao padrão ${o.pattern}` + : `${n[o.format] ?? r.format} inválido`; + } + case 'not_multiple_of': + return `Número inválido: deve ser múltiplo de ${r.divisor}`; + case 'unrecognized_keys': + return `Chave${r.keys.length > 1 ? 's' : ''} desconhecida${r.keys.length > 1 ? 's' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Chave inválida em ${r.origin}`; + case 'invalid_union': + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido em ${r.origin}`; + default: + return 'Campo inválido'; + } + }; + }; + function rp() { + return { localeError: pk() }; + } + function ip(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var fk = () => { + let e = { + string: { + unit: { one: 'символ', few: 'символа', many: 'символов' }, + verb: 'иметь', + }, + file: { + unit: { one: 'байт', few: 'байта', many: 'байт' }, + verb: 'иметь', + }, + array: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + set: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'число'; + case 'object': { + if (Array.isArray(r)) return 'массив'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ввод', + email: 'email адрес', + url: 'URL', + emoji: 'эмодзи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата и время', + date: 'ISO дата', + time: 'ISO время', + duration: 'ISO длительность', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'строка в формате base64', + base64url: 'строка в формате base64url', + json_string: 'JSON строка', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'ввод', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Неверный ввод: ожидалось ${r.expected}, получено ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Неверный ввод: ожидалось ${I(r.values[0])}` + : `Неверный вариант: ожидалось одно из ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + if (s) { + let u = Number(r.maximum), + a = ip(u, s.unit.one, s.unit.few, s.unit.many); + return `Слишком большое значение: ожидалось, что ${r.origin ?? 'значение'} будет иметь ${o}${r.maximum.toString()} ${a}`; + } + return `Слишком большое значение: ожидалось, что ${r.origin ?? 'значение'} будет ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + if (s) { + let u = Number(r.minimum), + a = ip(u, s.unit.one, s.unit.few, s.unit.many); + return `Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${o}${r.minimum.toString()} ${a}`; + } + return `Слишком маленькое значение: ожидалось, что ${r.origin} будет ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Неверная строка: должна начинаться с "${o.prefix}"` + : o.format === 'ends_with' + ? `Неверная строка: должна заканчиваться на "${o.suffix}"` + : o.format === 'includes' + ? `Неверная строка: должна содержать "${o.includes}"` + : o.format === 'regex' + ? `Неверная строка: должна соответствовать шаблону ${o.pattern}` + : `Неверный ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Неверное число: должно быть кратным ${r.divisor}`; + case 'unrecognized_keys': + return `Нераспознанн${r.keys.length > 1 ? 'ые' : 'ый'} ключ${r.keys.length > 1 ? 'и' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Неверный ключ в ${r.origin}`; + case 'invalid_union': + return 'Неверные входные данные'; + case 'invalid_element': + return `Неверное значение в ${r.origin}`; + default: + return 'Неверные входные данные'; + } + }; + }; + function op() { + return { localeError: fk() }; + } + var vk = () => { + let e = { + string: { unit: 'znakov', verb: 'imeti' }, + file: { unit: 'bajtov', verb: 'imeti' }, + array: { unit: 'elementov', verb: 'imeti' }, + set: { unit: 'elementov', verb: 'imeti' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'število'; + case 'object': { + if (Array.isArray(r)) return 'tabela'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'vnos', + email: 'e-poštni naslov', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum in čas', + date: 'ISO datum', + time: 'ISO čas', + duration: 'ISO trajanje', + ipv4: 'IPv4 naslov', + ipv6: 'IPv6 naslov', + cidrv4: 'obseg IPv4', + cidrv6: 'obseg IPv6', + base64: 'base64 kodiran niz', + base64url: 'base64url kodiran niz', + json_string: 'JSON niz', + e164: 'E.164 številka', + jwt: 'JWT', + template_literal: 'vnos', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Neveljaven vnos: pričakovano ${r.expected}, prejeto ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Neveljaven vnos: pričakovano ${I(r.values[0])}` + : `Neveljavna možnost: pričakovano eno izmed ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Preveliko: pričakovano, da bo ${r.origin ?? 'vrednost'} imelo ${o}${r.maximum.toString()} ${s.unit ?? 'elementov'}` + : `Preveliko: pričakovano, da bo ${r.origin ?? 'vrednost'} ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Premajhno: pričakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${s.unit}` + : `Premajhno: pričakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Neveljaven niz: mora se začeti z "${o.prefix}"` + : o.format === 'ends_with' + ? `Neveljaven niz: mora se končati z "${o.suffix}"` + : o.format === 'includes' + ? `Neveljaven niz: mora vsebovati "${o.includes}"` + : o.format === 'regex' + ? `Neveljaven niz: mora ustrezati vzorcu ${o.pattern}` + : `Neveljaven ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Neveljavno število: mora biti večkratnik ${r.divisor}`; + case 'unrecognized_keys': + return `Neprepoznan${r.keys.length > 1 ? 'i ključi' : ' ključ'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Neveljaven ključ v ${r.origin}`; + case 'invalid_union': + return 'Neveljaven vnos'; + case 'invalid_element': + return `Neveljavna vrednost v ${r.origin}`; + default: + return 'Neveljaven vnos'; + } + }; + }; + function ap() { + return { localeError: vk() }; + } + var gk = () => { + let e = { + string: { unit: 'tecken', verb: 'att ha' }, + file: { unit: 'bytes', verb: 'att ha' }, + array: { unit: 'objekt', verb: 'att innehålla' }, + set: { unit: 'objekt', verb: 'att innehålla' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'antal'; + case 'object': { + if (Array.isArray(r)) return 'lista'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'reguljärt uttryck', + email: 'e-postadress', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datum och tid', + date: 'ISO-datum', + time: 'ISO-tid', + duration: 'ISO-varaktighet', + ipv4: 'IPv4-intervall', + ipv6: 'IPv6-intervall', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodad sträng', + base64url: 'base64url-kodad sträng', + json_string: 'JSON-sträng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'mall-literal', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Ogiltig inmatning: förväntat ${r.expected}, fick ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Ogiltig inmatning: förväntat ${I(r.values[0])}` + : `Ogiltigt val: förväntade en av ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `För stor(t): förväntade ${r.origin ?? 'värdet'} att ha ${o}${r.maximum.toString()} ${s.unit ?? 'element'}` + : `För stor(t): förväntat ${r.origin ?? 'värdet'} att ha ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `För lite(t): förväntade ${r.origin ?? 'värdet'} att ha ${o}${r.minimum.toString()} ${s.unit}` + : `För lite(t): förväntade ${r.origin ?? 'värdet'} att ha ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Ogiltig sträng: måste börja med "${o.prefix}"` + : o.format === 'ends_with' + ? `Ogiltig sträng: måste sluta med "${o.suffix}"` + : o.format === 'includes' + ? `Ogiltig sträng: måste innehålla "${o.includes}"` + : o.format === 'regex' + ? `Ogiltig sträng: måste matcha mönstret "${o.pattern}"` + : `Ogiltig(t) ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Ogiltigt tal: måste vara en multipel av ${r.divisor}`; + case 'unrecognized_keys': + return `${r.keys.length > 1 ? 'Okända nycklar' : 'Okänd nyckel'}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Ogiltig nyckel i ${r.origin ?? 'värdet'}`; + case 'invalid_union': + return 'Ogiltig input'; + case 'invalid_element': + return `Ogiltigt värde i ${r.origin ?? 'värdet'}`; + default: + return 'Ogiltig input'; + } + }; + }; + function sp() { + return { localeError: gk() }; + } + var hk = () => { + let e = { + string: { unit: 'எழுத்துக்கள்', verb: 'கொண்டிருக்க வேண்டும்' }, + file: { unit: 'பைட்டுகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + array: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + set: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'எண் அல்லாதது' : 'எண்'; + case 'object': { + if (Array.isArray(r)) return 'அணி'; + if (r === null) return 'வெறுமை'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'உள்ளீடு', + email: 'மின்னஞ்சல் முகவரி', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO தேதி நேரம்', + date: 'ISO தேதி', + time: 'ISO நேரம்', + duration: 'ISO கால அளவு', + ipv4: 'IPv4 முகவரி', + ipv6: 'IPv6 முகவரி', + cidrv4: 'IPv4 வரம்பு', + cidrv6: 'IPv6 வரம்பு', + base64: 'base64-encoded சரம்', + base64url: 'base64url-encoded சரம்', + json_string: 'JSON சரம்', + e164: 'E.164 எண்', + jwt: 'JWT', + template_literal: 'input', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r.expected}, பெறப்பட்டது ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${I(r.values[0])}` + : `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${_(r.values, '|')} இல் ஒன்று`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin ?? 'மதிப்பு'} ${o}${r.maximum.toString()} ${s.unit ?? 'உறுப்புகள்'} ஆக இருக்க வேண்டும்` + : `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin ?? 'மதிப்பு'} ${o}${r.maximum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்` + : `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${o}${r.minimum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்` + : o.format === 'ends_with' + ? `தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்` + : o.format === 'includes' + ? `தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்` + : o.format === 'regex' + ? `தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்` + : `தவறான ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`; + case 'unrecognized_keys': + return `அடையாளம் தெரியாத விசை${r.keys.length > 1 ? 'கள்' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `${r.origin} இல் தவறான விசை`; + case 'invalid_union': + return 'தவறான உள்ளீடு'; + case 'invalid_element': + return `${r.origin} இல் தவறான மதிப்பு`; + default: + return 'தவறான உள்ளீடு'; + } + }; + }; + function up() { + return { localeError: hk() }; + } + var bk = () => { + let e = { + string: { unit: 'ตัวอักษร', verb: 'ควรมี' }, + file: { unit: 'ไบต์', verb: 'ควรมี' }, + array: { unit: 'รายการ', verb: 'ควรมี' }, + set: { unit: 'รายการ', verb: 'ควรมี' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'ไม่ใช่ตัวเลข (NaN)' : 'ตัวเลข'; + case 'object': { + if (Array.isArray(r)) return 'อาร์เรย์ (Array)'; + if (r === null) return 'ไม่มีค่า (null)'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ข้อมูลที่ป้อน', + email: 'ที่อยู่อีเมล', + url: 'URL', + emoji: 'อิโมจิ', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'วันที่เวลาแบบ ISO', + date: 'วันที่แบบ ISO', + time: 'เวลาแบบ ISO', + duration: 'ช่วงเวลาแบบ ISO', + ipv4: 'ที่อยู่ IPv4', + ipv6: 'ที่อยู่ IPv6', + cidrv4: 'ช่วง IP แบบ IPv4', + cidrv6: 'ช่วง IP แบบ IPv6', + base64: 'ข้อความแบบ Base64', + base64url: 'ข้อความแบบ Base64 สำหรับ URL', + json_string: 'ข้อความแบบ JSON', + e164: 'เบอร์โทรศัพท์ระหว่างประเทศ (E.164)', + jwt: 'โทเคน JWT', + template_literal: 'ข้อมูลที่ป้อน', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r.expected} แต่ได้รับ ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `ค่าไม่ถูกต้อง: ควรเป็น ${I(r.values[0])}` + : `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? 'ไม่เกิน' : 'น้อยกว่า', + s = t(r.origin); + return s + ? `เกินกำหนด: ${r.origin ?? 'ค่า'} ควรมี${o} ${r.maximum.toString()} ${s.unit ?? 'รายการ'}` + : `เกินกำหนด: ${r.origin ?? 'ค่า'} ควรมี${o} ${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? 'อย่างน้อย' : 'มากกว่า', + s = t(r.origin); + return s + ? `น้อยกว่ากำหนด: ${r.origin} ควรมี${o} ${r.minimum.toString()} ${s.unit}` + : `น้อยกว่ากำหนด: ${r.origin} ควรมี${o} ${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"` + : o.format === 'ends_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"` + : o.format === 'includes' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ` + : o.format === 'regex' + ? `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}` + : `รูปแบบไม่ถูกต้อง: ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`; + case 'unrecognized_keys': + return `พบคีย์ที่ไม่รู้จัก: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `คีย์ไม่ถูกต้องใน ${r.origin}`; + case 'invalid_union': + return 'ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้'; + case 'invalid_element': + return `ข้อมูลไม่ถูกต้องใน ${r.origin}`; + default: + return 'ข้อมูลไม่ถูกต้อง'; + } + }; + }; + function cp() { + return { localeError: bk() }; + } + var yk = (e) => { + let t = typeof e; + switch (t) { + case 'number': + return Number.isNaN(e) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(e)) return 'array'; + if (e === null) return 'null'; + if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) + return e.constructor.name; + } + } + return t; + }, + $k = () => { + let e = { + string: { unit: 'karakter', verb: 'olmalı' }, + file: { unit: 'bayt', verb: 'olmalı' }, + array: { unit: 'öğe', verb: 'olmalı' }, + set: { unit: 'öğe', verb: 'olmalı' }, + }; + function t(n) { + return e[n] ?? null; + } + let i = { + regex: 'girdi', + email: 'e-posta adresi', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO tarih ve saat', + date: 'ISO tarih', + time: 'ISO saat', + duration: 'ISO süre', + ipv4: 'IPv4 adresi', + ipv6: 'IPv6 adresi', + cidrv4: 'IPv4 aralığı', + cidrv6: 'IPv6 aralığı', + base64: 'base64 ile şifrelenmiş metin', + base64url: 'base64url ile şifrelenmiş metin', + json_string: 'JSON dizesi', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'Şablon dizesi', + }; + return (n) => { + switch (n.code) { + case 'invalid_type': + return `Geçersiz değer: beklenen ${n.expected}, alınan ${yk(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Geçersiz değer: beklenen ${I(n.values[0])}` + : `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${_(n.values, '|')}`; + case 'too_big': { + let r = n.inclusive ? '<=' : '<', + o = t(n.origin); + return o + ? `Çok büyük: beklenen ${n.origin ?? 'değer'} ${r}${n.maximum.toString()} ${o.unit ?? 'öğe'}` + : `Çok büyük: beklenen ${n.origin ?? 'değer'} ${r}${n.maximum.toString()}`; + } + case 'too_small': { + let r = n.inclusive ? '>=' : '>', + o = t(n.origin); + return o + ? `Çok küçük: beklenen ${n.origin} ${r}${n.minimum.toString()} ${o.unit}` + : `Çok küçük: beklenen ${n.origin} ${r}${n.minimum.toString()}`; + } + case 'invalid_format': { + let r = n; + return r.format === 'starts_with' + ? `Geçersiz metin: "${r.prefix}" ile başlamalı` + : r.format === 'ends_with' + ? `Geçersiz metin: "${r.suffix}" ile bitmeli` + : r.format === 'includes' + ? `Geçersiz metin: "${r.includes}" içermeli` + : r.format === 'regex' + ? `Geçersiz metin: ${r.pattern} desenine uymalı` + : `Geçersiz ${i[r.format] ?? n.format}`; + } + case 'not_multiple_of': + return `Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`; + case 'unrecognized_keys': + return `Tanınmayan anahtar${n.keys.length > 1 ? 'lar' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} içinde geçersiz anahtar`; + case 'invalid_union': + return 'Geçersiz değer'; + case 'invalid_element': + return `${n.origin} içinde geçersiz değer`; + default: + return 'Geçersiz değer'; + } + }; + }; + function lp() { + return { localeError: $k() }; + } + var _k = () => { + let e = { + string: { unit: 'символів', verb: 'матиме' }, + file: { unit: 'байтів', verb: 'матиме' }, + array: { unit: 'елементів', verb: 'матиме' }, + set: { unit: 'елементів', verb: 'матиме' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'число'; + case 'object': { + if (Array.isArray(r)) return 'масив'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'вхідні дані', + email: 'адреса електронної пошти', + url: 'URL', + emoji: 'емодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'дата та час ISO', + date: 'дата ISO', + time: 'час ISO', + duration: 'тривалість ISO', + ipv4: 'адреса IPv4', + ipv6: 'адреса IPv6', + cidrv4: 'діапазон IPv4', + cidrv6: 'діапазон IPv6', + base64: 'рядок у кодуванні base64', + base64url: 'рядок у кодуванні base64url', + json_string: 'рядок JSON', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'вхідні дані', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Неправильні вхідні дані: очікується ${r.expected}, отримано ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Неправильні вхідні дані: очікується ${I(r.values[0])}` + : `Неправильна опція: очікується одне з ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Занадто велике: очікується, що ${r.origin ?? 'значення'} ${s.verb} ${o}${r.maximum.toString()} ${s.unit ?? 'елементів'}` + : `Занадто велике: очікується, що ${r.origin ?? 'значення'} буде ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Занадто мале: очікується, що ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}` + : `Занадто мале: очікується, що ${r.origin} буде ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Неправильний рядок: повинен починатися з "${o.prefix}"` + : o.format === 'ends_with' + ? `Неправильний рядок: повинен закінчуватися на "${o.suffix}"` + : o.format === 'includes' + ? `Неправильний рядок: повинен містити "${o.includes}"` + : o.format === 'regex' + ? `Неправильний рядок: повинен відповідати шаблону ${o.pattern}` + : `Неправильний ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Неправильне число: повинно бути кратним ${r.divisor}`; + case 'unrecognized_keys': + return `Нерозпізнаний ключ${r.keys.length > 1 ? 'і' : ''}: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Неправильний ключ у ${r.origin}`; + case 'invalid_union': + return 'Неправильні вхідні дані'; + case 'invalid_element': + return `Неправильне значення у ${r.origin}`; + default: + return 'Неправильні вхідні дані'; + } + }; + }; + function Rr() { + return { localeError: _k() }; + } + function dp() { + return Rr(); + } + var kk = () => { + let e = { + string: { unit: 'حروف', verb: 'ہونا' }, + file: { unit: 'بائٹس', verb: 'ہونا' }, + array: { unit: 'آئٹمز', verb: 'ہونا' }, + set: { unit: 'آئٹمز', verb: 'ہونا' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'نمبر'; + case 'object': { + if (Array.isArray(r)) return 'آرے'; + if (r === null) return 'نل'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ان پٹ', + email: 'ای میل ایڈریس', + url: 'یو آر ایل', + emoji: 'ایموجی', + uuid: 'یو یو آئی ڈی', + uuidv4: 'یو یو آئی ڈی وی 4', + uuidv6: 'یو یو آئی ڈی وی 6', + nanoid: 'نینو آئی ڈی', + guid: 'جی یو آئی ڈی', + cuid: 'سی یو آئی ڈی', + cuid2: 'سی یو آئی ڈی 2', + ulid: 'یو ایل آئی ڈی', + xid: 'ایکس آئی ڈی', + ksuid: 'کے ایس یو آئی ڈی', + datetime: 'آئی ایس او ڈیٹ ٹائم', + date: 'آئی ایس او تاریخ', + time: 'آئی ایس او وقت', + duration: 'آئی ایس او مدت', + ipv4: 'آئی پی وی 4 ایڈریس', + ipv6: 'آئی پی وی 6 ایڈریس', + cidrv4: 'آئی پی وی 4 رینج', + cidrv6: 'آئی پی وی 6 رینج', + base64: 'بیس 64 ان کوڈڈ سٹرنگ', + base64url: 'بیس 64 یو آر ایل ان کوڈڈ سٹرنگ', + json_string: 'جے ایس او این سٹرنگ', + e164: 'ای 164 نمبر', + jwt: 'جے ڈبلیو ٹی', + template_literal: 'ان پٹ', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `غلط ان پٹ: ${r.expected} متوقع تھا، ${i(r.input)} موصول ہوا`; + case 'invalid_value': + return r.values.length === 1 + ? `غلط ان پٹ: ${I(r.values[0])} متوقع تھا` + : `غلط آپشن: ${_(r.values, '|')} میں سے ایک متوقع تھا`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `بہت بڑا: ${r.origin ?? 'ویلیو'} کے ${o}${r.maximum.toString()} ${s.unit ?? 'عناصر'} ہونے متوقع تھے` + : `بہت بڑا: ${r.origin ?? 'ویلیو'} کا ${o}${r.maximum.toString()} ہونا متوقع تھا`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `بہت چھوٹا: ${r.origin} کے ${o}${r.minimum.toString()} ${s.unit} ہونے متوقع تھے` + : `بہت چھوٹا: ${r.origin} کا ${o}${r.minimum.toString()} ہونا متوقع تھا`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے` + : o.format === 'ends_with' + ? `غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے` + : o.format === 'includes' + ? `غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے` + : o.format === 'regex' + ? `غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے` + : `غلط ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`; + case 'unrecognized_keys': + return `غیر تسلیم شدہ کی${r.keys.length > 1 ? 'ز' : ''}: ${_(r.keys, '، ')}`; + case 'invalid_key': + return `${r.origin} میں غلط کی`; + case 'invalid_union': + return 'غلط ان پٹ'; + case 'invalid_element': + return `${r.origin} میں غلط ویلیو`; + default: + return 'غلط ان پٹ'; + } + }; + }; + function mp() { + return { localeError: kk() }; + } + var xk = () => { + let e = { + string: { unit: 'ký tự', verb: 'có' }, + file: { unit: 'byte', verb: 'có' }, + array: { unit: 'phần tử', verb: 'có' }, + set: { unit: 'phần tử', verb: 'có' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'số'; + case 'object': { + if (Array.isArray(r)) return 'mảng'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'đầu vào', + email: 'địa chỉ email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ngày giờ ISO', + date: 'ngày ISO', + time: 'giờ ISO', + duration: 'khoảng thời gian ISO', + ipv4: 'địa chỉ IPv4', + ipv6: 'địa chỉ IPv6', + cidrv4: 'dải IPv4', + cidrv6: 'dải IPv6', + base64: 'chuỗi mã hóa base64', + base64url: 'chuỗi mã hóa base64url', + json_string: 'chuỗi JSON', + e164: 'số E.164', + jwt: 'JWT', + template_literal: 'đầu vào', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Đầu vào không hợp lệ: mong đợi ${r.expected}, nhận được ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Đầu vào không hợp lệ: mong đợi ${I(r.values[0])}` + : `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Quá lớn: mong đợi ${r.origin ?? 'giá trị'} ${s.verb} ${o}${r.maximum.toString()} ${s.unit ?? 'phần tử'}` + : `Quá lớn: mong đợi ${r.origin ?? 'giá trị'} ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Quá nhỏ: mong đợi ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}` + : `Quá nhỏ: mong đợi ${r.origin} ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"` + : o.format === 'ends_with' + ? `Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"` + : o.format === 'includes' + ? `Chuỗi không hợp lệ: phải bao gồm "${o.includes}"` + : o.format === 'regex' + ? `Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}` + : `${n[o.format] ?? r.format} không hợp lệ`; + } + case 'not_multiple_of': + return `Số không hợp lệ: phải là bội số của ${r.divisor}`; + case 'unrecognized_keys': + return `Khóa không được nhận dạng: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Khóa không hợp lệ trong ${r.origin}`; + case 'invalid_union': + return 'Đầu vào không hợp lệ'; + case 'invalid_element': + return `Giá trị không hợp lệ trong ${r.origin}`; + default: + return 'Đầu vào không hợp lệ'; + } + }; + }; + function pp() { + return { localeError: xk() }; + } + var wk = () => { + let e = { + string: { unit: '字符', verb: '包含' }, + file: { unit: '字节', verb: '包含' }, + array: { unit: '项', verb: '包含' }, + set: { unit: '项', verb: '包含' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? '非数字(NaN)' : '数字'; + case 'object': { + if (Array.isArray(r)) return '数组'; + if (r === null) return '空值(null)'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: '输入', + email: '电子邮件', + url: 'URL', + emoji: '表情符号', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日期时间', + date: 'ISO日期', + time: 'ISO时间', + duration: 'ISO时长', + ipv4: 'IPv4地址', + ipv6: 'IPv6地址', + cidrv4: 'IPv4网段', + cidrv6: 'IPv6网段', + base64: 'base64编码字符串', + base64url: 'base64url编码字符串', + json_string: 'JSON字符串', + e164: 'E.164号码', + jwt: 'JWT', + template_literal: '输入', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `无效输入:期望 ${r.expected},实际接收 ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `无效输入:期望 ${I(r.values[0])}` + : `无效选项:期望以下之一 ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `数值过大:期望 ${r.origin ?? '值'} ${o}${r.maximum.toString()} ${s.unit ?? '个元素'}` + : `数值过大:期望 ${r.origin ?? '值'} ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `数值过小:期望 ${r.origin} ${o}${r.minimum.toString()} ${s.unit}` + : `数值过小:期望 ${r.origin} ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `无效字符串:必须以 "${o.prefix}" 开头` + : o.format === 'ends_with' + ? `无效字符串:必须以 "${o.suffix}" 结尾` + : o.format === 'includes' + ? `无效字符串:必须包含 "${o.includes}"` + : o.format === 'regex' + ? `无效字符串:必须满足正则表达式 ${o.pattern}` + : `无效${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `无效数字:必须是 ${r.divisor} 的倍数`; + case 'unrecognized_keys': + return `出现未知的键(key): ${_(r.keys, ', ')}`; + case 'invalid_key': + return `${r.origin} 中的键(key)无效`; + case 'invalid_union': + return '无效输入'; + case 'invalid_element': + return `${r.origin} 中包含无效值(value)`; + default: + return '无效输入'; + } + }; + }; + function fp() { + return { localeError: wk() }; + } + var Sk = () => { + let e = { + string: { unit: '字元', verb: '擁有' }, + file: { unit: '位元組', verb: '擁有' }, + array: { unit: '項目', verb: '擁有' }, + set: { unit: '項目', verb: '擁有' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'number'; + case 'object': { + if (Array.isArray(r)) return 'array'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: '輸入', + email: '郵件地址', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 日期時間', + date: 'ISO 日期', + time: 'ISO 時間', + duration: 'ISO 期間', + ipv4: 'IPv4 位址', + ipv6: 'IPv6 位址', + cidrv4: 'IPv4 範圍', + cidrv6: 'IPv6 範圍', + base64: 'base64 編碼字串', + base64url: 'base64url 編碼字串', + json_string: 'JSON 字串', + e164: 'E.164 數值', + jwt: 'JWT', + template_literal: '輸入', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `無效的輸入值:預期為 ${r.expected},但收到 ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `無效的輸入值:預期為 ${I(r.values[0])}` + : `無效的選項:預期為以下其中之一 ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `數值過大:預期 ${r.origin ?? '值'} 應為 ${o}${r.maximum.toString()} ${s.unit ?? '個元素'}` + : `數值過大:預期 ${r.origin ?? '值'} 應為 ${o}${r.maximum.toString()}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `數值過小:預期 ${r.origin} 應為 ${o}${r.minimum.toString()} ${s.unit}` + : `數值過小:預期 ${r.origin} 應為 ${o}${r.minimum.toString()}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `無效的字串:必須以 "${o.prefix}" 開頭` + : o.format === 'ends_with' + ? `無效的字串:必須以 "${o.suffix}" 結尾` + : o.format === 'includes' + ? `無效的字串:必須包含 "${o.includes}"` + : o.format === 'regex' + ? `無效的字串:必須符合格式 ${o.pattern}` + : `無效的 ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `無效的數字:必須為 ${r.divisor} 的倍數`; + case 'unrecognized_keys': + return `無法識別的鍵值${r.keys.length > 1 ? '們' : ''}:${_(r.keys, '、')}`; + case 'invalid_key': + return `${r.origin} 中有無效的鍵值`; + case 'invalid_union': + return '無效的輸入值'; + case 'invalid_element': + return `${r.origin} 中有無效的值`; + default: + return '無效的輸入值'; + } + }; + }; + function vp() { + return { localeError: Sk() }; + } + var Ik = () => { + let e = { + string: { unit: 'àmi', verb: 'ní' }, + file: { unit: 'bytes', verb: 'ní' }, + array: { unit: 'nkan', verb: 'ní' }, + set: { unit: 'nkan', verb: 'ní' }, + }; + function t(r) { + return e[r] ?? null; + } + let i = (r) => { + let o = typeof r; + switch (o) { + case 'number': + return Number.isNaN(r) ? 'NaN' : 'nọ́mbà'; + case 'object': { + if (Array.isArray(r)) return 'akopọ'; + if (r === null) return 'null'; + if (Object.getPrototypeOf(r) !== Object.prototype && r.constructor) + return r.constructor.name; + } + } + return o; + }, + n = { + regex: 'ẹ̀rọ ìbáwọlé', + email: 'àdírẹ́sì ìmẹ́lì', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'àkókò ISO', + date: 'ọjọ́ ISO', + time: 'àkókò ISO', + duration: 'àkókò tó pé ISO', + ipv4: 'àdírẹ́sì IPv4', + ipv6: 'àdírẹ́sì IPv6', + cidrv4: 'àgbègbè IPv4', + cidrv6: 'àgbègbè IPv6', + base64: 'ọ̀rọ̀ tí a kọ́ ní base64', + base64url: 'ọ̀rọ̀ base64url', + json_string: 'ọ̀rọ̀ JSON', + e164: 'nọ́mbà E.164', + jwt: 'JWT', + template_literal: 'ẹ̀rọ ìbáwọlé', + }; + return (r) => { + switch (r.code) { + case 'invalid_type': + return `Ìbáwọlé aṣìṣe: a ní láti fi ${r.expected}, àmọ̀ a rí ${i(r.input)}`; + case 'invalid_value': + return r.values.length === 1 + ? `Ìbáwọlé aṣìṣe: a ní láti fi ${I(r.values[0])}` + : `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${_(r.values, '|')}`; + case 'too_big': { + let o = r.inclusive ? '<=' : '<', + s = t(r.origin); + return s + ? `Tó pọ̀ jù: a ní láti jẹ́ pé ${r.origin ?? 'iye'} ${s.verb} ${o}${r.maximum} ${s.unit}` + : `Tó pọ̀ jù: a ní láti jẹ́ ${o}${r.maximum}`; + } + case 'too_small': { + let o = r.inclusive ? '>=' : '>', + s = t(r.origin); + return s + ? `Kéré ju: a ní láti jẹ́ pé ${r.origin} ${s.verb} ${o}${r.minimum} ${s.unit}` + : `Kéré ju: a ní láti jẹ́ ${o}${r.minimum}`; + } + case 'invalid_format': { + let o = r; + return o.format === 'starts_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"` + : o.format === 'ends_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"` + : o.format === 'includes' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"` + : o.format === 'regex' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}` + : `Aṣìṣe: ${n[o.format] ?? r.format}`; + } + case 'not_multiple_of': + return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${r.divisor}`; + case 'unrecognized_keys': + return `Bọtìnì àìmọ̀: ${_(r.keys, ', ')}`; + case 'invalid_key': + return `Bọtìnì aṣìṣe nínú ${r.origin}`; + case 'invalid_union': + return 'Ìbáwọlé aṣìṣe'; + case 'invalid_element': + return `Iye aṣìṣe nínú ${r.origin}`; + default: + return 'Ìbáwọlé aṣìṣe'; + } + }; + }; + function gp() { + return { localeError: Ik() }; + } + var Vs = Symbol('ZodOutput'), + Ms = Symbol('ZodInput'), + Dt = class { + constructor() { + ((this._map = new WeakMap()), (this._idmap = new Map())); + } + add(t, ...i) { + let n = i[0]; + if ((this._map.set(t, n), n && typeof n == 'object' && 'id' in n)) { + if (this._idmap.has(n.id)) + throw new Error(`ID ${n.id} already exists in the registry`); + this._idmap.set(n.id, t); + } + return this; + } + clear() { + return ((this._map = new WeakMap()), (this._idmap = new Map()), this); + } + remove(t) { + let i = this._map.get(t); + return ( + i && typeof i == 'object' && 'id' in i && this._idmap.delete(i.id), + this._map.delete(t), + this + ); + } + get(t) { + let i = t._zod.parent; + if (i) { + let n = { ...(this.get(i) ?? {}) }; + delete n.id; + let r = { ...n, ...this._map.get(t) }; + return Object.keys(r).length ? r : void 0; + } + return this._map.get(t); + } + has(t) { + return this._map.has(t); + } + }; + function Jr() { + return new Dt(); + } + var Ue = Jr(); + function Ws(e, t) { + return new e({ type: 'string', ...j(t) }); + } + function Bs(e, t) { + return new e({ type: 'string', coerce: !0, ...j(t) }); + } + function Fr(e, t) { + return new e({ + type: 'string', + format: 'email', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function vn(e, t) { + return new e({ + type: 'string', + format: 'guid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Vr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Mr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v4', + ...j(t), + }); + } + function Wr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v6', + ...j(t), + }); + } + function Br(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v7', + ...j(t), + }); + } + function gn(e, t) { + return new e({ + type: 'string', + format: 'url', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Gr(e, t) { + return new e({ + type: 'string', + format: 'emoji', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Kr(e, t) { + return new e({ + type: 'string', + format: 'nanoid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function qr(e, t) { + return new e({ + type: 'string', + format: 'cuid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Xr(e, t) { + return new e({ + type: 'string', + format: 'cuid2', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Hr(e, t) { + return new e({ + type: 'string', + format: 'ulid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Yr(e, t) { + return new e({ + type: 'string', + format: 'xid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function Qr(e, t) { + return new e({ + type: 'string', + format: 'ksuid', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ei(e, t) { + return new e({ + type: 'string', + format: 'ipv4', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ti(e, t) { + return new e({ + type: 'string', + format: 'ipv6', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ni(e, t) { + return new e({ + type: 'string', + format: 'cidrv4', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ri(e, t) { + return new e({ + type: 'string', + format: 'cidrv6', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ii(e, t) { + return new e({ + type: 'string', + format: 'base64', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function oi(e, t) { + return new e({ + type: 'string', + format: 'base64url', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function ai(e, t) { + return new e({ + type: 'string', + format: 'e164', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + function si(e, t) { + return new e({ + type: 'string', + format: 'jwt', + check: 'string_format', + abort: !1, + ...j(t), + }); + } + var Gs = { Any: null, Minute: -1, Second: 0, Millisecond: 3, Microsecond: 6 }; + function Ks(e, t) { + return new e({ + type: 'string', + format: 'datetime', + check: 'string_format', + offset: !1, + local: !1, + precision: null, + ...j(t), + }); + } + function qs(e, t) { + return new e({ + type: 'string', + format: 'date', + check: 'string_format', + ...j(t), + }); + } + function Xs(e, t) { + return new e({ + type: 'string', + format: 'time', + check: 'string_format', + precision: null, + ...j(t), + }); + } + function Hs(e, t) { + return new e({ + type: 'string', + format: 'duration', + check: 'string_format', + ...j(t), + }); + } + function Ys(e, t) { + return new e({ type: 'number', checks: [], ...j(t) }); + } + function Qs(e, t) { + return new e({ type: 'number', coerce: !0, checks: [], ...j(t) }); + } + function eu(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'safeint', + ...j(t), + }); + } + function tu(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float32', + ...j(t), + }); + } + function nu(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float64', + ...j(t), + }); + } + function ru(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'int32', + ...j(t), + }); + } + function iu(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'uint32', + ...j(t), + }); + } + function ou(e, t) { + return new e({ type: 'boolean', ...j(t) }); + } + function au(e, t) { + return new e({ type: 'boolean', coerce: !0, ...j(t) }); + } + function su(e, t) { + return new e({ type: 'bigint', ...j(t) }); + } + function uu(e, t) { + return new e({ type: 'bigint', coerce: !0, ...j(t) }); + } + function cu(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'int64', + ...j(t), + }); + } + function lu(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'uint64', + ...j(t), + }); + } + function du(e, t) { + return new e({ type: 'symbol', ...j(t) }); + } + function mu(e, t) { + return new e({ type: 'undefined', ...j(t) }); + } + function pu(e, t) { + return new e({ type: 'null', ...j(t) }); + } + function fu(e) { + return new e({ type: 'any' }); + } + function vu(e) { + return new e({ type: 'unknown' }); + } + function gu(e, t) { + return new e({ type: 'never', ...j(t) }); + } + function hu(e, t) { + return new e({ type: 'void', ...j(t) }); + } + function bu(e, t) { + return new e({ type: 'date', ...j(t) }); + } + function yu(e, t) { + return new e({ type: 'date', coerce: !0, ...j(t) }); + } + function $u(e, t) { + return new e({ type: 'nan', ...j(t) }); + } + function Ne(e, t) { + return new zr({ check: 'less_than', ...j(t), value: e, inclusive: !1 }); + } + function he(e, t) { + return new zr({ check: 'less_than', ...j(t), value: e, inclusive: !0 }); + } + function De(e, t) { + return new jr({ check: 'greater_than', ...j(t), value: e, inclusive: !1 }); + } + function ue(e, t) { + return new jr({ check: 'greater_than', ...j(t), value: e, inclusive: !0 }); + } + function _u(e) { + return De(0, e); + } + function ku(e) { + return Ne(0, e); + } + function xu(e) { + return he(0, e); + } + function wu(e) { + return ue(0, e); + } + function it(e, t) { + return new ga({ check: 'multiple_of', ...j(t), value: e }); + } + function Zt(e, t) { + return new ya({ check: 'max_size', ...j(t), maximum: e }); + } + function ot(e, t) { + return new $a({ check: 'min_size', ...j(t), minimum: e }); + } + function hn(e, t) { + return new _a({ check: 'size_equals', ...j(t), size: e }); + } + function Et(e, t) { + return new ka({ check: 'max_length', ...j(t), maximum: e }); + } + function Ge(e, t) { + return new xa({ check: 'min_length', ...j(t), minimum: e }); + } + function Tt(e, t) { + return new wa({ check: 'length_equals', ...j(t), length: e }); + } + function bn(e, t) { + return new Sa({ + check: 'string_format', + format: 'regex', + ...j(t), + pattern: e, + }); + } + function yn(e) { + return new Ia({ check: 'string_format', format: 'lowercase', ...j(e) }); + } + function $n(e) { + return new za({ check: 'string_format', format: 'uppercase', ...j(e) }); + } + function _n(e, t) { + return new ja({ + check: 'string_format', + format: 'includes', + ...j(t), + includes: e, + }); + } + function kn(e, t) { + return new Oa({ + check: 'string_format', + format: 'starts_with', + ...j(t), + prefix: e, + }); + } + function xn(e, t) { + return new Ua({ + check: 'string_format', + format: 'ends_with', + ...j(t), + suffix: e, + }); + } + function Su(e, t, i) { + return new Pa({ check: 'property', property: e, schema: t, ...j(i) }); + } + function wn(e, t) { + return new Na({ check: 'mime_type', mime: e, ...j(t) }); + } + function Ze(e) { + return new Da({ check: 'overwrite', tx: e }); + } + function Sn(e) { + return Ze((t) => t.normalize(e)); + } + function In() { + return Ze((e) => e.trim()); + } + function zn() { + return Ze((e) => e.toLowerCase()); + } + function jn() { + return Ze((e) => e.toUpperCase()); + } + function Iu(e, t, i) { + return new e({ type: 'array', element: t, ...j(i) }); + } + function zk(e, t, i) { + return new e({ type: 'union', options: t, ...j(i) }); + } + function jk(e, t, i, n) { + return new e({ type: 'union', options: i, discriminator: t, ...j(n) }); + } + function Ok(e, t, i) { + return new e({ type: 'intersection', left: t, right: i }); + } + function Uk(e, t, i, n) { + let r = i instanceof D, + o = r ? n : i, + s = r ? i : null; + return new e({ type: 'tuple', items: t, rest: s, ...j(o) }); + } + function Pk(e, t, i, n) { + return new e({ type: 'record', keyType: t, valueType: i, ...j(n) }); + } + function Nk(e, t, i, n) { + return new e({ type: 'map', keyType: t, valueType: i, ...j(n) }); + } + function Dk(e, t, i) { + return new e({ type: 'set', valueType: t, ...j(i) }); + } + function Zk(e, t, i) { + let n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, r])) : t; + return new e({ type: 'enum', entries: n, ...j(i) }); + } + function Ek(e, t, i) { + return new e({ type: 'enum', entries: t, ...j(i) }); + } + function Tk(e, t, i) { + return new e({ + type: 'literal', + values: Array.isArray(t) ? t : [t], + ...j(i), + }); + } + function zu(e, t) { + return new e({ type: 'file', ...j(t) }); + } + function Ak(e, t) { + return new e({ type: 'transform', transform: t }); + } + function Ck(e, t) { + return new e({ type: 'optional', innerType: t }); + } + function Lk(e, t) { + return new e({ type: 'nullable', innerType: t }); + } + function Rk(e, t, i) { + return new e({ + type: 'default', + innerType: t, + get defaultValue() { + return typeof i == 'function' ? i() : No(i); + }, + }); + } + function Jk(e, t, i) { + return new e({ type: 'nonoptional', innerType: t, ...j(i) }); + } + function Fk(e, t) { + return new e({ type: 'success', innerType: t }); + } + function Vk(e, t, i) { + return new e({ + type: 'catch', + innerType: t, + catchValue: typeof i == 'function' ? i : () => i, + }); + } + function Mk(e, t, i) { + return new e({ type: 'pipe', in: t, out: i }); + } + function Wk(e, t) { + return new e({ type: 'readonly', innerType: t }); + } + function Bk(e, t, i) { + return new e({ type: 'template_literal', parts: t, ...j(i) }); + } + function Gk(e, t) { + return new e({ type: 'lazy', getter: t }); + } + function Kk(e, t) { + return new e({ type: 'promise', innerType: t }); + } + function ju(e, t, i) { + let n = j(i); + return ( + n.abort ?? (n.abort = !0), + new e({ type: 'custom', check: 'custom', fn: t, ...n }) + ); + } + function Ou(e, t, i) { + return new e({ type: 'custom', check: 'custom', fn: t, ...j(i) }); + } + function Uu(e) { + let t = hp( + (i) => ( + (i.addIssue = (n) => { + if (typeof n == 'string') i.issues.push(zt(n, i.value, t._zod.def)); + else { + let r = n; + (r.fatal && (r.continue = !1), + r.code ?? (r.code = 'custom'), + r.input ?? (r.input = i.value), + r.inst ?? (r.inst = t), + r.continue ?? (r.continue = !t._zod.def.abort), + i.issues.push(zt(r))); + } + }), + e(i.value, i) + ), + ); + return t; + } + function hp(e, t) { + let i = new B({ check: 'custom', ...j(t) }); + return ((i._zod.check = e), i); + } + function Pu(e, t) { + let i = j(t), + n = i.truthy ?? ['true', '1', 'yes', 'on', 'y', 'enabled'], + r = i.falsy ?? ['false', '0', 'no', 'off', 'n', 'disabled']; + i.case !== 'sensitive' && + ((n = n.map((v) => (typeof v == 'string' ? v.toLowerCase() : v))), + (r = r.map((v) => (typeof v == 'string' ? v.toLowerCase() : v)))); + let o = new Set(n), + s = new Set(r), + u = e.Codec ?? dn, + a = e.Boolean ?? ln, + c = e.String ?? rt, + m = new c({ type: 'string', error: i.error }), + p = new a({ type: 'boolean', error: i.error }), + f = new u({ + type: 'pipe', + in: m, + out: p, + transform: (v, b) => { + let $ = v; + return ( + i.case !== 'sensitive' && ($ = $.toLowerCase()), + o.has($) + ? !0 + : s.has($) + ? !1 + : (b.issues.push({ + code: 'invalid_value', + expected: 'stringbool', + values: [...o, ...s], + input: b.value, + inst: f, + continue: !1, + }), + {}) + ); + }, + reverseTransform: (v, b) => + v === !0 ? n[0] || 'true' : r[0] || 'false', + error: i.error, + }); + return f; + } + function At(e, t, i, n = {}) { + let r = j(n), + o = { + ...j(n), + check: 'string_format', + type: 'string', + format: t, + fn: typeof i == 'function' ? i : (u) => i.test(u), + ...r, + }; + return (i instanceof RegExp && (o.pattern = i), new e(o)); + } + var On = class { + constructor(t) { + ((this.counter = 0), + (this.metadataRegistry = t?.metadata ?? Ue), + (this.target = t?.target ?? 'draft-2020-12'), + (this.unrepresentable = t?.unrepresentable ?? 'throw'), + (this.override = t?.override ?? (() => {})), + (this.io = t?.io ?? 'output'), + (this.seen = new Map())); + } + process(t, i = { path: [], schemaPath: [] }) { + var n; + let r = t._zod.def, + o = { + guid: 'uuid', + url: 'uri', + datetime: 'date-time', + json_string: 'json-string', + regex: '', + }, + s = this.seen.get(t); + if (s) + return ( + s.count++, + i.schemaPath.includes(t) && (s.cycle = i.path), + s.schema + ); + let u = { schema: {}, count: 1, cycle: void 0, path: i.path }; + this.seen.set(t, u); + let a = t._zod.toJSONSchema?.(); + if (a) u.schema = a; + else { + let p = { ...i, schemaPath: [...i.schemaPath, t], path: i.path }, + f = t._zod.parent; + if (f) + ((u.ref = f), this.process(f, p), (this.seen.get(f).isParent = !0)); + else { + let v = u.schema; + switch (r.type) { + case 'string': { + let b = v; + b.type = 'string'; + let { + minimum: $, + maximum: g, + format: k, + patterns: x, + contentEncoding: w, + } = t._zod.bag; + if ( + (typeof $ == 'number' && (b.minLength = $), + typeof g == 'number' && (b.maxLength = g), + k && + ((b.format = o[k] ?? k), b.format === '' && delete b.format), + w && (b.contentEncoding = w), + x && x.size > 0) + ) { + let S = [...x]; + S.length === 1 + ? (b.pattern = S[0].source) + : S.length > 1 && + (u.schema.allOf = [ + ...S.map((P) => ({ + ...(this.target === 'draft-7' || + this.target === 'draft-4' || + this.target === 'openapi-3.0' + ? { type: 'string' } + : {}), + pattern: P.source, + })), + ]); + } + break; + } + case 'number': { + let b = v, + { + minimum: $, + maximum: g, + format: k, + multipleOf: x, + exclusiveMaximum: w, + exclusiveMinimum: S, + } = t._zod.bag; + (typeof k == 'string' && k.includes('int') + ? (b.type = 'integer') + : (b.type = 'number'), + typeof S == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((b.minimum = S), (b.exclusiveMinimum = !0)) + : (b.exclusiveMinimum = S)), + typeof $ == 'number' && + ((b.minimum = $), + typeof S == 'number' && + this.target !== 'draft-4' && + (S >= $ ? delete b.minimum : delete b.exclusiveMinimum)), + typeof w == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((b.maximum = w), (b.exclusiveMaximum = !0)) + : (b.exclusiveMaximum = w)), + typeof g == 'number' && + ((b.maximum = g), + typeof w == 'number' && + this.target !== 'draft-4' && + (w <= g ? delete b.maximum : delete b.exclusiveMaximum)), + typeof x == 'number' && (b.multipleOf = x)); + break; + } + case 'boolean': { + let b = v; + b.type = 'boolean'; + break; + } + case 'bigint': { + if (this.unrepresentable === 'throw') + throw new Error('BigInt cannot be represented in JSON Schema'); + break; + } + case 'symbol': { + if (this.unrepresentable === 'throw') + throw new Error('Symbols cannot be represented in JSON Schema'); + break; + } + case 'null': { + this.target === 'openapi-3.0' + ? ((v.type = 'string'), (v.nullable = !0), (v.enum = [null])) + : (v.type = 'null'); + break; + } + case 'any': + break; + case 'unknown': + break; + case 'undefined': { + if (this.unrepresentable === 'throw') + throw new Error( + 'Undefined cannot be represented in JSON Schema', + ); + break; + } + case 'void': { + if (this.unrepresentable === 'throw') + throw new Error('Void cannot be represented in JSON Schema'); + break; + } + case 'never': { + v.not = {}; + break; + } + case 'date': { + if (this.unrepresentable === 'throw') + throw new Error('Date cannot be represented in JSON Schema'); + break; + } + case 'array': { + let b = v, + { minimum: $, maximum: g } = t._zod.bag; + (typeof $ == 'number' && (b.minItems = $), + typeof g == 'number' && (b.maxItems = g), + (b.type = 'array'), + (b.items = this.process(r.element, { + ...p, + path: [...p.path, 'items'], + }))); + break; + } + case 'object': { + let b = v; + ((b.type = 'object'), (b.properties = {})); + let $ = r.shape; + for (let x in $) + b.properties[x] = this.process($[x], { + ...p, + path: [...p.path, 'properties', x], + }); + let g = new Set(Object.keys($)), + k = new Set( + [...g].filter((x) => { + let w = r.shape[x]._zod; + return this.io === 'input' + ? w.optin === void 0 + : w.optout === void 0; + }), + ); + (k.size > 0 && (b.required = Array.from(k)), + r.catchall?._zod.def.type === 'never' + ? (b.additionalProperties = !1) + : r.catchall + ? r.catchall && + (b.additionalProperties = this.process(r.catchall, { + ...p, + path: [...p.path, 'additionalProperties'], + })) + : this.io === 'output' && (b.additionalProperties = !1)); + break; + } + case 'union': { + let b = v, + $ = r.options.map((g, k) => + this.process(g, { ...p, path: [...p.path, 'anyOf', k] }), + ); + b.anyOf = $; + break; + } + case 'intersection': { + let b = v, + $ = this.process(r.left, { + ...p, + path: [...p.path, 'allOf', 0], + }), + g = this.process(r.right, { + ...p, + path: [...p.path, 'allOf', 1], + }), + k = (w) => 'allOf' in w && Object.keys(w).length === 1, + x = [...(k($) ? $.allOf : [$]), ...(k(g) ? g.allOf : [g])]; + b.allOf = x; + break; + } + case 'tuple': { + let b = v; + b.type = 'array'; + let $ = this.target === 'draft-2020-12' ? 'prefixItems' : 'items', + g = + this.target === 'draft-2020-12' || + this.target === 'openapi-3.0' + ? 'items' + : 'additionalItems', + k = r.items.map((P, J) => + this.process(P, { ...p, path: [...p.path, $, J] }), + ), + x = r.rest + ? this.process(r.rest, { + ...p, + path: [ + ...p.path, + g, + ...(this.target === 'openapi-3.0' + ? [r.items.length] + : []), + ], + }) + : null; + this.target === 'draft-2020-12' + ? ((b.prefixItems = k), x && (b.items = x)) + : this.target === 'openapi-3.0' + ? ((b.items = { anyOf: k }), + x && b.items.anyOf.push(x), + (b.minItems = k.length), + x || (b.maxItems = k.length)) + : ((b.items = k), x && (b.additionalItems = x)); + let { minimum: w, maximum: S } = t._zod.bag; + (typeof w == 'number' && (b.minItems = w), + typeof S == 'number' && (b.maxItems = S)); + break; + } + case 'record': { + let b = v; + ((b.type = 'object'), + (this.target === 'draft-7' || + this.target === 'draft-2020-12') && + (b.propertyNames = this.process(r.keyType, { + ...p, + path: [...p.path, 'propertyNames'], + })), + (b.additionalProperties = this.process(r.valueType, { + ...p, + path: [...p.path, 'additionalProperties'], + }))); + break; + } + case 'map': { + if (this.unrepresentable === 'throw') + throw new Error('Map cannot be represented in JSON Schema'); + break; + } + case 'set': { + if (this.unrepresentable === 'throw') + throw new Error('Set cannot be represented in JSON Schema'); + break; + } + case 'enum': { + let b = v, + $ = Yt(r.entries); + ($.every((g) => typeof g == 'number') && (b.type = 'number'), + $.every((g) => typeof g == 'string') && (b.type = 'string'), + (b.enum = $)); + break; + } + case 'literal': { + let b = v, + $ = []; + for (let g of r.values) + if (g === void 0) { + if (this.unrepresentable === 'throw') + throw new Error( + 'Literal `undefined` cannot be represented in JSON Schema', + ); + } else if (typeof g == 'bigint') { + if (this.unrepresentable === 'throw') + throw new Error( + 'BigInt literals cannot be represented in JSON Schema', + ); + $.push(Number(g)); + } else $.push(g); + if ($.length !== 0) + if ($.length === 1) { + let g = $[0]; + ((b.type = g === null ? 'null' : typeof g), + this.target === 'draft-4' || this.target === 'openapi-3.0' + ? (b.enum = [g]) + : (b.const = g)); + } else + ($.every((g) => typeof g == 'number') && (b.type = 'number'), + $.every((g) => typeof g == 'string') && (b.type = 'string'), + $.every((g) => typeof g == 'boolean') && + (b.type = 'string'), + $.every((g) => g === null) && (b.type = 'null'), + (b.enum = $)); + break; + } + case 'file': { + let b = v, + $ = { + type: 'string', + format: 'binary', + contentEncoding: 'binary', + }, + { minimum: g, maximum: k, mime: x } = t._zod.bag; + (g !== void 0 && ($.minLength = g), + k !== void 0 && ($.maxLength = k), + x + ? x.length === 1 + ? (($.contentMediaType = x[0]), Object.assign(b, $)) + : (b.anyOf = x.map((w) => ({ ...$, contentMediaType: w }))) + : Object.assign(b, $)); + break; + } + case 'transform': { + if (this.unrepresentable === 'throw') + throw new Error( + 'Transforms cannot be represented in JSON Schema', + ); + break; + } + case 'nullable': { + let b = this.process(r.innerType, p); + this.target === 'openapi-3.0' + ? ((u.ref = r.innerType), (v.nullable = !0)) + : (v.anyOf = [b, { type: 'null' }]); + break; + } + case 'nonoptional': { + (this.process(r.innerType, p), (u.ref = r.innerType)); + break; + } + case 'success': { + let b = v; + b.type = 'boolean'; + break; + } + case 'default': { + (this.process(r.innerType, p), + (u.ref = r.innerType), + (v.default = JSON.parse(JSON.stringify(r.defaultValue)))); + break; + } + case 'prefault': { + (this.process(r.innerType, p), + (u.ref = r.innerType), + this.io === 'input' && + (v._prefault = JSON.parse(JSON.stringify(r.defaultValue)))); + break; + } + case 'catch': { + (this.process(r.innerType, p), (u.ref = r.innerType)); + let b; + try { + b = r.catchValue(void 0); + } catch { + throw new Error( + 'Dynamic catch values are not supported in JSON Schema', + ); + } + v.default = b; + break; + } + case 'nan': { + if (this.unrepresentable === 'throw') + throw new Error('NaN cannot be represented in JSON Schema'); + break; + } + case 'template_literal': { + let b = v, + $ = t._zod.pattern; + if (!$) throw new Error('Pattern not found in template literal'); + ((b.type = 'string'), (b.pattern = $.source)); + break; + } + case 'pipe': { + let b = + this.io === 'input' + ? r.in._zod.def.type === 'transform' + ? r.out + : r.in + : r.out; + (this.process(b, p), (u.ref = b)); + break; + } + case 'readonly': { + (this.process(r.innerType, p), + (u.ref = r.innerType), + (v.readOnly = !0)); + break; + } + case 'promise': { + (this.process(r.innerType, p), (u.ref = r.innerType)); + break; + } + case 'optional': { + (this.process(r.innerType, p), (u.ref = r.innerType)); + break; + } + case 'lazy': { + let b = t._zod.innerType; + (this.process(b, p), (u.ref = b)); + break; + } + case 'custom': { + if (this.unrepresentable === 'throw') + throw new Error( + 'Custom types cannot be represented in JSON Schema', + ); + break; + } + case 'function': { + if (this.unrepresentable === 'throw') + throw new Error( + 'Function types cannot be represented in JSON Schema', + ); + break; + } + default: + } + } + } + let c = this.metadataRegistry.get(t); + return ( + c && Object.assign(u.schema, c), + this.io === 'input' && + X(t) && + (delete u.schema.examples, delete u.schema.default), + this.io === 'input' && + u.schema._prefault && + ((n = u.schema).default ?? (n.default = u.schema._prefault)), + delete u.schema._prefault, + this.seen.get(t).schema + ); + } + emit(t, i) { + let n = { + cycles: i?.cycles ?? 'ref', + reused: i?.reused ?? 'inline', + external: i?.external ?? void 0, + }, + r = this.seen.get(t); + if (!r) throw new Error('Unprocessed schema. This is a bug in Zod.'); + let o = (m) => { + let p = this.target === 'draft-2020-12' ? '$defs' : 'definitions'; + if (n.external) { + let $ = n.external.registry.get(m[0])?.id, + g = n.external.uri ?? ((x) => x); + if ($) return { ref: g($) }; + let k = m[1].defId ?? m[1].schema.id ?? `schema${this.counter++}`; + return ( + (m[1].defId = k), + { defId: k, ref: `${g('__shared')}#/${p}/${k}` } + ); + } + if (m[1] === r) return { ref: '#' }; + let v = `#/${p}/`, + b = m[1].schema.id ?? `__schema${this.counter++}`; + return { defId: b, ref: v + b }; + }, + s = (m) => { + if (m[1].schema.$ref) return; + let p = m[1], + { ref: f, defId: v } = o(m); + ((p.def = { ...p.schema }), v && (p.defId = v)); + let b = p.schema; + for (let $ in b) delete b[$]; + b.$ref = f; + }; + if (n.cycles === 'throw') + for (let m of this.seen.entries()) { + let p = m[1]; + if (p.cycle) + throw new Error(`Cycle detected: #/${p.cycle?.join('/')}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + for (let m of this.seen.entries()) { + let p = m[1]; + if (t === m[0]) { + s(m); + continue; + } + if (n.external) { + let v = n.external.registry.get(m[0])?.id; + if (t !== m[0] && v) { + s(m); + continue; + } + } + if (this.metadataRegistry.get(m[0])?.id) { + s(m); + continue; + } + if (p.cycle) { + s(m); + continue; + } + if (p.count > 1 && n.reused === 'ref') { + s(m); + continue; + } + } + let u = (m, p) => { + let f = this.seen.get(m), + v = f.def ?? f.schema, + b = { ...v }; + if (f.ref === null) return; + let $ = f.ref; + if (((f.ref = null), $)) { + u($, p); + let g = this.seen.get($).schema; + g.$ref && + (p.target === 'draft-7' || + p.target === 'draft-4' || + p.target === 'openapi-3.0') + ? ((v.allOf = v.allOf ?? []), v.allOf.push(g)) + : (Object.assign(v, g), Object.assign(v, b)); + } + f.isParent || + this.override({ zodSchema: m, jsonSchema: v, path: f.path ?? [] }); + }; + for (let m of [...this.seen.entries()].reverse()) + u(m[0], { target: this.target }); + let a = {}; + if ( + (this.target === 'draft-2020-12' + ? (a.$schema = 'https://json-schema.org/draft/2020-12/schema') + : this.target === 'draft-7' + ? (a.$schema = 'http://json-schema.org/draft-07/schema#') + : this.target === 'draft-4' + ? (a.$schema = 'http://json-schema.org/draft-04/schema#') + : this.target === 'openapi-3.0' || + console.warn(`Invalid target: ${this.target}`), + n.external?.uri) + ) { + let m = n.external.registry.get(t)?.id; + if (!m) throw new Error('Schema is missing an `id` property'); + a.$id = n.external.uri(m); + } + Object.assign(a, r.def); + let c = n.external?.defs ?? {}; + for (let m of this.seen.entries()) { + let p = m[1]; + p.def && p.defId && (c[p.defId] = p.def); + } + n.external || + (Object.keys(c).length > 0 && + (this.target === 'draft-2020-12' + ? (a.$defs = c) + : (a.definitions = c))); + try { + return JSON.parse(JSON.stringify(a)); + } catch { + throw new Error('Error converting schema to JSON.'); + } + } + }; + function Nu(e, t) { + if (e instanceof Dt) { + let n = new On(t), + r = {}; + for (let u of e._idmap.entries()) { + let [a, c] = u; + n.process(c); + } + let o = {}, + s = { registry: e, uri: t?.uri, defs: r }; + for (let u of e._idmap.entries()) { + let [a, c] = u; + o[a] = n.emit(c, { ...t, external: s }); + } + if (Object.keys(r).length > 0) { + let u = n.target === 'draft-2020-12' ? '$defs' : 'definitions'; + o.__shared = { [u]: r }; + } + return { schemas: o }; + } + let i = new On(t); + return (i.process(e), i.emit(e, t)); + } + function X(e, t) { + let i = t ?? { seen: new Set() }; + if (i.seen.has(e)) return !1; + i.seen.add(e); + let r = e._zod.def; + switch (r.type) { + case 'string': + case 'number': + case 'bigint': + case 'boolean': + case 'date': + case 'symbol': + case 'undefined': + case 'null': + case 'any': + case 'unknown': + case 'never': + case 'void': + case 'literal': + case 'enum': + case 'nan': + case 'file': + case 'template_literal': + return !1; + case 'array': + return X(r.element, i); + case 'object': { + for (let o in r.shape) if (X(r.shape[o], i)) return !0; + return !1; + } + case 'union': { + for (let o of r.options) if (X(o, i)) return !0; + return !1; + } + case 'intersection': + return X(r.left, i) || X(r.right, i); + case 'tuple': { + for (let o of r.items) if (X(o, i)) return !0; + return !!(r.rest && X(r.rest, i)); + } + case 'record': + return X(r.keyType, i) || X(r.valueType, i); + case 'map': + return X(r.keyType, i) || X(r.valueType, i); + case 'set': + return X(r.valueType, i); + case 'promise': + case 'optional': + case 'nonoptional': + case 'nullable': + case 'readonly': + return X(r.innerType, i); + case 'lazy': + return X(r.getter(), i); + case 'default': + return X(r.innerType, i); + case 'prefault': + return X(r.innerType, i); + case 'custom': + return !1; + case 'transform': + return !0; + case 'pipe': + return X(r.in, i) || X(r.out, i); + case 'success': + return !1; + case 'catch': + return !1; + case 'function': + return !1; + default: + } + throw new Error(`Unknown schema type: ${r.type}`); + } + var bp = {}; + var mi = {}; + et(mi, { + ZodISODate: () => ci, + ZodISODateTime: () => ui, + ZodISODuration: () => di, + ZodISOTime: () => li, + date: () => Zu, + datetime: () => Du, + duration: () => Tu, + time: () => Eu, + }); + var ui = h('ZodISODateTime', (e, t) => { + (Ga.init(e, t), M.init(e, t)); + }); + function Du(e) { + return Ks(ui, e); + } + var ci = h('ZodISODate', (e, t) => { + (Ka.init(e, t), M.init(e, t)); + }); + function Zu(e) { + return qs(ci, e); + } + var li = h('ZodISOTime', (e, t) => { + (qa.init(e, t), M.init(e, t)); + }); + function Eu(e) { + return Xs(li, e); + } + var di = h('ZodISODuration', (e, t) => { + (Xa.init(e, t), M.init(e, t)); + }); + function Tu(e) { + return Hs(di, e); + } + var $p = (e, t) => { + (rn.init(e, t), + (e.name = 'ZodError'), + Object.defineProperties(e, { + format: { value: (i) => an(e, i) }, + flatten: { value: (i) => on(e, i) }, + addIssue: { + value: (i) => { + (e.issues.push(i), (e.message = JSON.stringify(e.issues, St, 2))); + }, + }, + addIssues: { + value: (i) => { + (e.issues.push(...i), + (e.message = JSON.stringify(e.issues, St, 2))); + }, + }, + isEmpty: { + get() { + return e.issues.length === 0; + }, + }, + })); + }, + Xk = h('ZodError', $p), + ce = h('ZodError', $p, { Parent: Error }); + var Au = jt(ce), + Cu = Ot(ce), + Lu = Ut(ce), + Ru = Pt(ce), + Ju = br(ce), + Fu = yr(ce), + Vu = $r(ce), + Mu = _r(ce), + Wu = kr(ce), + Bu = xr(ce), + Gu = wr(ce), + Ku = Sr(ce); + var A = h( + 'ZodType', + (e, t) => ( + D.init(e, t), + (e.def = t), + (e.type = t.type), + Object.defineProperty(e, '_def', { value: t }), + (e.check = (...i) => + e.clone( + O.mergeDefs(t, { + checks: [ + ...(t.checks ?? []), + ...i.map((n) => + typeof n == 'function' + ? { + _zod: { + check: n, + def: { check: 'custom' }, + onattach: [], + }, + } + : n, + ), + ], + }), + )), + (e.clone = (i, n) => te(e, i, n)), + (e.brand = () => e), + (e.register = (i, n) => (i.add(e, n), e)), + (e.parse = (i, n) => Au(e, i, n, { callee: e.parse })), + (e.safeParse = (i, n) => Lu(e, i, n)), + (e.parseAsync = async (i, n) => Cu(e, i, n, { callee: e.parseAsync })), + (e.safeParseAsync = async (i, n) => Ru(e, i, n)), + (e.spa = e.safeParseAsync), + (e.encode = (i, n) => Ju(e, i, n)), + (e.decode = (i, n) => Fu(e, i, n)), + (e.encodeAsync = async (i, n) => Vu(e, i, n)), + (e.decodeAsync = async (i, n) => Mu(e, i, n)), + (e.safeEncode = (i, n) => Wu(e, i, n)), + (e.safeDecode = (i, n) => Bu(e, i, n)), + (e.safeEncodeAsync = async (i, n) => Gu(e, i, n)), + (e.safeDecodeAsync = async (i, n) => Ku(e, i, n)), + (e.refine = (i, n) => e.check(sf(i, n))), + (e.superRefine = (i) => e.check(uf(i))), + (e.overwrite = (i) => e.check(Ze(i))), + (e.optional = () => fi(e)), + (e.nullable = () => vi(e)), + (e.nullish = () => fi(vi(e))), + (e.nonoptional = (i) => Kp(e, i)), + (e.array = () => yi(e)), + (e.or = (i) => hc([e, i])), + (e.and = (i) => Zp(e, i)), + (e.transform = (i) => gi(e, $c(i))), + (e.default = (i) => Wp(e, i)), + (e.prefault = (i) => Gp(e, i)), + (e.catch = (i) => Hp(e, i)), + (e.pipe = (i) => gi(e, i)), + (e.readonly = () => ef(e)), + (e.describe = (i) => { + let n = e.clone(); + return (Ue.add(n, { description: i }), n); + }), + Object.defineProperty(e, 'description', { + get() { + return Ue.get(e)?.description; + }, + configurable: !0, + }), + (e.meta = (...i) => { + if (i.length === 0) return Ue.get(e); + let n = e.clone(); + return (Ue.add(n, i[0]), n); + }), + (e.isOptional = () => e.safeParse(void 0).success), + (e.isNullable = () => e.safeParse(null).success), + e + ), + ), + Hu = h('_ZodString', (e, t) => { + (rt.init(e, t), A.init(e, t)); + let i = e._zod.bag; + ((e.format = i.format ?? null), + (e.minLength = i.minimum ?? null), + (e.maxLength = i.maximum ?? null), + (e.regex = (...n) => e.check(bn(...n))), + (e.includes = (...n) => e.check(_n(...n))), + (e.startsWith = (...n) => e.check(kn(...n))), + (e.endsWith = (...n) => e.check(xn(...n))), + (e.min = (...n) => e.check(Ge(...n))), + (e.max = (...n) => e.check(Et(...n))), + (e.length = (...n) => e.check(Tt(...n))), + (e.nonempty = (...n) => e.check(Ge(1, ...n))), + (e.lowercase = (n) => e.check(yn(n))), + (e.uppercase = (n) => e.check($n(n))), + (e.trim = () => e.check(In())), + (e.normalize = (...n) => e.check(Sn(...n))), + (e.toLowerCase = () => e.check(zn())), + (e.toUpperCase = () => e.check(jn()))); + }), + Pn = h('ZodString', (e, t) => { + (rt.init(e, t), + Hu.init(e, t), + (e.email = (i) => e.check(Fr(Yu, i))), + (e.url = (i) => e.check(gn(hi, i))), + (e.jwt = (i) => e.check(si(pc, i))), + (e.emoji = (i) => e.check(Gr(Qu, i))), + (e.guid = (i) => e.check(vn(pi, i))), + (e.uuid = (i) => e.check(Vr(Te, i))), + (e.uuidv4 = (i) => e.check(Mr(Te, i))), + (e.uuidv6 = (i) => e.check(Wr(Te, i))), + (e.uuidv7 = (i) => e.check(Br(Te, i))), + (e.nanoid = (i) => e.check(Kr(ec, i))), + (e.guid = (i) => e.check(vn(pi, i))), + (e.cuid = (i) => e.check(qr(tc, i))), + (e.cuid2 = (i) => e.check(Xr(nc, i))), + (e.ulid = (i) => e.check(Hr(rc, i))), + (e.base64 = (i) => e.check(ii(lc, i))), + (e.base64url = (i) => e.check(oi(dc, i))), + (e.xid = (i) => e.check(Yr(ic, i))), + (e.ksuid = (i) => e.check(Qr(oc, i))), + (e.ipv4 = (i) => e.check(ei(ac, i))), + (e.ipv6 = (i) => e.check(ti(sc, i))), + (e.cidrv4 = (i) => e.check(ni(uc, i))), + (e.cidrv6 = (i) => e.check(ri(cc, i))), + (e.e164 = (i) => e.check(ai(mc, i))), + (e.datetime = (i) => e.check(Du(i))), + (e.date = (i) => e.check(Zu(i))), + (e.time = (i) => e.check(Eu(i))), + (e.duration = (i) => e.check(Tu(i)))); + }); + function qu(e) { + return Ws(Pn, e); + } + var M = h('ZodStringFormat', (e, t) => { + (V.init(e, t), Hu.init(e, t)); + }), + Yu = h('ZodEmail', (e, t) => { + (Ca.init(e, t), M.init(e, t)); + }); + function Yk(e) { + return Fr(Yu, e); + } + var pi = h('ZodGUID', (e, t) => { + (Ta.init(e, t), M.init(e, t)); + }); + function Qk(e) { + return vn(pi, e); + } + var Te = h('ZodUUID', (e, t) => { + (Aa.init(e, t), M.init(e, t)); + }); + function ex(e) { + return Vr(Te, e); + } + function tx(e) { + return Mr(Te, e); + } + function nx(e) { + return Wr(Te, e); + } + function rx(e) { + return Br(Te, e); + } + var hi = h('ZodURL', (e, t) => { + (La.init(e, t), M.init(e, t)); + }); + function ix(e) { + return gn(hi, e); + } + function ox(e) { + return gn(hi, { + protocol: /^https?$/, + hostname: ge.domain, + ...O.normalizeParams(e), + }); + } + var Qu = h('ZodEmoji', (e, t) => { + (Ra.init(e, t), M.init(e, t)); + }); + function ax(e) { + return Gr(Qu, e); + } + var ec = h('ZodNanoID', (e, t) => { + (Ja.init(e, t), M.init(e, t)); + }); + function sx(e) { + return Kr(ec, e); + } + var tc = h('ZodCUID', (e, t) => { + (Fa.init(e, t), M.init(e, t)); + }); + function ux(e) { + return qr(tc, e); + } + var nc = h('ZodCUID2', (e, t) => { + (Va.init(e, t), M.init(e, t)); + }); + function cx(e) { + return Xr(nc, e); + } + var rc = h('ZodULID', (e, t) => { + (Ma.init(e, t), M.init(e, t)); + }); + function lx(e) { + return Hr(rc, e); + } + var ic = h('ZodXID', (e, t) => { + (Wa.init(e, t), M.init(e, t)); + }); + function dx(e) { + return Yr(ic, e); + } + var oc = h('ZodKSUID', (e, t) => { + (Ba.init(e, t), M.init(e, t)); + }); + function mx(e) { + return Qr(oc, e); + } + var ac = h('ZodIPv4', (e, t) => { + (Ha.init(e, t), M.init(e, t)); + }); + function px(e) { + return ei(ac, e); + } + var sc = h('ZodIPv6', (e, t) => { + (Ya.init(e, t), M.init(e, t)); + }); + function fx(e) { + return ti(sc, e); + } + var uc = h('ZodCIDRv4', (e, t) => { + (Qa.init(e, t), M.init(e, t)); + }); + function vx(e) { + return ni(uc, e); + } + var cc = h('ZodCIDRv6', (e, t) => { + (es.init(e, t), M.init(e, t)); + }); + function gx(e) { + return ri(cc, e); + } + var lc = h('ZodBase64', (e, t) => { + (ns.init(e, t), M.init(e, t)); + }); + function hx(e) { + return ii(lc, e); + } + var dc = h('ZodBase64URL', (e, t) => { + (rs.init(e, t), M.init(e, t)); + }); + function bx(e) { + return oi(dc, e); + } + var mc = h('ZodE164', (e, t) => { + (is.init(e, t), M.init(e, t)); + }); + function yx(e) { + return ai(mc, e); + } + var pc = h('ZodJWT', (e, t) => { + (os.init(e, t), M.init(e, t)); + }); + function $x(e) { + return si(pc, e); + } + var Nn = h('ZodCustomStringFormat', (e, t) => { + (as.init(e, t), M.init(e, t)); + }); + function _x(e, t, i = {}) { + return At(Nn, e, t, i); + } + function kx(e) { + return At(Nn, 'hostname', ge.hostname, e); + } + function xx(e) { + return At(Nn, 'hex', ge.hex, e); + } + function wx(e, t) { + let i = t?.enc ?? 'hex', + n = `${e}_${i}`, + r = ge[n]; + if (!r) throw new Error(`Unrecognized hash format: ${n}`); + return At(Nn, n, r, t); + } + var Dn = h('ZodNumber', (e, t) => { + (Zr.init(e, t), + A.init(e, t), + (e.gt = (n, r) => e.check(De(n, r))), + (e.gte = (n, r) => e.check(ue(n, r))), + (e.min = (n, r) => e.check(ue(n, r))), + (e.lt = (n, r) => e.check(Ne(n, r))), + (e.lte = (n, r) => e.check(he(n, r))), + (e.max = (n, r) => e.check(he(n, r))), + (e.int = (n) => e.check(Xu(n))), + (e.safe = (n) => e.check(Xu(n))), + (e.positive = (n) => e.check(De(0, n))), + (e.nonnegative = (n) => e.check(ue(0, n))), + (e.negative = (n) => e.check(Ne(0, n))), + (e.nonpositive = (n) => e.check(he(0, n))), + (e.multipleOf = (n, r) => e.check(it(n, r))), + (e.step = (n, r) => e.check(it(n, r))), + (e.finite = () => e)); + let i = e._zod.bag; + ((e.minValue = + Math.max( + i.minimum ?? Number.NEGATIVE_INFINITY, + i.exclusiveMinimum ?? Number.NEGATIVE_INFINITY, + ) ?? null), + (e.maxValue = + Math.min( + i.maximum ?? Number.POSITIVE_INFINITY, + i.exclusiveMaximum ?? Number.POSITIVE_INFINITY, + ) ?? null), + (e.isInt = + (i.format ?? '').includes('int') || + Number.isSafeInteger(i.multipleOf ?? 0.5)), + (e.isFinite = !0), + (e.format = i.format ?? null)); + }); + function _p(e) { + return Ys(Dn, e); + } + var Lt = h('ZodNumberFormat', (e, t) => { + (ss.init(e, t), Dn.init(e, t)); + }); + function Xu(e) { + return eu(Lt, e); + } + function Sx(e) { + return tu(Lt, e); + } + function Ix(e) { + return nu(Lt, e); + } + function zx(e) { + return ru(Lt, e); + } + function jx(e) { + return iu(Lt, e); + } + var Zn = h('ZodBoolean', (e, t) => { + (ln.init(e, t), A.init(e, t)); + }); + function kp(e) { + return ou(Zn, e); + } + var En = h('ZodBigInt', (e, t) => { + (Er.init(e, t), + A.init(e, t), + (e.gte = (n, r) => e.check(ue(n, r))), + (e.min = (n, r) => e.check(ue(n, r))), + (e.gt = (n, r) => e.check(De(n, r))), + (e.gte = (n, r) => e.check(ue(n, r))), + (e.min = (n, r) => e.check(ue(n, r))), + (e.lt = (n, r) => e.check(Ne(n, r))), + (e.lte = (n, r) => e.check(he(n, r))), + (e.max = (n, r) => e.check(he(n, r))), + (e.positive = (n) => e.check(De(BigInt(0), n))), + (e.negative = (n) => e.check(Ne(BigInt(0), n))), + (e.nonpositive = (n) => e.check(he(BigInt(0), n))), + (e.nonnegative = (n) => e.check(ue(BigInt(0), n))), + (e.multipleOf = (n, r) => e.check(it(n, r)))); + let i = e._zod.bag; + ((e.minValue = i.minimum ?? null), + (e.maxValue = i.maximum ?? null), + (e.format = i.format ?? null)); + }); + function Ox(e) { + return su(En, e); + } + var fc = h('ZodBigIntFormat', (e, t) => { + (us.init(e, t), En.init(e, t)); + }); + function Ux(e) { + return cu(fc, e); + } + function Px(e) { + return lu(fc, e); + } + var xp = h('ZodSymbol', (e, t) => { + (cs.init(e, t), A.init(e, t)); + }); + function Nx(e) { + return du(xp, e); + } + var wp = h('ZodUndefined', (e, t) => { + (ls.init(e, t), A.init(e, t)); + }); + function Dx(e) { + return mu(wp, e); + } + var Sp = h('ZodNull', (e, t) => { + (ds.init(e, t), A.init(e, t)); + }); + function Ip(e) { + return pu(Sp, e); + } + var zp = h('ZodAny', (e, t) => { + (ms.init(e, t), A.init(e, t)); + }); + function Zx() { + return fu(zp); + } + var jp = h('ZodUnknown', (e, t) => { + (ps.init(e, t), A.init(e, t)); + }); + function Ct() { + return vu(jp); + } + var Op = h('ZodNever', (e, t) => { + (fs.init(e, t), A.init(e, t)); + }); + function vc(e) { + return gu(Op, e); + } + var Up = h('ZodVoid', (e, t) => { + (vs.init(e, t), A.init(e, t)); + }); + function Ex(e) { + return hu(Up, e); + } + var bi = h('ZodDate', (e, t) => { + (gs.init(e, t), + A.init(e, t), + (e.min = (n, r) => e.check(ue(n, r))), + (e.max = (n, r) => e.check(he(n, r)))); + let i = e._zod.bag; + ((e.minDate = i.minimum ? new Date(i.minimum) : null), + (e.maxDate = i.maximum ? new Date(i.maximum) : null)); + }); + function Tx(e) { + return bu(bi, e); + } + var Pp = h('ZodArray', (e, t) => { + (hs.init(e, t), + A.init(e, t), + (e.element = t.element), + (e.min = (i, n) => e.check(Ge(i, n))), + (e.nonempty = (i) => e.check(Ge(1, i))), + (e.max = (i, n) => e.check(Et(i, n))), + (e.length = (i, n) => e.check(Tt(i, n))), + (e.unwrap = () => e.element)); + }); + function yi(e, t) { + return Iu(Pp, e, t); + } + function Ax(e) { + let t = e._zod.def.shape; + return yc(Object.keys(t)); + } + var $i = h('ZodObject', (e, t) => { + (bs.init(e, t), + A.init(e, t), + O.defineLazy(e, 'shape', () => t.shape), + (e.keyof = () => yc(Object.keys(e._zod.def.shape))), + (e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i })), + (e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ct() })), + (e.loose = () => e.clone({ ...e._zod.def, catchall: Ct() })), + (e.strict = () => e.clone({ ...e._zod.def, catchall: vc() })), + (e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 })), + (e.extend = (i) => O.extend(e, i)), + (e.safeExtend = (i) => O.safeExtend(e, i)), + (e.merge = (i) => O.merge(e, i)), + (e.pick = (i) => O.pick(e, i)), + (e.omit = (i) => O.omit(e, i)), + (e.partial = (...i) => O.partial(_c, e, i[0])), + (e.required = (...i) => O.required(kc, e, i[0]))); + }); + function Cx(e, t) { + let i = { type: 'object', shape: e ?? {}, ...O.normalizeParams(t) }; + return new $i(i); + } + function Lx(e, t) { + return new $i({ + type: 'object', + shape: e, + catchall: vc(), + ...O.normalizeParams(t), + }); + } + function Rx(e, t) { + return new $i({ + type: 'object', + shape: e, + catchall: Ct(), + ...O.normalizeParams(t), + }); + } + var gc = h('ZodUnion', (e, t) => { + (Tr.init(e, t), A.init(e, t), (e.options = t.options)); + }); + function hc(e, t) { + return new gc({ type: 'union', options: e, ...O.normalizeParams(t) }); + } + var Np = h('ZodDiscriminatedUnion', (e, t) => { + (gc.init(e, t), ys.init(e, t)); + }); + function Jx(e, t, i) { + return new Np({ + type: 'union', + options: t, + discriminator: e, + ...O.normalizeParams(i), + }); + } + var Dp = h('ZodIntersection', (e, t) => { + ($s.init(e, t), A.init(e, t)); + }); + function Zp(e, t) { + return new Dp({ type: 'intersection', left: e, right: t }); + } + var Ep = h('ZodTuple', (e, t) => { + (Ar.init(e, t), + A.init(e, t), + (e.rest = (i) => e.clone({ ...e._zod.def, rest: i }))); + }); + function Tp(e, t, i) { + let n = t instanceof D, + r = n ? i : t, + o = n ? t : null; + return new Ep({ + type: 'tuple', + items: e, + rest: o, + ...O.normalizeParams(r), + }); + } + var bc = h('ZodRecord', (e, t) => { + (_s.init(e, t), + A.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function Ap(e, t, i) { + return new bc({ + type: 'record', + keyType: e, + valueType: t, + ...O.normalizeParams(i), + }); + } + function Fx(e, t, i) { + let n = te(e); + return ( + (n._zod.values = void 0), + new bc({ + type: 'record', + keyType: n, + valueType: t, + ...O.normalizeParams(i), + }) + ); + } + var Cp = h('ZodMap', (e, t) => { + (ks.init(e, t), + A.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function Vx(e, t, i) { + return new Cp({ + type: 'map', + keyType: e, + valueType: t, + ...O.normalizeParams(i), + }); + } + var Lp = h('ZodSet', (e, t) => { + (xs.init(e, t), + A.init(e, t), + (e.min = (...i) => e.check(ot(...i))), + (e.nonempty = (i) => e.check(ot(1, i))), + (e.max = (...i) => e.check(Zt(...i))), + (e.size = (...i) => e.check(hn(...i)))); + }); + function Mx(e, t) { + return new Lp({ type: 'set', valueType: e, ...O.normalizeParams(t) }); + } + var Un = h('ZodEnum', (e, t) => { + (ws.init(e, t), + A.init(e, t), + (e.enum = t.entries), + (e.options = Object.values(t.entries))); + let i = new Set(Object.keys(t.entries)); + ((e.extract = (n, r) => { + let o = {}; + for (let s of n) + if (i.has(s)) o[s] = t.entries[s]; + else throw new Error(`Key ${s} not found in enum`); + return new Un({ ...t, checks: [], ...O.normalizeParams(r), entries: o }); + }), + (e.exclude = (n, r) => { + let o = { ...t.entries }; + for (let s of n) + if (i.has(s)) delete o[s]; + else throw new Error(`Key ${s} not found in enum`); + return new Un({ + ...t, + checks: [], + ...O.normalizeParams(r), + entries: o, + }); + })); + }); + function yc(e, t) { + let i = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e; + return new Un({ type: 'enum', entries: i, ...O.normalizeParams(t) }); + } + function Wx(e, t) { + return new Un({ type: 'enum', entries: e, ...O.normalizeParams(t) }); + } + var Rp = h('ZodLiteral', (e, t) => { + (Ss.init(e, t), + A.init(e, t), + (e.values = new Set(t.values)), + Object.defineProperty(e, 'value', { + get() { + if (t.values.length > 1) + throw new Error( + 'This schema contains multiple valid literal values. Use `.values` instead.', + ); + return t.values[0]; + }, + })); + }); + function Bx(e, t) { + return new Rp({ + type: 'literal', + values: Array.isArray(e) ? e : [e], + ...O.normalizeParams(t), + }); + } + var Jp = h('ZodFile', (e, t) => { + (Is.init(e, t), + A.init(e, t), + (e.min = (i, n) => e.check(ot(i, n))), + (e.max = (i, n) => e.check(Zt(i, n))), + (e.mime = (i, n) => e.check(wn(Array.isArray(i) ? i : [i], n)))); + }); + function Gx(e) { + return zu(Jp, e); + } + var Fp = h('ZodTransform', (e, t) => { + (zs.init(e, t), + A.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Je(e.constructor.name); + i.addIssue = (o) => { + if (typeof o == 'string') i.issues.push(O.issue(o, i.value, t)); + else { + let s = o; + (s.fatal && (s.continue = !1), + s.code ?? (s.code = 'custom'), + s.input ?? (s.input = i.value), + s.inst ?? (s.inst = e), + i.issues.push(O.issue(s))); + } + }; + let r = t.transform(i.value, i); + return r instanceof Promise + ? r.then((o) => ((i.value = o), i)) + : ((i.value = r), i); + })); + }); + function $c(e) { + return new Fp({ type: 'transform', transform: e }); + } + var _c = h('ZodOptional', (e, t) => { + (js.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function fi(e) { + return new _c({ type: 'optional', innerType: e }); + } + var Vp = h('ZodNullable', (e, t) => { + (Os.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function vi(e) { + return new Vp({ type: 'nullable', innerType: e }); + } + function Kx(e) { + return fi(vi(e)); + } + var Mp = h('ZodDefault', (e, t) => { + (Us.init(e, t), + A.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeDefault = e.unwrap)); + }); + function Wp(e, t) { + return new Mp({ + type: 'default', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : O.shallowClone(t); + }, + }); + } + var Bp = h('ZodPrefault', (e, t) => { + (Ps.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Gp(e, t) { + return new Bp({ + type: 'prefault', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : O.shallowClone(t); + }, + }); + } + var kc = h('ZodNonOptional', (e, t) => { + (Ns.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Kp(e, t) { + return new kc({ + type: 'nonoptional', + innerType: e, + ...O.normalizeParams(t), + }); + } + var qp = h('ZodSuccess', (e, t) => { + (Ds.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function qx(e) { + return new qp({ type: 'success', innerType: e }); + } + var Xp = h('ZodCatch', (e, t) => { + (Zs.init(e, t), + A.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeCatch = e.unwrap)); + }); + function Hp(e, t) { + return new Xp({ + type: 'catch', + innerType: e, + catchValue: typeof t == 'function' ? t : () => t, + }); + } + var Yp = h('ZodNaN', (e, t) => { + (Es.init(e, t), A.init(e, t)); + }); + function Xx(e) { + return $u(Yp, e); + } + var xc = h('ZodPipe', (e, t) => { + (Ts.init(e, t), A.init(e, t), (e.in = t.in), (e.out = t.out)); + }); + function gi(e, t) { + return new xc({ type: 'pipe', in: e, out: t }); + } + var wc = h('ZodCodec', (e, t) => { + (xc.init(e, t), dn.init(e, t)); + }); + function Hx(e, t, i) { + return new wc({ + type: 'pipe', + in: e, + out: t, + transform: i.decode, + reverseTransform: i.encode, + }); + } + var Qp = h('ZodReadonly', (e, t) => { + (As.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function ef(e) { + return new Qp({ type: 'readonly', innerType: e }); + } + var tf = h('ZodTemplateLiteral', (e, t) => { + (Cs.init(e, t), A.init(e, t)); + }); + function Yx(e, t) { + return new tf({ + type: 'template_literal', + parts: e, + ...O.normalizeParams(t), + }); + } + var nf = h('ZodLazy', (e, t) => { + (Js.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.getter())); + }); + function rf(e) { + return new nf({ type: 'lazy', getter: e }); + } + var of = h('ZodPromise', (e, t) => { + (Rs.init(e, t), A.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Qx(e) { + return new of({ type: 'promise', innerType: e }); + } + var af = h('ZodFunction', (e, t) => { + (Ls.init(e, t), A.init(e, t)); + }); + function ew(e) { + return new af({ + type: 'function', + input: Array.isArray(e?.input) ? Tp(e?.input) : (e?.input ?? yi(Ct())), + output: e?.output ?? Ct(), + }); + } + var _i = h('ZodCustom', (e, t) => { + (Fs.init(e, t), A.init(e, t)); + }); + function tw(e) { + let t = new B({ check: 'custom' }); + return ((t._zod.check = e), t); + } + function nw(e, t) { + return ju(_i, e ?? (() => !0), t); + } + function sf(e, t = {}) { + return Ou(_i, e, t); + } + function uf(e) { + return Uu(e); + } + function rw(e, t = { error: `Input not instance of ${e.name}` }) { + let i = new _i({ + type: 'custom', + check: 'custom', + fn: (n) => n instanceof e, + abort: !0, + ...O.normalizeParams(t), + }); + return ((i._zod.bag.Class = e), i); + } + var iw = (...e) => Pu({ Codec: wc, Boolean: Zn, String: Pn }, ...e); + function ow(e) { + let t = rf(() => hc([qu(e), _p(), kp(), Ip(), yi(t), Ap(qu(), t)])); + return t; + } + function aw(e, t) { + return gi($c(e), t); + } + var sw = { + invalid_type: 'invalid_type', + too_big: 'too_big', + too_small: 'too_small', + invalid_format: 'invalid_format', + not_multiple_of: 'not_multiple_of', + unrecognized_keys: 'unrecognized_keys', + invalid_union: 'invalid_union', + invalid_key: 'invalid_key', + invalid_element: 'invalid_element', + invalid_value: 'invalid_value', + custom: 'custom', + }; + function uw(e) { + q({ customError: e }); + } + function cw() { + return q().customError; + } + var Sc; + Sc || (Sc = {}); + var Ic = {}; + et(Ic, { + bigint: () => pw, + boolean: () => mw, + date: () => fw, + number: () => dw, + string: () => lw, + }); + function lw(e) { + return Bs(Pn, e); + } + function dw(e) { + return Qs(Dn, e); + } + function mw(e) { + return au(Zn, e); + } + function pw(e) { + return uu(En, e); + } + function fw(e) { + return yu(bi, e); + } + q(Cr()); + var vw = Object.defineProperty, + ut = (e, t) => { + for (var i in t) vw(e, i, { get: t[i], enumerable: !0 }); + }; + function Z(e, t, i = 'draft-7') { + return d.toJSONSchema(e, { target: i }); + } + var at = d.string(), + gw = d.number(), + OP = d.boolean(), + Tn = d.string().min(1), + zc = d.number().int().positive(), + jc = d.number().int().nonnegative(), + df = d.number().describe('Tagging version number'), + hw = d.union([d.string(), d.number(), d.boolean()]), + UP = hw.optional(), + bw = {}; + ut(bw, { + ErrorHandlerSchema: () => ct, + HandlerSchema: () => ff, + LogHandlerSchema: () => Rt, + StorageSchema: () => pf, + StorageTypeSchema: () => mf, + errorHandlerJsonSchema: () => _w, + handlerJsonSchema: () => xw, + logHandlerJsonSchema: () => kw, + storageJsonSchema: () => $w, + storageTypeJsonSchema: () => yw, + }); + var mf = d + .enum(['local', 'session', 'cookie']) + .describe('Storage mechanism: local, session, or cookie'), + pf = d + .object({ + Local: d.literal('local'), + Session: d.literal('session'), + Cookie: d.literal('cookie'), + }) + .describe('Storage type constants for type-safe references'), + ct = d.any().describe('Error handler function: (error, state?) => void'), + Rt = d.any().describe('Log handler function: (message, verbose?) => void'), + ff = d + .object({ + Error: ct.describe('Error handler function'), + Log: Rt.describe('Log handler function'), + }) + .describe('Handler interface with error and log functions'), + yw = Z(mf), + $w = Z(pf), + _w = Z(ct), + kw = Z(Rt), + xw = Z(ff), + PP = d + .object({ + onError: ct + .optional() + .describe('Error handler function: (error, state?) => void'), + onLog: Rt.optional().describe( + 'Log handler function: (message, verbose?) => void', + ), + }) + .partial(), + NP = d + .object({ + verbose: d + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + }) + .partial(), + DP = d + .object({ + queue: d + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + }) + .partial(), + ZP = d.object({}).partial(), + EP = d + .object({ + init: d + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: d + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + }) + .partial(), + TP = d + .object({ + disabled: d.boolean().describe('Set to true to disable').optional(), + }) + .partial(), + AP = d + .object({ + primary: d + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .partial(), + CP = d + .object({ + settings: d + .any() + .optional() + .describe('Implementation-specific configuration'), + }) + .partial(), + LP = d + .object({ + env: d + .any() + .optional() + .describe('Environment dependencies (platform-specific)'), + }) + .partial(); + var RP = d + .object({ + type: d.string().optional().describe('Instance type identifier'), + config: d.unknown().describe('Instance configuration'), + }) + .partial(), + JP = d + .object({ + collector: d.unknown().describe('Collector instance (runtime object)'), + config: d.unknown().describe('Configuration'), + env: d.unknown().describe('Environment dependencies'), + }) + .partial(), + FP = d + .object({ + batch: d + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + batched: d + .unknown() + .optional() + .describe('Batch of events to be processed'), + }) + .partial(), + VP = d + .object({ + ignore: d + .boolean() + .describe('Set to true to skip processing') + .optional(), + condition: d + .string() + .optional() + .describe('Condition function: return true to process'), + }) + .partial(), + MP = d + .object({ + sources: d + .record(d.string(), d.unknown()) + .describe('Map of source instances'), + }) + .partial(), + WP = d + .object({ + destinations: d + .record(d.string(), d.unknown()) + .describe('Map of destination instances'), + }) + .partial(), + ww = {}; + ut(ww, { + ConsentSchema: () => Ce, + DeepPartialEventSchema: () => Sw, + EntitiesSchema: () => bf, + EntitySchema: () => Si, + EventSchema: () => xe, + OrderedPropertiesSchema: () => wi, + PartialEventSchema: () => yf, + PropertiesSchema: () => ne, + PropertySchema: () => xi, + PropertyTypeSchema: () => Oc, + SourceSchema: () => hf, + SourceTypeSchema: () => Pc, + UserSchema: () => Cn, + VersionSchema: () => gf, + consentJsonSchema: () => Dw, + entityJsonSchema: () => Pw, + eventJsonSchema: () => Iw, + orderedPropertiesJsonSchema: () => Uw, + partialEventJsonSchema: () => zw, + propertiesJsonSchema: () => Ow, + sourceTypeJsonSchema: () => Nw, + userJsonSchema: () => jw, + }); + var vf, + Oc = d.lazy(() => + d.union([d.boolean(), d.string(), d.number(), d.record(d.string(), xi)]), + ), + xi = d.lazy(() => d.union([Oc, d.array(Oc)])), + ne = d + .record(d.string(), xi.optional()) + .describe('Flexible property collection with optional values'), + wi = d + .record(d.string(), d.tuple([xi, d.number()]).optional()) + .describe( + 'Ordered properties with [value, order] tuples for priority control', + ), + Pc = d + .union([d.enum(['web', 'server', 'app', 'other']), d.string()]) + .describe('Source type: web, server, app, other, or custom'), + Ce = d + .record(d.string(), d.boolean()) + .describe('Consent requirement mapping (group name → state)'), + Cn = ne + .and( + d.object({ + id: d.string().optional().describe('User identifier'), + device: d.string().optional().describe('Device identifier'), + session: d.string().optional().describe('Session identifier'), + hash: d.string().optional().describe('Hashed identifier'), + address: d.string().optional().describe('User address'), + email: d.string().email().optional().describe('User email address'), + phone: d.string().optional().describe('User phone number'), + userAgent: d + .string() + .optional() + .describe('Browser user agent string'), + browser: d.string().optional().describe('Browser name'), + browserVersion: d.string().optional().describe('Browser version'), + deviceType: d + .string() + .optional() + .describe('Device type (mobile, desktop, tablet)'), + os: d.string().optional().describe('Operating system'), + osVersion: d.string().optional().describe('Operating system version'), + screenSize: d.string().optional().describe('Screen dimensions'), + language: d.string().optional().describe('User language'), + country: d.string().optional().describe('User country'), + region: d.string().optional().describe('User region/state'), + city: d.string().optional().describe('User city'), + zip: d.string().optional().describe('User postal code'), + timezone: d.string().optional().describe('User timezone'), + ip: d.string().optional().describe('User IP address'), + internal: d + .boolean() + .optional() + .describe('Internal user flag (employee, test user)'), + }), + ) + .describe('User identification and properties'), + gf = ne + .and( + d.object({ + source: at.describe('Walker implementation version (e.g., "2.0.0")'), + tagging: df, + }), + ) + .describe('Walker version information'), + hf = ne + .and( + d.object({ + type: Pc.describe('Source type identifier'), + id: at.describe('Source identifier (typically URL on web)'), + previous_id: at.describe( + 'Previous source identifier (typically referrer on web)', + ), + }), + ) + .describe('Event source information'), + Si = d + .lazy(() => + d.object({ + entity: d.string().describe('Entity name'), + data: ne.describe('Entity-specific properties'), + nested: d.array(Si).describe('Nested child entities'), + context: wi.describe('Entity context data'), + }), + ) + .describe('Nested entity structure with recursive nesting support'), + bf = d.array(Si).describe('Array of nested entities'), + xe = d + .object({ + name: d + .string() + .describe( + 'Event name in "entity action" format (e.g., "page view", "product add")', + ), + data: ne.describe('Event-specific properties'), + context: wi.describe('Ordered context properties with priorities'), + globals: ne.describe('Global properties shared across events'), + custom: ne.describe('Custom implementation-specific properties'), + user: Cn.describe('User identification and attributes'), + nested: bf.describe('Related nested entities'), + consent: Ce.describe('Consent states at event time'), + id: Tn.describe('Unique event identifier (timestamp-based)'), + trigger: at.describe('Event trigger identifier'), + entity: at.describe('Parsed entity from event name'), + action: at.describe('Parsed action from event name'), + timestamp: zc.describe('Unix timestamp in milliseconds since epoch'), + timing: gw.describe('Event processing timing information'), + group: at.describe('Event grouping identifier'), + count: jc.describe('Event count in session'), + version: gf.describe('Walker version information'), + source: hf.describe('Event source information'), + }) + .describe('Complete walkerOS event structure'), + yf = xe + .partial() + .describe('Partial event structure with all fields optional'), + Sw = xe + .partial() + .describe('Partial event structure with all top-level fields optional'), + Iw = Z(xe), + zw = Z(yf), + jw = Z(Cn), + Ow = Z(ne), + Uw = Z(wi), + Pw = Z(Si), + Nw = Z(Pc), + Dw = Z(Ce), + Zw = {}; + ut(Zw, { + ConfigSchema: () => ji, + LoopSchema: () => Nc, + MapSchema: () => Zc, + PolicySchema: () => Jt, + ResultSchema: () => Ew, + RuleSchema: () => Ke, + RulesSchema: () => zi, + SetSchema: () => Dc, + ValueConfigSchema: () => $f, + ValueSchema: () => be, + ValuesSchema: () => Ii, + configJsonSchema: () => Mw, + loopJsonSchema: () => Cw, + mapJsonSchema: () => Rw, + policyJsonSchema: () => Jw, + ruleJsonSchema: () => Fw, + rulesJsonSchema: () => Vw, + setJsonSchema: () => Lw, + valueConfigJsonSchema: () => Aw, + valueJsonSchema: () => Tw, + }); + var be = d.lazy(() => + d.union([ + d.string().describe('String value or property path (e.g., "data.id")'), + d.number().describe('Numeric value'), + d.boolean().describe('Boolean value'), + d.lazy(() => vf), + d.array(be).describe('Array of values'), + ]), + ), + Ii = d.array(be).describe('Array of transformation values'), + Nc = d.lazy(() => + d + .tuple([be, be]) + .describe( + 'Loop transformation: [source, transform] tuple for array processing', + ), + ), + Dc = d.lazy(() => + d.array(be).describe('Set: Array of values for selection or combination'), + ), + Zc = d.lazy(() => + d + .record(d.string(), be) + .describe('Map: Object mapping keys to transformation values'), + ), + $f = (vf = d + .object({ + key: d + .string() + .optional() + .describe( + 'Property path to extract from event (e.g., "data.id", "user.email")', + ), + value: d + .union([d.string(), d.number(), d.boolean()]) + .optional() + .describe('Static primitive value'), + fn: d + .string() + .optional() + .describe('Custom transformation function as string (serialized)'), + map: Zc.optional().describe( + 'Object mapping: transform event data to structured output', + ), + loop: Nc.optional().describe( + 'Loop transformation: [source, transform] for array processing', + ), + set: Dc.optional().describe( + 'Set of values: combine or select from multiple values', + ), + consent: Ce.optional().describe( + 'Required consent states to include this value', + ), + condition: d + .string() + .optional() + .describe( + 'Condition function as string: return true to include value', + ), + validate: d + .string() + .optional() + .describe( + 'Validation function as string: return true if value is valid', + ), + }) + .refine((e) => Object.keys(e).length > 0, { + message: 'ValueConfig must have at least one property', + }) + .describe('Value transformation configuration with multiple strategies')), + Jt = d + .record(d.string(), be) + .describe('Policy rules for event pre-processing (key → value mapping)'), + Ke = d + .object({ + batch: d + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + condition: d + .string() + .optional() + .describe( + 'Condition function as string: return true to process event', + ), + consent: Ce.optional().describe( + 'Required consent states to process this event', + ), + settings: d + .any() + .optional() + .describe('Destination-specific settings for this event mapping'), + data: d + .union([be, Ii]) + .optional() + .describe('Data transformation rules for event'), + ignore: d + .boolean() + .optional() + .describe('Set to true to skip processing this event'), + name: d + .string() + .optional() + .describe( + 'Custom event name override (e.g., "view_item" for "product view")', + ), + policy: Jt.optional().describe( + 'Event-level policy overrides (applied after config-level policy)', + ), + }) + .describe('Mapping rule for specific entity-action combination'), + zi = d + .record( + d.string(), + d.record(d.string(), d.union([Ke, d.array(Ke)])).optional(), + ) + .describe( + 'Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support', + ), + ji = d + .object({ + consent: Ce.optional().describe( + 'Required consent states to process any events', + ), + data: d + .union([be, Ii]) + .optional() + .describe('Global data transformation applied to all events'), + mapping: zi.optional().describe('Entity-action specific mapping rules'), + policy: Jt.optional().describe( + 'Pre-processing policy rules applied before mapping', + ), + }) + .describe('Shared mapping configuration for sources and destinations'), + Ew = d + .object({ + eventMapping: Ke.optional().describe('Resolved mapping rule for event'), + mappingKey: d + .string() + .optional() + .describe('Mapping key used (e.g., "product.view")'), + }) + .describe('Mapping resolution result'), + Tw = Z(be), + Aw = Z($f), + Cw = Z(Nc), + Lw = Z(Dc), + Rw = Z(Zc), + Jw = Z(Jt), + Fw = Z(Ke), + Vw = Z(zi), + Mw = Z(ji), + Ww = {}; + ut(Ww, { + BatchSchema: () => kf, + ConfigSchema: () => Ln, + ContextSchema: () => Tc, + DLQSchema: () => Qw, + DataSchema: () => qw, + DestinationPolicySchema: () => Bw, + DestinationsSchema: () => Hw, + InitDestinationsSchema: () => Xw, + InitSchema: () => xf, + InstanceSchema: () => Rn, + PartialConfigSchema: () => Ec, + PushBatchContextSchema: () => Gw, + PushContextSchema: () => Ac, + PushEventSchema: () => _f, + PushEventsSchema: () => Kw, + PushResultSchema: () => Yw, + RefSchema: () => ki, + ResultSchema: () => wf, + batchJsonSchema: () => iS, + configJsonSchema: () => eS, + contextJsonSchema: () => nS, + instanceJsonSchema: () => oS, + partialConfigJsonSchema: () => tS, + pushContextJsonSchema: () => rS, + resultJsonSchema: () => aS, + }); + var Ln = d + .object({ + consent: Ce.optional().describe( + 'Required consent states to send events to this destination', + ), + settings: d + .any() + .describe('Implementation-specific configuration') + .optional(), + data: d + .union([be, Ii]) + .optional() + .describe( + 'Global data transformation applied to all events for this destination', + ), + env: d + .any() + .describe('Environment dependencies (platform-specific)') + .optional(), + id: Tn.describe( + 'Destination instance identifier (defaults to destination key)', + ).optional(), + init: d + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: d + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + mapping: zi + .optional() + .describe( + 'Entity-action specific mapping rules for this destination', + ), + policy: Jt.optional().describe( + 'Pre-processing policy rules applied before event mapping', + ), + queue: d + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + verbose: d + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + onError: ct.optional(), + onLog: Rt.optional(), + }) + .describe('Destination configuration'), + Ec = Ln.partial().describe( + 'Partial destination configuration with all fields optional', + ), + Bw = Jt.describe('Destination policy rules for event pre-processing'), + Tc = d + .object({ + collector: d.unknown().describe('Collector instance (runtime object)'), + config: Ln.describe('Destination configuration'), + data: d + .union([d.unknown(), d.array(d.unknown())]) + .optional() + .describe('Transformed event data'), + env: d.unknown().describe('Environment dependencies'), + }) + .describe('Destination context for init and push functions'), + Ac = Tc.extend({ + mapping: Ke.optional().describe( + 'Resolved mapping rule for this specific event', + ), + }).describe('Push context with event-specific mapping'), + Gw = Ac.describe('Batch push context with event-specific mapping'), + _f = d + .object({ + event: xe.describe('The event to process'), + mapping: Ke.optional().describe('Mapping rule for this event'), + }) + .describe('Event with optional mapping for batch processing'), + Kw = d.array(_f).describe('Array of events with mappings'), + kf = d + .object({ + key: d + .string() + .describe('Batch key (usually mapping key like "product.view")'), + events: d.array(xe).describe('Array of events in batch'), + data: d + .array(d.union([d.unknown(), d.array(d.unknown())]).optional()) + .describe('Transformed data for each event'), + mapping: Ke.optional().describe('Shared mapping rule for batch'), + }) + .describe('Batch of events grouped by mapping key'), + qw = d + .union([d.unknown(), d.array(d.unknown())]) + .optional() + .describe('Transformed event data (Property, undefined, or array)'), + Rn = d + .object({ + config: Ln.describe('Destination configuration'), + queue: d + .array(xe) + .optional() + .describe('Queued events awaiting consent'), + dlq: d + .array(d.tuple([xe, d.unknown()])) + .optional() + .describe('Dead letter queue (failed events with errors)'), + type: d.string().optional().describe('Destination type identifier'), + env: d.unknown().optional().describe('Environment dependencies'), + init: d.unknown().optional().describe('Initialization function'), + push: d.unknown().describe('Push function for single events'), + pushBatch: d.unknown().optional().describe('Batch push function'), + on: d.unknown().optional().describe('Event lifecycle hook function'), + }) + .describe('Destination instance (runtime object with functions)'), + xf = d + .object({ + code: Rn.describe('Destination instance with implementation'), + config: Ec.optional().describe('Partial configuration overrides'), + env: d.unknown().optional().describe('Partial environment overrides'), + }) + .describe('Destination initialization configuration'), + Xw = d + .record(d.string(), xf) + .describe('Map of destination IDs to initialization configurations'), + Hw = d + .record(d.string(), Rn) + .describe('Map of destination IDs to runtime instances'), + ki = d + .object({ + id: d.string().describe('Destination ID'), + destination: Rn.describe('Destination instance'), + }) + .describe('Destination reference (ID + instance)'), + Yw = d + .object({ + queue: d + .array(xe) + .optional() + .describe('Events queued (awaiting consent)'), + error: d.unknown().optional().describe('Error if push failed'), + }) + .describe('Push operation result'), + wf = d + .object({ + successful: d + .array(ki) + .describe('Destinations that processed successfully'), + queued: d.array(ki).describe('Destinations that queued events'), + failed: d.array(ki).describe('Destinations that failed to process'), + }) + .describe('Overall destination processing result'), + Qw = d + .array(d.tuple([xe, d.unknown()])) + .describe('Dead letter queue: [(event, error), ...]'), + eS = Z(Ln), + tS = Z(Ec), + nS = Z(Tc), + rS = Z(Ac), + iS = Z(kf), + oS = Z(Rn), + aS = Z(wf), + sS = {}; + ut(sS, { + CommandTypeSchema: () => Sf, + ConfigSchema: () => Oi, + DestinationsSchema: () => Of, + InitConfigSchema: () => If, + InstanceSchema: () => Uf, + PushContextSchema: () => zf, + SessionDataSchema: () => Cc, + SourcesSchema: () => jf, + commandTypeJsonSchema: () => uS, + configJsonSchema: () => cS, + initConfigJsonSchema: () => dS, + instanceJsonSchema: () => pS, + pushContextJsonSchema: () => mS, + sessionDataJsonSchema: () => lS, + }); + var Sf = d + .union([ + d.enum([ + 'action', + 'config', + 'consent', + 'context', + 'destination', + 'elb', + 'globals', + 'hook', + 'init', + 'link', + 'run', + 'user', + 'walker', + ]), + d.string(), + ]) + .describe( + 'Collector command type: standard commands or custom string for extensions', + ), + Oi = d + .object({ + run: d + .boolean() + .describe('Whether to run collector automatically on initialization') + .optional(), + tagging: df, + globalsStatic: ne.describe( + 'Static global properties that persist across collector runs', + ), + sessionStatic: d + .record(d.string(), d.unknown()) + .describe('Static session data that persists across collector runs'), + verbose: d.boolean().describe('Enable verbose logging for debugging'), + onError: ct.optional(), + onLog: Rt.optional(), + }) + .describe('Core collector configuration'), + Cc = ne + .and( + d.object({ + isStart: d.boolean().describe('Whether this is a new session start'), + storage: d.boolean().describe('Whether storage is available'), + id: Tn.describe('Session identifier').optional(), + start: zc.describe('Session start timestamp').optional(), + marketing: d + .literal(!0) + .optional() + .describe('Marketing attribution flag'), + updated: zc.describe('Last update timestamp').optional(), + isNew: d + .boolean() + .describe('Whether this is a new session') + .optional(), + device: Tn.describe('Device identifier').optional(), + count: jc.describe('Event count in session').optional(), + runs: jc.describe('Number of runs').optional(), + }), + ) + .describe('Session state and tracking data'), + If = Oi.partial() + .extend({ + consent: Ce.optional().describe('Initial consent state'), + user: Cn.optional().describe('Initial user data'), + globals: ne.optional().describe('Initial global properties'), + sources: d.unknown().optional().describe('Source configurations'), + destinations: d + .unknown() + .optional() + .describe('Destination configurations'), + custom: ne + .optional() + .describe('Initial custom implementation-specific properties'), + }) + .describe('Collector initialization configuration with initial state'), + zf = d + .object({ + mapping: ji.optional().describe('Source-level mapping configuration'), + }) + .describe('Push context with optional source mapping'), + jf = d + .record(d.string(), d.unknown()) + .describe('Map of source IDs to source instances'), + Of = d + .record(d.string(), d.unknown()) + .describe('Map of destination IDs to destination instances'), + Uf = d + .object({ + push: d.unknown().describe('Push function for processing events'), + command: d.unknown().describe('Command function for walker commands'), + allowed: d.boolean().describe('Whether event processing is allowed'), + config: Oi.describe('Current collector configuration'), + consent: Ce.describe('Current consent state'), + count: d.number().describe('Event count (increments with each event)'), + custom: ne.describe('Custom implementation-specific properties'), + sources: jf.describe('Registered source instances'), + destinations: Of.describe('Registered destination instances'), + globals: ne.describe('Current global properties'), + group: d.string().describe('Event grouping identifier'), + hooks: d.unknown().describe('Lifecycle hook functions'), + on: d.unknown().describe('Event lifecycle configuration'), + queue: d.array(xe).describe('Queued events awaiting processing'), + round: d + .number() + .describe('Collector run count (increments with each run)'), + session: d.union([Cc]).describe('Current session state'), + timing: d.number().describe('Event processing timing information'), + user: Cn.describe('Current user data'), + version: d.string().describe('Walker implementation version'), + }) + .describe('Collector instance with state and methods'), + uS = Z(Sf), + cS = Z(Oi), + lS = Z(Cc), + dS = Z(If), + mS = Z(zf), + pS = Z(Uf), + fS = {}; + ut(fS, { + BaseEnvSchema: () => Ui, + ConfigSchema: () => Pi, + InitSchema: () => Nf, + InitSourceSchema: () => Rc, + InitSourcesSchema: () => Df, + InstanceSchema: () => Pf, + PartialConfigSchema: () => Lc, + baseEnvJsonSchema: () => vS, + configJsonSchema: () => gS, + initSourceJsonSchema: () => yS, + initSourcesJsonSchema: () => $S, + instanceJsonSchema: () => bS, + partialConfigJsonSchema: () => hS, + }); + var Ui = d + .object({ + push: d.unknown().describe('Collector push function'), + command: d.unknown().describe('Collector command function'), + sources: d + .unknown() + .optional() + .describe('Map of registered source instances'), + elb: d + .unknown() + .describe('Public API function (alias for collector.push)'), + }) + .catchall(d.unknown()) + .describe( + 'Base environment for dependency injection - platform-specific sources extend this', + ), + Pi = ji + .extend({ + settings: d + .any() + .describe('Implementation-specific configuration') + .optional(), + env: Ui.optional().describe( + 'Environment dependencies (platform-specific)', + ), + id: Tn.describe( + 'Source identifier (defaults to source key)', + ).optional(), + onError: ct.optional(), + disabled: d.boolean().describe('Set to true to disable').optional(), + primary: d + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .describe('Source configuration with mapping and environment'), + Lc = Pi.partial().describe( + 'Partial source configuration with all fields optional', + ), + Pf = d + .object({ + type: d + .string() + .describe('Source type identifier (e.g., "browser", "dataLayer")'), + config: Pi.describe('Current source configuration'), + push: d + .any() + .describe( + 'Push function - THE HANDLER (flexible signature for platform compatibility)', + ), + destroy: d + .any() + .optional() + .describe('Cleanup function called when source is removed'), + on: d + .unknown() + .optional() + .describe('Lifecycle hook function for event types'), + }) + .describe('Source instance with push handler and lifecycle methods'), + Nf = d + .any() + .describe( + 'Source initialization function: (config, env) => Instance | Promise', + ), + Rc = d + .object({ + code: Nf.describe('Source initialization function'), + config: Lc.optional().describe('Partial configuration overrides'), + env: Ui.partial().optional().describe('Partial environment overrides'), + primary: d + .boolean() + .optional() + .describe('Mark as primary source (only one can be primary)'), + }) + .describe('Source initialization configuration'), + Df = d + .record(d.string(), Rc) + .describe('Map of source IDs to initialization configurations'), + vS = Z(Ui), + gS = Z(Pi), + hS = Z(Lc), + bS = Z(Pf), + yS = Z(Rc), + $S = Z(Df), + _S = {}; + ut(_S, { + ConfigSchema: () => Jn, + DestinationReferenceSchema: () => Fc, + PrimitiveSchema: () => Zf, + SetupSchema: () => Ni, + SourceReferenceSchema: () => Jc, + configJsonSchema: () => zS, + destinationReferenceJsonSchema: () => OS, + parseConfig: () => wS, + parseSetup: () => kS, + safeParseConfig: () => SS, + safeParseSetup: () => xS, + setupJsonSchema: () => IS, + sourceReferenceJsonSchema: () => jS, + }); + var Zf = d + .union([d.string(), d.number(), d.boolean()]) + .describe('Primitive value: string, number, or boolean'), + Jc = d + .object({ + package: d + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")', + ), + config: d + .unknown() + .optional() + .describe('Source-specific configuration object'), + env: d + .unknown() + .optional() + .describe('Source environment configuration'), + primary: d + .boolean() + .optional() + .describe( + 'Mark as primary source (provides main elb). Only one source should be primary.', + ), + }) + .describe('Source package reference with configuration'), + Fc = d + .object({ + package: d + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")', + ), + config: d + .unknown() + .optional() + .describe('Destination-specific configuration object'), + env: d + .unknown() + .optional() + .describe('Destination environment configuration'), + }) + .describe('Destination package reference with configuration'), + Jn = d + .object({ + platform: d + .enum(['web', 'server'], { + error: 'Platform must be "web" or "server"', + }) + .describe( + 'Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection', + ), + sources: d + .record(d.string(), Jc) + .optional() + .describe( + 'Source configurations (data capture) keyed by unique identifier', + ), + destinations: d + .record(d.string(), Fc) + .optional() + .describe( + 'Destination configurations (data output) keyed by unique identifier', + ), + collector: d + .unknown() + .optional() + .describe( + 'Collector configuration for event processing (uses Collector.InitConfig)', + ), + env: d + .record(d.string(), d.string()) + .optional() + .describe( + 'Environment-specific variables (override root-level variables)', + ), + }) + .passthrough() + .describe('Single environment configuration for one deployment target'), + Ni = d + .object({ + version: d + .literal(1, { error: 'Only version 1 is currently supported' }) + .describe( + 'Configuration schema version (currently only 1 is supported)', + ), + $schema: d + .string() + .url('Schema URL must be a valid URL') + .optional() + .describe( + 'JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")', + ), + variables: d + .record(d.string(), Zf) + .optional() + .describe( + 'Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)', + ), + definitions: d + .record(d.string(), d.unknown()) + .optional() + .describe( + 'Reusable configuration definitions (reference with JSON Schema $ref syntax)', + ), + environments: d + .record(d.string(), Jn) + .refine((e) => Object.keys(e).length > 0, { + message: 'At least one environment is required', + }) + .describe( + 'Named environment configurations (e.g., web_prod, server_stage)', + ), + }) + .describe( + 'Complete multi-environment walkerOS configuration (walkeros.config.json)', + ); + function kS(e) { + return Ni.parse(e); + } + function xS(e) { + return Ni.safeParse(e); + } + function wS(e) { + return Jn.parse(e); + } + function SS(e) { + return Jn.safeParse(e); + } + var IS = d.toJSONSchema(Ni, { target: 'draft-7' }), + zS = Z(Jn), + jS = Z(Jc), + OS = Z(Fc); + var US = { merge: !0, shallow: !0, extend: !0 }; + function Y(e, t = {}, i = {}) { + i = { ...US, ...i }; + let n = Object.entries(t).reduce((r, [o, s]) => { + let u = e[o]; + return ( + i.merge && Array.isArray(u) && Array.isArray(s) + ? (r[o] = s.reduce((a, c) => (a.includes(c) ? a : [...a, c]), [...u])) + : (i.extend || o in e) && (r[o] = s), + r + ); + }, {}); + return i.shallow ? { ...e, ...n } : (Object.assign(e, n), e); + } + function Ae(e) { + return Array.isArray(e); + } + function PS(e) { + return typeof e == 'boolean'; + } + function Pe(e) { + return e !== void 0; + } + function Ef(e) { + return typeof e == 'function'; + } + function NS(e) { + return typeof e == 'number' && !Number.isNaN(e); + } + function re(e) { + return ( + typeof e == 'object' && + e !== null && + !Ae(e) && + Object.prototype.toString.call(e) === '[object Object]' + ); + } + function Di(e) { + return typeof e == 'string'; + } + function An(e, t = new WeakMap()) { + if (typeof e != 'object' || e === null) return e; + if (t.has(e)) return t.get(e); + let i = Object.prototype.toString.call(e); + if (i === '[object Object]') { + let n = {}; + t.set(e, n); + for (let r in e) + Object.prototype.hasOwnProperty.call(e, r) && (n[r] = An(e[r], t)); + return n; + } + if (i === '[object Array]') { + let n = []; + return ( + t.set(e, n), + e.forEach((r) => { + n.push(An(r, t)); + }), + n + ); + } + if (i === '[object Date]') return new Date(e.getTime()); + if (i === '[object RegExp]') { + let n = e; + return new RegExp(n.source, n.flags); + } + return e; + } + function Tf(e, t = '', i) { + let n = t.split('.'), + r = e; + for (let o = 0; o < n.length; o++) { + let s = n[o]; + if (s === '*' && Ae(r)) { + let u = n.slice(o + 1).join('.'), + a = []; + for (let c of r) { + let m = Tf(c, u, i); + a.push(m); + } + return a; + } + if (((r = r instanceof Object ? r[s] : void 0), !r)) break; + } + return Pe(r) ? r : i; + } + function cf(e, t, i) { + if (!re(e)) return e; + let n = An(e), + r = t.split('.'), + o = n; + for (let s = 0; s < r.length; s++) { + let u = r[s]; + s === r.length - 1 + ? (o[u] = i) + : ((u in o && typeof o[u] == 'object' && o[u] !== null) || (o[u] = {}), + (o = o[u])); + } + return n; + } + function Fn(e, t = {}, i = {}) { + let n = { ...t, ...i }, + r = {}, + o = e === void 0; + return ( + Object.keys(n).forEach((s) => { + n[s] && ((r[s] = !0), e && e[s] && (o = !0)); + }), + !!o && r + ); + } + function Zi(e = 6) { + let t = ''; + for (let i = 36; t.length < e; ) t += ((Math.random() * i) | 0).toString(i); + return t; + } + function Af(e, t = 1e3, i = !1) { + let n, + r = null, + o = !1; + return (...s) => + new Promise((u) => { + let a = i && !o; + (r && clearTimeout(r), + (r = setTimeout(() => { + ((r = null), (i && !o) || ((n = e(...s)), u(n))); + }, t)), + a && ((o = !0), (n = e(...s)), u(n))); + }); + } + function Uc(e) { + return ( + PS(e) || + Di(e) || + NS(e) || + !Pe(e) || + (Ae(e) && e.every(Uc)) || + (re(e) && Object.values(e).every(Uc)) + ); + } + function lf(e) { + return Uc(e) ? e : void 0; + } + function Ft(e, t, i) { + return function (...n) { + try { + return e(...n); + } catch (r) { + return t ? t(r) : void 0; + } finally { + i?.(); + } + }; + } + function me(e, t, i) { + return async function (...n) { + try { + return await e(...n); + } catch (r) { + return t ? await t(r) : void 0; + } finally { + await i?.(); + } + }; + } + async function DS(e, t) { + let [i, n] = (e.name || '').split(' '); + if (!t || !i || !n) return {}; + let r, + o = '', + s = i, + u = n, + a = (m) => { + if (m) + return (m = Ae(m) ? m : [m]).find( + (p) => !p.condition || p.condition(e), + ); + }; + t[s] || (s = '*'); + let c = t[s]; + return ( + c && (c[u] || (u = '*'), (r = a(c[u]))), + r || ((s = '*'), (u = '*'), (r = a(t[s]?.[u]))), + r && (o = `${s} ${u}`), + { eventMapping: r, mappingKey: o } + ); + } + async function st(e, t = {}, i = {}) { + if (!Pe(e)) return; + let n = (re(e) && e.consent) || i.consent || i.collector?.consent, + r = Ae(t) ? t : [t]; + for (let o of r) { + let s = await me(Cf)(e, o, { ...i, consent: n }); + if (Pe(s)) return s; + } + } + async function Cf(e, t, i = {}) { + let { collector: n, consent: r } = i; + return (Ae(t) ? t : [t]).reduce( + async (o, s) => { + let u = await o; + if (u) return u; + let a = Di(s) ? { key: s } : s; + if (!Object.keys(a).length) return; + let { + condition: c, + consent: m, + fn: p, + key: f, + loop: v, + map: b, + set: $, + validate: g, + value: k, + } = a; + if (c && !(await me(c)(e, s, n))) return; + if (m && !Fn(m, r)) return k; + let x = Pe(k) ? k : e; + if ((p && (x = await me(p)(e, s, i)), f && (x = Tf(e, f, k)), v)) { + let [S, P] = v, + J = S === 'this' ? [e] : await st(e, S, i); + Ae(J) && + (x = (await Promise.all(J.map((H) => st(H, P, i)))).filter(Pe)); + } else + b + ? (x = await Object.entries(b).reduce(async (S, [P, J]) => { + let H = await S, + ee = await st(e, J, i); + return (Pe(ee) && (H[P] = ee), H); + }, Promise.resolve({}))) + : $ && (x = await Promise.all($.map((S) => Cf(e, S, i)))); + g && !(await me(g)(x)) && (x = void 0); + let w = lf(x); + return Pe(w) ? w : lf(k); + }, + Promise.resolve(void 0), + ); + } + async function Ei(e, t, i) { + t.policy && + (await Promise.all( + Object.entries(t.policy).map(async ([s, u]) => { + let a = await st(e, u, { collector: i }); + e = cf(e, s, a); + }), + )); + let { eventMapping: n, mappingKey: r } = await DS(e, t.mapping); + n?.policy && + (await Promise.all( + Object.entries(n.policy).map(async ([s, u]) => { + let a = await st(e, u, { collector: i }); + e = cf(e, s, a); + }), + )); + let o = t.data && (await st(e, t.data, { collector: i })); + if (n) { + if (n.ignore) + return { event: e, data: o, mapping: n, mappingKey: r, ignore: !0 }; + if ((n.name && (e.name = n.name), n.data)) { + let s = n.data && (await st(e, n.data, { collector: i })); + o = re(o) && re(s) ? Y(o, s) : s; + } + } + return { event: e, data: o, mapping: n, mappingKey: r, ignore: !1 }; + } + function Lf(e, t = !1) { + t && console.dir(e, { depth: 4 }); + } + function qe(e, t, i) { + return function (...n) { + let r, + o = 'post' + t, + s = i['pre' + t], + u = i[o]; + return ( + (r = s ? s({ fn: e }, ...n) : e(...n)), + u && (r = u({ fn: e, result: r }, ...n)), + r + ); + }; + } + var ZS = Object.defineProperty, + ES = { + Action: 'action', + Actions: 'actions', + Config: 'config', + Consent: 'consent', + Context: 'context', + Custom: 'custom', + Destination: 'destination', + Elb: 'elb', + Globals: 'globals', + Hook: 'hook', + Init: 'init', + Link: 'link', + On: 'on', + Prefix: 'data-elb', + Ready: 'ready', + Run: 'run', + Session: 'session', + User: 'user', + Walker: 'walker', + }, + Q = { + Commands: ES, + Utils: { + Storage: { Cookie: 'cookie', Local: 'local', Session: 'session' }, + }, + }, + TS = {}; + ((e, t) => { + for (var i in t) ZS(e, i, { get: t[i], enumerable: !0 }); + })(TS, { schemas: () => AS, settingsSchema: () => Rf }); + var Rf = { + type: 'object', + properties: { + run: { + type: 'boolean', + description: + 'Automatically start the collector pipeline on initialization', + }, + sources: { + type: 'object', + description: + 'Configurations for sources providing events to the collector', + }, + destinations: { + type: 'object', + description: + 'Configurations for destinations receiving processed events', + }, + consent: { + type: 'object', + description: 'Initial consent state to control routing of events', + }, + verbose: { + type: 'boolean', + description: 'Enable verbose logging for debugging', + }, + onError: { + type: 'string', + description: + 'Error handler triggered when the collector encounters failures', + }, + onLog: { + type: 'string', + description: 'Custom log handler for collector messages', + }, + }, + }, + AS = { settings: Rf }; + async function CS(e, t, i) { + let { code: n, config: r = {}, env: o = {} } = t, + s = i || r || { init: !1 }, + u = { ...n, config: s, env: Vn(n.env, o) }, + a = u.config.id; + if (!a) + do a = Zi(4); + while (e.destinations[a]); + return ( + (e.destinations[a] = u), + u.config.queue !== !1 && (u.queue = [...e.queue]), + Ti(e, void 0, { [a]: u }) + ); + } + async function Ti(e, t, i) { + let { allowed: n, consent: r, globals: o, user: s } = e; + if (!n) return lt({ ok: !1 }); + (t && e.queue.push(t), i || (i = e.destinations)); + let u = await Promise.all( + Object.entries(i || {}).map(async ([p, f]) => { + let v = (f.queue || []).map((k) => ({ ...k, consent: r })); + if (((f.queue = []), t)) { + let k = An(t); + v.push(k); + } + if (!v.length) return { id: p, destination: f, skipped: !0 }; + let b = [], + $ = v.filter((k) => { + let x = Fn(f.config.consent, r, k.consent); + return !x || ((k.consent = x), b.push(k), !1); + }); + if ((f.queue.concat($), !b.length)) + return { id: p, destination: f, queue: v }; + if (!(await me(LS)(e, f))) return { id: p, destination: f, queue: v }; + let g = !1; + return ( + f.dlq || (f.dlq = []), + await Promise.all( + b.map( + async (k) => ( + (k.globals = Y(o, k.globals)), + (k.user = Y(s, k.user)), + await me( + RS, + (x) => ( + e.config.onError && e.config.onError(x, e), + (g = !0), + f.dlq.push([k, x]), + !1 + ), + )(e, f, k), + k + ), + ), + ), + { id: p, destination: f, error: g } + ); + }), + ), + a = [], + c = [], + m = []; + for (let p of u) { + if (p.skipped) continue; + let f = p.destination, + v = { id: p.id, destination: f }; + p.error + ? m.push(v) + : p.queue && p.queue.length + ? ((f.queue = (f.queue || []).concat(p.queue)), c.push(v)) + : a.push(v); + } + return lt({ ok: !m.length, event: t, successful: a, queued: c, failed: m }); + } + async function LS(e, t) { + if (t.init && !t.config.init) { + let i = { collector: e, config: t.config, env: Vn(t.env, t.config.env) }, + n = await qe(t.init, 'DestinationInit', e.hooks)(i); + if (n === !1) return n; + t.config = { ...(n || t.config), init: !0 }; + } + return !0; + } + async function RS(e, t, i) { + let { config: n } = t, + r = await Ei(i, n, e); + if (r.ignore) return !1; + let o = { + collector: e, + config: n, + data: r.data, + mapping: r.mapping, + env: Vn(t.env, n.env), + }, + s = r.mapping; + if (s?.batch && t.pushBatch) { + let u = s.batched || { key: r.mappingKey || '', events: [], data: [] }; + (u.events.push(r.event), + Pe(r.data) && u.data.push(r.data), + (s.batchFn = + s.batchFn || + Af((a, c) => { + let m = { + collector: c, + config: n, + data: r.data, + mapping: s, + env: Vn(a.env, n.env), + }; + (qe(a.pushBatch, 'DestinationPushBatch', c.hooks)(u, m), + (u.events = []), + (u.data = [])); + }, s.batch)), + (s.batched = u), + s.batchFn?.(t, e)); + } else await qe(t.push, 'DestinationPush', e.hooks)(r.event, o); + return !0; + } + function lt(e) { + return Y( + { ok: !e?.failed?.length, successful: [], queued: [], failed: [] }, + e, + ); + } + async function JS(e, t = {}) { + let i = {}; + for (let [n, r] of Object.entries(t)) { + let { code: o, config: s = {}, env: u = {} } = r, + a = { ...o.config, ...s }, + c = Vn(o.env, u); + i[n] = { ...o, config: a, env: c }; + } + return i; + } + function Vn(e, t) { + return e || t ? (t ? (e && re(e) && re(t) ? { ...e, ...t } : t) : e) : {}; + } + function FS(e, t, i) { + let n = e.on, + r = n[t] || [], + o = Ae(i) ? i : [i]; + (o.forEach((s) => { + r.push(s); + }), + (n[t] = r), + Mn(e, t, o)); + } + function Mn(e, t, i, n) { + let r, + o = i || []; + switch ((i || (o = e.on[t] || []), t)) { + case Q.Commands.Consent: + r = n || e.consent; + break; + case Q.Commands.Session: + r = e.session; + break; + case Q.Commands.Ready: + case Q.Commands.Run: + default: + r = void 0; + } + if ( + (Object.values(e.sources).forEach((s) => { + s.on && Ft(s.on)(t, r); + }), + Object.values(e.destinations).forEach((s) => { + if (s.on) { + let u = s.on; + Ft(u)(t, r); + } + }), + o.length) + ) + switch (t) { + case Q.Commands.Consent: + (function (s, u, a) { + let c = a || s.consent; + u.forEach((m) => { + Object.keys(c) + .filter((p) => p in m) + .forEach((p) => { + Ft(m[p])(s, c); + }); + }); + })(e, o, n); + break; + case Q.Commands.Ready: + case Q.Commands.Run: + (function (s, u) { + s.allowed && + u.forEach((a) => { + Ft(a)(s); + }); + })(e, o); + break; + case Q.Commands.Session: + (function (s, u) { + s.session && + u.forEach((a) => { + Ft(a)(s, s.session); + }); + })(e, o); + } + } + async function VS(e, t) { + let { consent: i } = e, + n = !1, + r = {}; + return ( + Object.entries(t).forEach(([o, s]) => { + let u = !!s; + ((r[o] = u), (n = n || u)); + }), + (e.consent = Y(i, r)), + Mn(e, 'consent', void 0, r), + n ? Ti(e) : lt({ ok: !0 }) + ); + } + async function MS(e, t, i, n) { + let r; + switch (t) { + case Q.Commands.Config: + re(i) && Y(e.config, i, { shallow: !1 }); + break; + case Q.Commands.Consent: + re(i) && (r = await VS(e, i)); + break; + case Q.Commands.Custom: + re(i) && (e.custom = Y(e.custom, i)); + break; + case Q.Commands.Destination: + re(i) && Ef(i.push) && (r = await CS(e, { code: i }, n)); + break; + case Q.Commands.Globals: + re(i) && (e.globals = Y(e.globals, i)); + break; + case Q.Commands.On: + Di(i) && FS(e, i, n); + break; + case Q.Commands.Ready: + Mn(e, 'ready'); + break; + case Q.Commands.Run: + r = await BS(e, i); + break; + case Q.Commands.Session: + Mn(e, 'session'); + break; + case Q.Commands.User: + re(i) && Y(e.user, i, { shallow: !1 }); + } + return r || { ok: !0, successful: [], queued: [], failed: [] }; + } + function WS(e, t) { + if (!t.name) throw new Error('Event name is required'); + let [i, n] = t.name.split(' '); + if (!i || !n) throw new Error('Event name is invalid'); + ++e.count; + let { + timestamp: r = Date.now(), + group: o = e.group, + count: s = e.count, + } = t, + { + name: u = `${i} ${n}`, + data: a = {}, + context: c = {}, + globals: m = e.globals, + custom: p = {}, + user: f = e.user, + nested: v = [], + consent: b = e.consent, + id: $ = `${r}-${o}-${s}`, + trigger: g = '', + entity: k = i, + action: x = n, + timing: w = 0, + version: S = { source: e.version, tagging: e.config.tagging || 0 }, + source: P = { type: 'collector', id: '', previous_id: '' }, + } = t; + return { + name: u, + data: a, + context: c, + globals: m, + custom: p, + user: f, + nested: v, + consent: b, + id: $, + trigger: g, + entity: k, + action: x, + timestamp: r, + timing: w, + group: o, + count: s, + version: S, + source: P, + }; + } + async function BS(e, t) { + ((e.allowed = !0), + (e.count = 0), + (e.group = Zi()), + (e.timing = Date.now()), + t && + (t.consent && (e.consent = Y(e.consent, t.consent)), + t.user && (e.user = Y(e.user, t.user)), + t.globals && (e.globals = Y(e.config.globalsStatic || {}, t.globals)), + t.custom && (e.custom = Y(e.custom, t.custom))), + Object.values(e.destinations).forEach((n) => { + n.queue = []; + }), + (e.queue = []), + e.round++); + let i = await Ti(e); + return (Mn(e, 'run'), i); + } + function GS(e, t) { + return qe( + async (i, n = {}) => + await me( + async () => { + let r = i; + if (n.mapping) { + let u = await Ei(r, n.mapping, e); + if (u.ignore) return lt({ ok: !0 }); + if ( + n.mapping.consent && + !Fn(n.mapping.consent, e.consent, u.event.consent) + ) + return lt({ ok: !0 }); + r = u.event; + } + let o = t(r), + s = WS(e, o); + return await Ti(e, s); + }, + () => lt({ ok: !1 }), + )(), + 'Push', + e.hooks, + ); + } + async function KS(e) { + let t = Y( + { + globalsStatic: {}, + sessionStatic: {}, + tagging: 0, + verbose: !1, + onLog: i, + run: !0, + }, + e, + { merge: !1, extend: !1 }, + ); + function i(o, s) { + Lf({ message: o }, s || t.verbose); + } + t.onLog = i; + let n = { ...t.globalsStatic, ...e.globals }, + r = { + allowed: !1, + config: t, + consent: e.consent || {}, + count: 0, + custom: e.custom || {}, + destinations: {}, + globals: n, + group: '', + hooks: {}, + on: {}, + queue: [], + round: 0, + session: void 0, + timing: Date.now(), + user: e.user || {}, + version: '0.3.1', + sources: {}, + push: void 0, + command: void 0, + }; + return ( + (r.push = GS(r, (o) => ({ + timing: Math.round((Date.now() - r.timing) / 10) / 100, + source: { type: 'collector', id: '', previous_id: '' }, + ...o, + }))), + (r.command = (function (o, s) { + return qe( + async (u, a, c) => + await me( + async () => await s(o, u, a, c), + () => lt({ ok: !1 }), + )(), + 'Command', + o.hooks, + ); + })(r, MS)), + (r.destinations = await JS(0, e.destinations || {})), + r + ); + } + async function qS(e, t = {}) { + let i = {}; + for (let [n, r] of Object.entries(t)) { + let { code: o, config: s = {}, env: u = {}, primary: a } = r, + c = { + push: (p, f = {}) => e.push(p, { ...f, mapping: s }), + command: e.command, + sources: e.sources, + elb: e.sources.elb.push, + ...u, + }, + m = await me(o)(s, c); + m && (a && (m.config = { ...m.config, primary: a }), (i[n] = m)); + } + return i; + } + async function Jf(e) { + e = e || {}; + let t = await KS(e), + i = + ((n = t), + { + type: 'elb', + config: {}, + push: async (f, v, b, $, g, k) => { + if (typeof f == 'string' && f.startsWith('walker ')) { + let w = f.replace('walker ', ''); + return n.command(w, v, b); + } + let x; + if (typeof f == 'string') + ((x = { name: f }), + v && typeof v == 'object' && !Array.isArray(v) && (x.data = v)); + else { + if (!f || typeof f != 'object') + return { ok: !1, successful: [], queued: [], failed: [] }; + ((x = f), + v && + typeof v == 'object' && + !Array.isArray(v) && + (x.data = { ...(x.data || {}), ...v })); + } + return ( + $ && typeof $ == 'object' && (x.context = $), + g && Array.isArray(g) && (x.nested = g), + k && typeof k == 'object' && (x.custom = k), + n.push(x) + ); + }, + }); + var n; + t.sources.elb = i; + let r = await qS(t, e.sources || {}); + Object.assign(t.sources, r); + let { consent: o, user: s, globals: u, custom: a } = e; + (o && (await t.command('consent', o)), + s && (await t.command('user', s)), + u && Object.assign(t.globals, u), + a && Object.assign(t.custom, a), + t.config.run && (await t.command('run'))); + let c = i.push, + m = Object.values(t.sources).filter((f) => f.type !== 'elb'), + p = m.find((f) => f.config.primary); + return ( + p ? (c = p.push) : m.length > 0 && (c = m[0].push), + { collector: t, elb: c } + ); + } + var XS = Object.defineProperty, + Ff = (e, t) => { + for (var i in t) XS(e, i, { get: t[i], enumerable: !0 }); + }; + var HS = {}; + Ff(HS, { env: () => Vf }); + var Vf = {}; + Ff(Vf, { init: () => YS, push: () => QS, simulation: () => eI }); + var Vc = async () => ({ ok: !0, successful: [], queued: [], failed: [] }), + YS = void 0, + QS = { push: Vc, command: Vc, elb: Vc }, + eI = ['call:elb'], + Mf = async (e, t) => { + let { elb: i } = t, + n = { ...e, settings: e?.settings || { events: [] } }; + return ( + (n.settings?.events || []).forEach((r) => { + let { delay: o, ...s } = r; + setTimeout(() => i(s), o || 0); + }), + { type: 'demo', config: n, push: i } + ); + }; + var tI = Object.defineProperty, + Wf = (e, t) => { + for (var i in t) tI(e, i, { get: t[i], enumerable: !0 }); + }; + var Bf = {}; + Wf(Bf, { env: () => Gf }); + var Gf = {}; + Wf(Gf, { init: () => nI, push: () => rI, simulation: () => iI }); + var nI = { log: void 0 }, + rI = { log: Object.assign(() => {}, {}) }, + iI = ['call:log'], + Kf = { + type: 'demo', + config: { settings: { name: 'demo' } }, + init({ config: e, env: t }) { + (t?.log || console.log)( + `[${{ name: 'demo', ...e?.settings }.name}] initialized`, + ); + }, + push(e, { config: t, env: i }) { + let n = i?.log || console.log, + r = { name: 'demo', ...t?.settings }, + o = r.values + ? (function (s, u) { + let a = {}; + for (let c of u) { + let m = c.split('.').reduce((p, f) => p?.[f], s); + m !== void 0 && (a[c] = m); + } + return a; + })(e, r.values) + : e; + n(`[${r.name}] ${JSON.stringify(o, null, 2)}`); + }, + }; + var oI = Object.defineProperty, + $e = (e, t) => { + for (var i in t) oI(e, i, { get: t[i], enumerable: !0 }); + }, + l = {}; + $e(l, { + $brand: () => vv, + $input: () => Wh, + $output: () => Mh, + NEVER: () => fv, + TimePrecision: () => Kh, + ZodAny: () => oy, + ZodArray: () => cy, + ZodBase64: () => xd, + ZodBase64URL: () => wd, + ZodBigInt: () => lo, + ZodBigIntFormat: () => zd, + ZodBoolean: () => co, + ZodCIDRv4: () => _d, + ZodCIDRv6: () => kd, + ZodCUID: () => fd, + ZodCUID2: () => vd, + ZodCatch: () => jy, + ZodCodec: () => Cd, + ZodCustom: () => fo, + ZodCustomStringFormat: () => ur, + ZodDate: () => Od, + ZodDefault: () => ky, + ZodDiscriminatedUnion: () => ly, + ZodE164: () => Sd, + ZodEmail: () => dd, + ZodEmoji: () => md, + ZodEnum: () => Xn, + ZodError: () => g4, + ZodFile: () => yy, + ZodFirstPartyTypeKind: () => Yc, + ZodFunction: () => Ay, + ZodGUID: () => Ki, + ZodIPv4: () => yd, + ZodIPv6: () => $d, + ZodISODate: () => sd, + ZodISODateTime: () => ad, + ZodISODuration: () => cd, + ZodISOTime: () => ud, + ZodIntersection: () => dy, + ZodIssueCode: () => S6, + ZodJWT: () => Id, + ZodKSUID: () => bd, + ZodLazy: () => Zy, + ZodLiteral: () => by, + ZodMap: () => gy, + ZodNaN: () => Uy, + ZodNanoID: () => pd, + ZodNever: () => sy, + ZodNonOptional: () => Td, + ZodNull: () => ry, + ZodNullable: () => _y, + ZodNumber: () => uo, + ZodNumberFormat: () => Gt, + ZodObject: () => po, + ZodOptional: () => Ed, + ZodPipe: () => Ad, + ZodPrefault: () => wy, + ZodPromise: () => Ty, + ZodReadonly: () => Py, + ZodRealError: () => ve, + ZodRecord: () => Nd, + ZodSet: () => hy, + ZodString: () => ao, + ZodStringFormat: () => G, + ZodSuccess: () => zy, + ZodSymbol: () => ty, + ZodTemplateLiteral: () => Dy, + ZodTransform: () => $y, + ZodTuple: () => py, + ZodType: () => C, + ZodULID: () => gd, + ZodURL: () => so, + ZodUUID: () => Le, + ZodUndefined: () => ny, + ZodUnion: () => Ud, + ZodUnknown: () => ay, + ZodVoid: () => uy, + ZodXID: () => hd, + _ZodString: () => ld, + _default: () => xy, + _function: () => lv, + any: () => Q4, + array: () => mo, + base64: () => T4, + base64url: () => A4, + bigint: () => K4, + boolean: () => ey, + catch: () => Oy, + check: () => y6, + cidrv4: () => Z4, + cidrv6: () => E4, + clone: () => _e, + codec: () => g6, + coerce: () => Ry, + config: () => ae, + core: () => pv, + cuid: () => z4, + cuid2: () => j4, + custom: () => $6, + date: () => t6, + decode: () => Bb, + decodeAsync: () => Kb, + discriminatedUnion: () => a6, + e164: () => C4, + email: () => h4, + emoji: () => S4, + encode: () => Wb, + encodeAsync: () => Gb, + endsWith: () => ed, + enum: () => Dd, + file: () => m6, + flattenError: () => ol, + float32: () => M4, + float64: () => W4, + formatError: () => al, + function: () => lv, + getErrorMap: () => z6, + globalRegistry: () => mt, + gt: () => ht, + gte: () => pe, + guid: () => b4, + hash: () => V4, + hex: () => F4, + hostname: () => J4, + httpUrl: () => w4, + includes: () => Yl, + instanceof: () => _6, + int: () => Hc, + int32: () => B4, + int64: () => q4, + intersection: () => my, + ipv4: () => N4, + ipv6: () => D4, + iso: () => Eb, + json: () => x6, + jwt: () => L4, + keyof: () => n6, + ksuid: () => P4, + lazy: () => Ey, + length: () => oo, + literal: () => d6, + locales: () => Sl, + looseObject: () => o6, + lowercase: () => Xl, + lt: () => gt, + lte: () => Se, + map: () => u6, + maxLength: () => io, + maxSize: () => ro, + mime: () => td, + minLength: () => Wt, + minSize: () => qn, + multipleOf: () => Kn, + nan: () => v6, + nanoid: () => I4, + nativeEnum: () => l6, + negative: () => xb, + never: () => jd, + nonnegative: () => Sb, + nonoptional: () => Iy, + nonpositive: () => wb, + normalize: () => nd, + null: () => iy, + nullable: () => Xi, + nullish: () => p6, + number: () => Qb, + object: () => r6, + optional: () => qi, + overwrite: () => $t, + parse: () => Jb, + parseAsync: () => Fb, + partialRecord: () => s6, + pipe: () => Hi, + positive: () => kb, + prefault: () => Sy, + preprocess: () => w6, + prettifyError: () => jv, + promise: () => b6, + property: () => Ib, + readonly: () => Ny, + record: () => vy, + refine: () => Cy, + regex: () => ql, + regexes: () => yt, + registry: () => zl, + safeDecode: () => Xb, + safeDecodeAsync: () => Yb, + safeEncode: () => qb, + safeEncodeAsync: () => Hb, + safeParse: () => Vb, + safeParseAsync: () => Mb, + set: () => c6, + setErrorMap: () => I6, + size: () => Kl, + startsWith: () => Ql, + strictObject: () => i6, + string: () => Xc, + stringFormat: () => R4, + stringbool: () => k6, + success: () => f6, + superRefine: () => Ly, + symbol: () => H4, + templateLiteral: () => h6, + toJSONSchema: () => Zb, + toLowerCase: () => id, + toUpperCase: () => od, + transform: () => Zd, + treeifyError: () => Iv, + trim: () => rd, + tuple: () => fy, + uint32: () => G4, + uint64: () => X4, + ulid: () => O4, + undefined: () => Y4, + union: () => Pd, + unknown: () => Bt, + uppercase: () => Hl, + url: () => x4, + util: () => F, + uuid: () => y4, + uuidv4: () => $4, + uuidv6: () => _4, + uuidv7: () => k4, + void: () => e6, + xid: () => U4, + }); + var pv = {}; + $e(pv, { + $ZodAny: () => sh, + $ZodArray: () => mh, + $ZodAsyncError: () => ft, + $ZodBase64: () => qg, + $ZodBase64URL: () => Hg, + $ZodBigInt: () => _l, + $ZodBigIntFormat: () => rh, + $ZodBoolean: () => $l, + $ZodCIDRv4: () => Gg, + $ZodCIDRv6: () => Kg, + $ZodCUID: () => Tg, + $ZodCUID2: () => Ag, + $ZodCatch: () => Nh, + $ZodCheck: () => K, + $ZodCheckBigIntFormat: () => mg, + $ZodCheckEndsWith: () => wg, + $ZodCheckGreaterThan: () => hl, + $ZodCheckIncludes: () => kg, + $ZodCheckLengthEquals: () => bg, + $ZodCheckLessThan: () => gl, + $ZodCheckLowerCase: () => $g, + $ZodCheckMaxLength: () => gg, + $ZodCheckMaxSize: () => pg, + $ZodCheckMimeType: () => Ig, + $ZodCheckMinLength: () => hg, + $ZodCheckMinSize: () => fg, + $ZodCheckMultipleOf: () => lg, + $ZodCheckNumberFormat: () => dg, + $ZodCheckOverwrite: () => zg, + $ZodCheckProperty: () => Sg, + $ZodCheckRegex: () => yg, + $ZodCheckSizeEquals: () => vg, + $ZodCheckStartsWith: () => xg, + $ZodCheckStringFormat: () => or, + $ZodCheckUpperCase: () => _g, + $ZodCodec: () => wl, + $ZodCustom: () => Rh, + $ZodCustomStringFormat: () => th, + $ZodDate: () => dh, + $ZodDefault: () => jh, + $ZodDiscriminatedUnion: () => hh, + $ZodE164: () => Yg, + $ZodEmail: () => Ng, + $ZodEmoji: () => Zg, + $ZodEncodeError: () => Yi, + $ZodEnum: () => kh, + $ZodError: () => il, + $ZodFile: () => wh, + $ZodFunction: () => Ah, + $ZodGUID: () => Ug, + $ZodIPv4: () => Wg, + $ZodIPv6: () => Bg, + $ZodISODate: () => Fg, + $ZodISODateTime: () => Jg, + $ZodISODuration: () => Mg, + $ZodISOTime: () => Vg, + $ZodIntersection: () => bh, + $ZodJWT: () => eh, + $ZodKSUID: () => Rg, + $ZodLazy: () => Lh, + $ZodLiteral: () => xh, + $ZodMap: () => $h, + $ZodNaN: () => Dh, + $ZodNanoID: () => Eg, + $ZodNever: () => ch, + $ZodNonOptional: () => Uh, + $ZodNull: () => ah, + $ZodNullable: () => zh, + $ZodNumber: () => yl, + $ZodNumberFormat: () => nh, + $ZodObject: () => vh, + $ZodObjectJIT: () => gh, + $ZodOptional: () => Ih, + $ZodPipe: () => Zh, + $ZodPrefault: () => Oh, + $ZodPromise: () => Ch, + $ZodReadonly: () => Eh, + $ZodRealError: () => fe, + $ZodRecord: () => yh, + $ZodRegistry: () => Il, + $ZodSet: () => _h, + $ZodString: () => ar, + $ZodStringFormat: () => W, + $ZodSuccess: () => Ph, + $ZodSymbol: () => ih, + $ZodTemplateLiteral: () => Th, + $ZodTransform: () => Sh, + $ZodTuple: () => xl, + $ZodType: () => E, + $ZodULID: () => Cg, + $ZodURL: () => Dg, + $ZodUUID: () => Pg, + $ZodUndefined: () => oh, + $ZodUnion: () => kl, + $ZodUnknown: () => uh, + $ZodVoid: () => lh, + $ZodXID: () => Lg, + $brand: () => vv, + $constructor: () => y, + $input: () => Wh, + $output: () => Mh, + Doc: () => jg, + JSONSchema: () => v4, + JSONSchemaGenerator: () => qc, + NEVER: () => fv, + TimePrecision: () => Kh, + _any: () => vb, + _array: () => zb, + _base64: () => Ml, + _base64url: () => Wl, + _bigint: () => ub, + _boolean: () => ab, + _catch: () => c4, + _check: () => Nb, + _cidrv4: () => Fl, + _cidrv6: () => Vl, + _coercedBigint: () => cb, + _coercedBoolean: () => sb, + _coercedDate: () => $b, + _coercedNumber: () => eb, + _coercedString: () => Gh, + _cuid: () => El, + _cuid2: () => Tl, + _custom: () => Ob, + _date: () => yb, + _decode: () => ul, + _decodeAsync: () => ll, + _default: () => a4, + _discriminatedUnion: () => Kj, + _e164: () => Bl, + _email: () => jl, + _emoji: () => Dl, + _encode: () => sl, + _encodeAsync: () => cl, + _endsWith: () => ed, + _enum: () => e4, + _file: () => jb, + _float32: () => nb, + _float64: () => rb, + _gt: () => ht, + _gte: () => pe, + _guid: () => Gi, + _includes: () => Yl, + _int: () => tb, + _int32: () => ib, + _int64: () => lb, + _intersection: () => qj, + _ipv4: () => Rl, + _ipv6: () => Jl, + _isoDate: () => Xh, + _isoDateTime: () => qh, + _isoDuration: () => Yh, + _isoTime: () => Hh, + _jwt: () => Gl, + _ksuid: () => Ll, + _lazy: () => p4, + _length: () => oo, + _literal: () => n4, + _lowercase: () => Xl, + _lt: () => gt, + _lte: () => Se, + _map: () => Yj, + _max: () => Se, + _maxLength: () => io, + _maxSize: () => ro, + _mime: () => td, + _min: () => pe, + _minLength: () => Wt, + _minSize: () => qn, + _multipleOf: () => Kn, + _nan: () => _b, + _nanoid: () => Zl, + _nativeEnum: () => t4, + _negative: () => xb, + _never: () => hb, + _nonnegative: () => Sb, + _nonoptional: () => s4, + _nonpositive: () => wb, + _normalize: () => nd, + _null: () => fb, + _nullable: () => o4, + _number: () => Qh, + _optional: () => i4, + _overwrite: () => $t, + _parse: () => Qn, + _parseAsync: () => er, + _pipe: () => l4, + _positive: () => kb, + _promise: () => f4, + _property: () => Ib, + _readonly: () => d4, + _record: () => Hj, + _refine: () => Ub, + _regex: () => ql, + _safeDecode: () => ml, + _safeDecodeAsync: () => fl, + _safeEncode: () => dl, + _safeEncodeAsync: () => pl, + _safeParse: () => tr, + _safeParseAsync: () => nr, + _set: () => Qj, + _size: () => Kl, + _startsWith: () => Ql, + _string: () => Bh, + _stringFormat: () => sr, + _stringbool: () => Db, + _success: () => u4, + _superRefine: () => Pb, + _symbol: () => mb, + _templateLiteral: () => m4, + _toLowerCase: () => id, + _toUpperCase: () => od, + _transform: () => r4, + _trim: () => rd, + _tuple: () => Xj, + _uint32: () => ob, + _uint64: () => db, + _ulid: () => Al, + _undefined: () => pb, + _union: () => Gj, + _unknown: () => gb, + _uppercase: () => Hl, + _url: () => no, + _uuid: () => Ol, + _uuidv4: () => Ul, + _uuidv6: () => Pl, + _uuidv7: () => Nl, + _void: () => bb, + _xid: () => Cl, + clone: () => _e, + config: () => ae, + decode: () => DI, + decodeAsync: () => EI, + encode: () => NI, + encodeAsync: () => ZI, + flattenError: () => ol, + formatError: () => al, + globalConfig: () => Fi, + globalRegistry: () => mt, + isValidBase64: () => bl, + isValidBase64URL: () => Xg, + isValidJWT: () => Qg, + locales: () => Sl, + parse: () => Bc, + parseAsync: () => Gc, + prettifyError: () => jv, + regexes: () => yt, + registry: () => zl, + safeDecode: () => AI, + safeDecodeAsync: () => LI, + safeEncode: () => TI, + safeEncodeAsync: () => CI, + safeParse: () => Ov, + safeParseAsync: () => Uv, + toDotPath: () => zv, + toJSONSchema: () => Zb, + treeifyError: () => Iv, + util: () => F, + version: () => Og, + }); + var fv = Object.freeze({ status: 'aborted' }); + function y(e, t, i) { + var n; + function r(a, c) { + var m, p; + (Object.defineProperty(a, '_zod', { + value: (m = a._zod) != null ? m : {}, + enumerable: !1, + }), + (p = a._zod).traits != null || (p.traits = new Set()), + a._zod.traits.add(e), + t(a, c)); + for (let f in u.prototype) + f in a || + Object.defineProperty(a, f, { value: u.prototype[f].bind(a) }); + ((a._zod.constr = u), (a._zod.def = c)); + } + let o = (n = i?.Parent) != null ? n : Object; + class s extends o {} + function u(a) { + var c; + let m = i?.Parent ? new s() : this; + (r(m, a), (c = m._zod).deferred != null || (c.deferred = [])); + for (let p of m._zod.deferred) p(); + return m; + } + return ( + Object.defineProperty(s, 'name', { value: e }), + Object.defineProperty(u, 'init', { value: r }), + Object.defineProperty(u, Symbol.hasInstance, { + value: (a) => { + var c, m; + return ( + !!(i?.Parent && a instanceof i.Parent) || + ((m = (c = a?._zod) == null ? void 0 : c.traits) == null + ? void 0 + : m.has(e)) + ); + }, + }), + Object.defineProperty(u, 'name', { value: e }), + u + ); + } + var vv = Symbol('zod_brand'), + ft = class extends Error { + constructor() { + super( + 'Encountered Promise during synchronous parse. Use .parseAsync() instead.', + ); + } + }, + Yi = class extends Error { + constructor(e) { + (super(`Encountered unidirectional transform during encode: ${e}`), + (this.name = 'ZodEncodeError')); + } + }, + Fi = {}; + function ae(e) { + return (e && Object.assign(Fi, e), Fi); + } + var F = {}; + function aI(e) { + return e; + } + function sI(e) { + return e; + } + function uI(e) {} + function cI(e) { + throw new Error(); + } + function lI(e) {} + function nl(e) { + let t = Object.values(e).filter((i) => typeof i == 'number'); + return Object.entries(e) + .filter(([i, n]) => t.indexOf(+i) === -1) + .map(([i, n]) => n); + } + function z(e, t = '|') { + return e.map((i) => N(i)).join(t); + } + function Vi(e, t) { + return typeof t == 'bigint' ? t.toString() : t; + } + function Yn(e) { + return { + get value() { + { + let t = e(); + return (Object.defineProperty(this, 'value', { value: t }), t); + } + }, + }; + } + function bt(e) { + return e == null; + } + function Qi(e) { + let t = e.startsWith('^') ? 1 : 0, + i = e.endsWith('$') ? e.length - 1 : e.length; + return e.slice(t, i); + } + function gv(e, t) { + let i = (e.toString().split('.')[1] || '').length, + n = t.toString(), + r = (n.split('.')[1] || '').length; + if (r === 0 && /\d?e-\d?/.test(n)) { + let s = n.match(/\d?e-(\d?)/); + s?.[1] && (r = Number.parseInt(s[1])); + } + let o = i > r ? i : r; + return ( + (Number.parseInt(e.toFixed(o).replace('.', '')) % + Number.parseInt(t.toFixed(o).replace('.', ''))) / + 10 ** o + ); + } + $e(F, { + BIGINT_FORMAT_RANGES: () => kv, + Class: () => PI, + NUMBER_FORMAT_RANGES: () => _v, + aborted: () => dt, + allowsEval: () => hv, + assert: () => lI, + assertEqual: () => aI, + assertIs: () => uI, + assertNever: () => cI, + assertNotEqual: () => sI, + assignProp: () => Ye, + base64ToUint8Array: () => xv, + base64urlToUint8Array: () => zI, + cached: () => Yn, + captureStackTrace: () => rl, + cleanEnum: () => II, + cleanRegex: () => Qi, + clone: () => _e, + cloneDef: () => mI, + createTransparentProxy: () => bI, + defineLazy: () => R, + esc: () => Wc, + escapeRegex: () => Xe, + extend: () => _I, + finalizeIssue: () => Ie, + floatSafeRemainder: () => gv, + getElementAtPath: () => pI, + getEnumValues: () => nl, + getLengthableOrigin: () => to, + getParsedType: () => hI, + getSizableOrigin: () => eo, + hexToUint8Array: () => OI, + isObject: () => Vt, + isPlainObject: () => vt, + issue: () => Wi, + joinValues: () => z, + jsonStringifyReplacer: () => Vi, + merge: () => xI, + mergeDefs: () => Qe, + normalizeParams: () => U, + nullish: () => bt, + numKeys: () => gI, + objectClone: () => dI, + omit: () => $I, + optionalKeys: () => $v, + partial: () => wI, + pick: () => yI, + prefixIssues: () => we, + primitiveTypes: () => yv, + promiseAllObject: () => fI, + propertyKeyTypes: () => Mi, + randomString: () => vI, + required: () => SI, + safeExtend: () => kI, + shallowClone: () => bv, + stringifyPrimitive: () => N, + uint8ArrayToBase64: () => wv, + uint8ArrayToBase64url: () => jI, + uint8ArrayToHex: () => UI, + unwrapMessage: () => Gn, + }); + var qf = Symbol('evaluating'); + function R(e, t, i) { + let n; + Object.defineProperty(e, t, { + get() { + if (n !== qf) return (n === void 0 && ((n = qf), (n = i())), n); + }, + set(r) { + Object.defineProperty(e, t, { value: r }); + }, + configurable: !0, + }); + } + function dI(e) { + return Object.create( + Object.getPrototypeOf(e), + Object.getOwnPropertyDescriptors(e), + ); + } + function Ye(e, t, i) { + Object.defineProperty(e, t, { + value: i, + writable: !0, + enumerable: !0, + configurable: !0, + }); + } + function Qe(...e) { + let t = {}; + for (let i of e) { + let n = Object.getOwnPropertyDescriptors(i); + Object.assign(t, n); + } + return Object.defineProperties({}, t); + } + function mI(e) { + return Qe(e._zod.def); + } + function pI(e, t) { + return t ? t.reduce((i, n) => i?.[n], e) : e; + } + function fI(e) { + let t = Object.keys(e), + i = t.map((n) => e[n]); + return Promise.all(i).then((n) => { + let r = {}; + for (let o = 0; o < t.length; o++) r[t[o]] = n[o]; + return r; + }); + } + function vI(e = 10) { + let t = 'abcdefghijklmnopqrstuvwxyz', + i = ''; + for (let n = 0; n < e; n++) i += t[Math.floor(26 * Math.random())]; + return i; + } + function Wc(e) { + return JSON.stringify(e); + } + var rl = + 'captureStackTrace' in Error ? Error.captureStackTrace : (...e) => {}; + function Vt(e) { + return typeof e == 'object' && e !== null && !Array.isArray(e); + } + var hv = Yn(() => { + var e; + if ( + typeof navigator < 'u' && + (e = navigator?.userAgent) != null && + e.includes('Cloudflare') + ) + return !1; + try { + return (new Function(''), !0); + } catch { + return !1; + } + }); + function vt(e) { + if (Vt(e) === !1) return !1; + let t = e.constructor; + if (t === void 0) return !0; + let i = t.prototype; + return ( + Vt(i) !== !1 && + Object.prototype.hasOwnProperty.call(i, 'isPrototypeOf') !== !1 + ); + } + function bv(e) { + return vt(e) ? { ...e } : Array.isArray(e) ? [...e] : e; + } + function gI(e) { + let t = 0; + for (let i in e) Object.prototype.hasOwnProperty.call(e, i) && t++; + return t; + } + var hI = (e) => { + let t = typeof e; + switch (t) { + case 'undefined': + return 'undefined'; + case 'string': + return 'string'; + case 'number': + return Number.isNaN(e) ? 'nan' : 'number'; + case 'boolean': + return 'boolean'; + case 'function': + return 'function'; + case 'bigint': + return 'bigint'; + case 'symbol': + return 'symbol'; + case 'object': + return Array.isArray(e) + ? 'array' + : e === null + ? 'null' + : e.then && + typeof e.then == 'function' && + e.catch && + typeof e.catch == 'function' + ? 'promise' + : typeof Map < 'u' && e instanceof Map + ? 'map' + : typeof Set < 'u' && e instanceof Set + ? 'set' + : typeof Date < 'u' && e instanceof Date + ? 'date' + : typeof File < 'u' && e instanceof File + ? 'file' + : 'object'; + default: + throw new Error(`Unknown data type: ${t}`); + } + }, + Mi = new Set(['string', 'number', 'symbol']), + yv = new Set([ + 'string', + 'number', + 'bigint', + 'boolean', + 'symbol', + 'undefined', + ]); + function Xe(e) { + return e.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + function _e(e, t, i) { + let n = new e._zod.constr(t ?? e._zod.def); + return ((t && !i?.parent) || (n._zod.parent = e), n); + } + function U(e) { + let t = e; + if (!t) return {}; + if (typeof t == 'string') return { error: () => t }; + if (t?.message !== void 0) { + if (t?.error !== void 0) + throw new Error('Cannot specify both `message` and `error` params'); + t.error = t.message; + } + return ( + delete t.message, + typeof t.error == 'string' ? { ...t, error: () => t.error } : t + ); + } + function bI(e) { + let t; + return new Proxy( + {}, + { + get: (i, n, r) => (t != null || (t = e()), Reflect.get(t, n, r)), + set: (i, n, r, o) => (t != null || (t = e()), Reflect.set(t, n, r, o)), + has: (i, n) => (t != null || (t = e()), Reflect.has(t, n)), + deleteProperty: (i, n) => ( + t != null || (t = e()), + Reflect.deleteProperty(t, n) + ), + ownKeys: (i) => (t != null || (t = e()), Reflect.ownKeys(t)), + getOwnPropertyDescriptor: (i, n) => ( + t != null || (t = e()), + Reflect.getOwnPropertyDescriptor(t, n) + ), + defineProperty: (i, n, r) => ( + t != null || (t = e()), + Reflect.defineProperty(t, n, r) + ), + }, + ); + } + function N(e) { + return typeof e == 'bigint' + ? e.toString() + 'n' + : typeof e == 'string' + ? `"${e}"` + : `${e}`; + } + function $v(e) { + return Object.keys(e).filter( + (t) => e[t]._zod.optin === 'optional' && e[t]._zod.optout === 'optional', + ); + } + var _v = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE], + }, + kv = { + int64: [BigInt('-9223372036854775808'), BigInt('9223372036854775807')], + uint64: [BigInt(0), BigInt('18446744073709551615')], + }; + function yI(e, t) { + let i = e._zod.def; + return _e( + e, + Qe(e._zod.def, { + get shape() { + let n = {}; + for (let r in t) { + if (!(r in i.shape)) throw new Error(`Unrecognized key: "${r}"`); + t[r] && (n[r] = i.shape[r]); + } + return (Ye(this, 'shape', n), n); + }, + checks: [], + }), + ); + } + function $I(e, t) { + let i = e._zod.def, + n = Qe(e._zod.def, { + get shape() { + let r = { ...e._zod.def.shape }; + for (let o in t) { + if (!(o in i.shape)) throw new Error(`Unrecognized key: "${o}"`); + t[o] && delete r[o]; + } + return (Ye(this, 'shape', r), r); + }, + checks: [], + }); + return _e(e, n); + } + function _I(e, t) { + if (!vt(t)) + throw new Error('Invalid input to extend: expected a plain object'); + let i = e._zod.def.checks; + if (i && i.length > 0) + throw new Error( + 'Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.', + ); + let n = Qe(e._zod.def, { + get shape() { + let r = { ...e._zod.def.shape, ...t }; + return (Ye(this, 'shape', r), r); + }, + checks: [], + }); + return _e(e, n); + } + function kI(e, t) { + if (!vt(t)) + throw new Error('Invalid input to safeExtend: expected a plain object'); + let i = { + ...e._zod.def, + get shape() { + let n = { ...e._zod.def.shape, ...t }; + return (Ye(this, 'shape', n), n); + }, + checks: e._zod.def.checks, + }; + return _e(e, i); + } + function xI(e, t) { + let i = Qe(e._zod.def, { + get shape() { + let n = { ...e._zod.def.shape, ...t._zod.def.shape }; + return (Ye(this, 'shape', n), n); + }, + get catchall() { + return t._zod.def.catchall; + }, + checks: [], + }); + return _e(e, i); + } + function wI(e, t, i) { + let n = Qe(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in r)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && + (o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]); + } + else + for (let s in r) + o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]; + return (Ye(this, 'shape', o), o); + }, + checks: [], + }); + return _e(t, n); + } + function SI(e, t, i) { + let n = Qe(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in o)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && (o[s] = new e({ type: 'nonoptional', innerType: r[s] })); + } + else + for (let s in r) + o[s] = new e({ type: 'nonoptional', innerType: r[s] }); + return (Ye(this, 'shape', o), o); + }, + checks: [], + }); + return _e(t, n); + } + function dt(e, t = 0) { + var i; + if (e.aborted === !0) return !0; + for (let n = t; n < e.issues.length; n++) + if (((i = e.issues[n]) == null ? void 0 : i.continue) !== !0) return !0; + return !1; + } + function we(e, t) { + return t.map((i) => { + var n; + return ((n = i).path != null || (n.path = []), i.path.unshift(e), i); + }); + } + function Gn(e) { + return typeof e == 'string' ? e : e?.message; + } + function Ie(e, t, i) { + var n, r, o, s, u, a, c, m, p, f, v; + let b = { ...e, path: (n = e.path) != null ? n : [] }; + if (!e.message) { + let $ = + (v = + (f = + (m = + (a = Gn( + (s = + (o = (r = e.inst) == null ? void 0 : r._zod.def) == null + ? void 0 + : o.error) == null + ? void 0 + : s.call(o, e), + )) != null + ? a + : Gn((u = t?.error) == null ? void 0 : u.call(t, e))) != null + ? m + : Gn((c = i.customError) == null ? void 0 : c.call(i, e))) != null + ? f + : Gn((p = i.localeError) == null ? void 0 : p.call(i, e))) != null + ? v + : 'Invalid input'; + b.message = $; + } + return ( + delete b.inst, + delete b.continue, + t?.reportInput || delete b.input, + b + ); + } + function eo(e) { + return e instanceof Set + ? 'set' + : e instanceof Map + ? 'map' + : e instanceof File + ? 'file' + : 'unknown'; + } + function to(e) { + return Array.isArray(e) + ? 'array' + : typeof e == 'string' + ? 'string' + : 'unknown'; + } + function Wi(...e) { + let [t, i, n] = e; + return typeof t == 'string' + ? { message: t, code: 'custom', input: i, inst: n } + : { ...t }; + } + function II(e) { + return Object.entries(e) + .filter(([t, i]) => Number.isNaN(Number.parseInt(t, 10))) + .map((t) => t[1]); + } + function xv(e) { + let t = atob(e), + i = new Uint8Array(t.length); + for (let n = 0; n < t.length; n++) i[n] = t.charCodeAt(n); + return i; + } + function wv(e) { + let t = ''; + for (let i = 0; i < e.length; i++) t += String.fromCharCode(e[i]); + return btoa(t); + } + function zI(e) { + let t = e.replace(/-/g, '+').replace(/_/g, '/'); + return xv(t + '='.repeat((4 - (t.length % 4)) % 4)); + } + function jI(e) { + return wv(e).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); + } + function OI(e) { + let t = e.replace(/^0x/, ''); + if (t.length % 2 != 0) throw new Error('Invalid hex string length'); + let i = new Uint8Array(t.length / 2); + for (let n = 0; n < t.length; n += 2) + i[n / 2] = Number.parseInt(t.slice(n, n + 2), 16); + return i; + } + function UI(e) { + return Array.from(e) + .map((t) => t.toString(16).padStart(2, '0')) + .join(''); + } + var PI = class { + constructor(...e) {} + }, + Sv = (e, t) => { + ((e.name = '$ZodError'), + Object.defineProperty(e, '_zod', { value: e._zod, enumerable: !1 }), + Object.defineProperty(e, 'issues', { value: t, enumerable: !1 }), + (e.message = JSON.stringify(t, Vi, 2)), + Object.defineProperty(e, 'toString', { + value: () => e.message, + enumerable: !1, + })); + }, + il = y('$ZodError', Sv), + fe = y('$ZodError', Sv, { Parent: Error }); + function ol(e, t = (i) => i.message) { + let i = {}, + n = []; + for (let r of e.issues) + r.path.length > 0 + ? ((i[r.path[0]] = i[r.path[0]] || []), i[r.path[0]].push(t(r))) + : n.push(t(r)); + return { formErrors: n, fieldErrors: i }; + } + function al(e, t = (i) => i.message) { + let i = { _errors: [] }, + n = (r) => { + for (let o of r.issues) + if (o.code === 'invalid_union' && o.errors.length) + o.errors.map((s) => n({ issues: s })); + else if (o.code === 'invalid_key') n({ issues: o.issues }); + else if (o.code === 'invalid_element') n({ issues: o.issues }); + else if (o.path.length === 0) i._errors.push(t(o)); + else { + let s = i, + u = 0; + for (; u < o.path.length; ) { + let a = o.path[u]; + (u === o.path.length - 1 + ? ((s[a] = s[a] || { _errors: [] }), s[a]._errors.push(t(o))) + : (s[a] = s[a] || { _errors: [] }), + (s = s[a]), + u++); + } + } + }; + return (n(e), i); + } + function Iv(e, t = (i) => i.message) { + let i = { errors: [] }, + n = (r, o = []) => { + var s, u; + for (let a of r.issues) + if (a.code === 'invalid_union' && a.errors.length) + a.errors.map((c) => n({ issues: c }, a.path)); + else if (a.code === 'invalid_key') n({ issues: a.issues }, a.path); + else if (a.code === 'invalid_element') + n({ issues: a.issues }, a.path); + else { + let c = [...o, ...a.path]; + if (c.length === 0) { + i.errors.push(t(a)); + continue; + } + let m = i, + p = 0; + for (; p < c.length; ) { + let f = c[p], + v = p === c.length - 1; + (typeof f == 'string' + ? (m.properties != null || (m.properties = {}), + (s = m.properties)[f] != null || (s[f] = { errors: [] }), + (m = m.properties[f])) + : (m.items != null || (m.items = []), + (u = m.items)[f] != null || (u[f] = { errors: [] }), + (m = m.items[f])), + v && m.errors.push(t(a)), + p++); + } + } + }; + return (n(e), i); + } + function zv(e) { + let t = [], + i = e.map((n) => (typeof n == 'object' ? n.key : n)); + for (let n of i) + typeof n == 'number' + ? t.push(`[${n}]`) + : typeof n == 'symbol' + ? t.push(`[${JSON.stringify(String(n))}]`) + : /[^\w$]/.test(n) + ? t.push(`[${JSON.stringify(n)}]`) + : (t.length && t.push('.'), t.push(n)); + return t.join(''); + } + function jv(e) { + var t; + let i = [], + n = [...e.issues].sort((r, o) => { + var s, u; + return ( + ((s = r.path) != null ? s : []).length - + ((u = o.path) != null ? u : []).length + ); + }); + for (let r of n) + (i.push(`✖ ${r.message}`), + (t = r.path) != null && t.length && i.push(` → at ${zv(r.path)}`)); + return i.join(` +`); + } + var Qn = (e) => (t, i, n, r) => { + var o; + let s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, + u = t._zod.run({ value: i, issues: [] }, s); + if (u instanceof Promise) throw new ft(); + if (u.issues.length) { + let a = new ((o = r?.Err) != null ? o : e)( + u.issues.map((c) => Ie(c, s, ae())), + ); + throw (rl(a, r?.callee), a); + } + return u.value; + }, + Bc = Qn(fe), + er = (e) => async (t, i, n, r) => { + var o; + let s = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + u = t._zod.run({ value: i, issues: [] }, s); + if ((u instanceof Promise && (u = await u), u.issues.length)) { + let a = new ((o = r?.Err) != null ? o : e)( + u.issues.map((c) => Ie(c, s, ae())), + ); + throw (rl(a, r?.callee), a); + } + return u.value; + }, + Gc = er(fe), + tr = (e) => (t, i, n) => { + let r = n ? { ...n, async: !1 } : { async: !1 }, + o = t._zod.run({ value: i, issues: [] }, r); + if (o instanceof Promise) throw new ft(); + return o.issues.length + ? { + success: !1, + error: new (e ?? il)(o.issues.map((s) => Ie(s, r, ae()))), + } + : { success: !0, data: o.value }; + }, + Ov = tr(fe), + nr = (e) => async (t, i, n) => { + let r = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + o = t._zod.run({ value: i, issues: [] }, r); + return ( + o instanceof Promise && (o = await o), + o.issues.length + ? { success: !1, error: new e(o.issues.map((s) => Ie(s, r, ae()))) } + : { success: !0, data: o.value } + ); + }, + Uv = nr(fe), + sl = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return Qn(e)(t, i, r); + }, + NI = sl(fe), + ul = (e) => (t, i, n) => Qn(e)(t, i, n), + DI = ul(fe), + cl = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return er(e)(t, i, r); + }, + ZI = cl(fe), + ll = (e) => async (t, i, n) => er(e)(t, i, n), + EI = ll(fe), + dl = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return tr(e)(t, i, r); + }, + TI = dl(fe), + ml = (e) => (t, i, n) => tr(e)(t, i, n), + AI = ml(fe), + pl = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return nr(e)(t, i, r); + }, + CI = pl(fe), + fl = (e) => async (t, i, n) => nr(e)(t, i, n), + LI = fl(fe), + yt = {}; + $e(yt, { + base64: () => Bv, + base64url: () => vl, + bigint: () => tg, + boolean: () => ig, + browserEmail: () => GI, + cidrv4: () => Mv, + cidrv6: () => Wv, + cuid: () => Pv, + cuid2: () => Nv, + date: () => Xv, + datetime: () => Qv, + domain: () => qI, + duration: () => Av, + e164: () => Kv, + email: () => Lv, + emoji: () => Jv, + extendedDuration: () => RI, + guid: () => Cv, + hex: () => XI, + hostname: () => Gv, + html5Email: () => MI, + idnEmail: () => BI, + integer: () => ng, + ipv4: () => Fv, + ipv6: () => Vv, + ksuid: () => Ev, + lowercase: () => sg, + md5_base64: () => YI, + md5_base64url: () => QI, + md5_hex: () => HI, + nanoid: () => Tv, + null: () => og, + number: () => rg, + rfc5322Email: () => WI, + sha1_base64: () => tz, + sha1_base64url: () => nz, + sha1_hex: () => ez, + sha256_base64: () => iz, + sha256_base64url: () => oz, + sha256_hex: () => rz, + sha384_base64: () => sz, + sha384_base64url: () => uz, + sha384_hex: () => az, + sha512_base64: () => lz, + sha512_base64url: () => dz, + sha512_hex: () => cz, + string: () => eg, + time: () => Yv, + ulid: () => Dv, + undefined: () => ag, + unicodeEmail: () => Rv, + uppercase: () => ug, + uuid: () => Mt, + uuid4: () => JI, + uuid6: () => FI, + uuid7: () => VI, + xid: () => Zv, + }); + var Pv = /^[cC][^\s-]{8,}$/, + Nv = /^[0-9a-z]+$/, + Dv = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, + Zv = /^[0-9a-vA-V]{20}$/, + Ev = /^[A-Za-z0-9]{27}$/, + Tv = /^[a-zA-Z0-9_-]{21}$/, + Av = + /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, + RI = + /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, + Cv = + /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, + Mt = (e) => + e + ? new RegExp( + `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`, + ) + : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, + JI = Mt(4), + FI = Mt(6), + VI = Mt(7), + Lv = + /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, + MI = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + WI = + /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + Rv = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, + BI = Rv, + GI = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + KI = '^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$'; + function Jv() { + return new RegExp(KI, 'u'); + } + var Fv = + /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, + Vv = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, + Mv = + /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, + Wv = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, + Bv = + /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, + vl = /^[A-Za-z0-9_-]*$/, + Gv = + /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, + qI = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, + Kv = /^\+(?:[0-9]){6,14}[0-9]$/, + qv = + '(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))', + Xv = new RegExp(`^${qv}$`); + function Hv(e) { + let t = '(?:[01]\\d|2[0-3]):[0-5]\\d'; + return typeof e.precision == 'number' + ? e.precision === -1 + ? `${t}` + : e.precision === 0 + ? `${t}:[0-5]\\d` + : `${t}:[0-5]\\d\\.\\d{${e.precision}}` + : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; + } + function Yv(e) { + return new RegExp(`^${Hv(e)}$`); + } + function Qv(e) { + let t = Hv({ precision: e.precision }), + i = ['Z']; + (e.local && i.push(''), + e.offset && i.push('([+-](?:[01]\\d|2[0-3]):[0-5]\\d)')); + let n = `${t}(?:${i.join('|')})`; + return new RegExp(`^${qv}T(?:${n})$`); + } + var eg = (e) => { + var t, i; + let n = e + ? `[\\s\\S]{${(t = e?.minimum) != null ? t : 0},${(i = e?.maximum) != null ? i : ''}}` + : '[\\s\\S]*'; + return new RegExp(`^${n}$`); + }, + tg = /^-?\d+n?$/, + ng = /^-?\d+$/, + rg = /^-?\d+(?:\.\d+)?/, + ig = /^(?:true|false)$/i, + og = /^null$/i, + ag = /^undefined$/i, + sg = /^[^A-Z]*$/, + ug = /^[^a-z]*$/, + XI = /^[0-9a-fA-F]*$/; + function rr(e, t) { + return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`); + } + function ir(e) { + return new RegExp(`^[A-Za-z0-9_-]{${e}}$`); + } + var HI = /^[0-9a-fA-F]{32}$/, + YI = rr(22, '=='), + QI = ir(22), + ez = /^[0-9a-fA-F]{40}$/, + tz = rr(27, '='), + nz = ir(27), + rz = /^[0-9a-fA-F]{64}$/, + iz = rr(43, '='), + oz = ir(43), + az = /^[0-9a-fA-F]{96}$/, + sz = rr(64, ''), + uz = ir(64), + cz = /^[0-9a-fA-F]{128}$/, + lz = rr(86, '=='), + dz = ir(86), + K = y('$ZodCheck', (e, t) => { + var i; + (e._zod != null || (e._zod = {}), + (e._zod.def = t), + (i = e._zod).onattach != null || (i.onattach = [])); + }), + cg = { number: 'number', bigint: 'bigint', object: 'date' }, + gl = y('$ZodCheckLessThan', (e, t) => { + K.init(e, t); + let i = cg[typeof t.value]; + (e._zod.onattach.push((n) => { + var r; + let o = n._zod.bag, + s = + (r = t.inclusive ? o.maximum : o.exclusiveMaximum) != null + ? r + : Number.POSITIVE_INFINITY; + t.value < s && + (t.inclusive + ? (o.maximum = t.value) + : (o.exclusiveMaximum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value <= t.value : n.value < t.value) || + n.issues.push({ + origin: i, + code: 'too_big', + maximum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + hl = y('$ZodCheckGreaterThan', (e, t) => { + K.init(e, t); + let i = cg[typeof t.value]; + (e._zod.onattach.push((n) => { + var r; + let o = n._zod.bag, + s = + (r = t.inclusive ? o.minimum : o.exclusiveMinimum) != null + ? r + : Number.NEGATIVE_INFINITY; + t.value > s && + (t.inclusive + ? (o.minimum = t.value) + : (o.exclusiveMinimum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value >= t.value : n.value > t.value) || + n.issues.push({ + origin: i, + code: 'too_small', + minimum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + lg = y('$ZodCheckMultipleOf', (e, t) => { + (K.init(e, t), + e._zod.onattach.push((i) => { + var n; + (n = i._zod.bag).multipleOf != null || (n.multipleOf = t.value); + }), + (e._zod.check = (i) => { + if (typeof i.value != typeof t.value) + throw new Error( + 'Cannot mix number and bigint in multiple_of check.', + ); + (typeof i.value == 'bigint' + ? i.value % t.value === BigInt(0) + : gv(i.value, t.value) === 0) || + i.issues.push({ + origin: typeof i.value, + code: 'not_multiple_of', + divisor: t.value, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + dg = y('$ZodCheckNumberFormat', (e, t) => { + var i; + (K.init(e, t), (t.format = t.format || 'float64')); + let n = (i = t.format) == null ? void 0 : i.includes('int'), + r = n ? 'int' : 'number', + [o, s] = _v[t.format]; + (e._zod.onattach.push((u) => { + let a = u._zod.bag; + ((a.format = t.format), + (a.minimum = o), + (a.maximum = s), + n && (a.pattern = ng)); + }), + (e._zod.check = (u) => { + let a = u.value; + if (n) { + if (!Number.isInteger(a)) + return void u.issues.push({ + expected: r, + format: t.format, + code: 'invalid_type', + continue: !1, + input: a, + inst: e, + }); + if (!Number.isSafeInteger(a)) + return void (a > 0 + ? u.issues.push({ + input: a, + code: 'too_big', + maximum: Number.MAX_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: r, + continue: !t.abort, + }) + : u.issues.push({ + input: a, + code: 'too_small', + minimum: Number.MIN_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: r, + continue: !t.abort, + })); + } + (a < o && + u.issues.push({ + origin: 'number', + input: a, + code: 'too_small', + minimum: o, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + a > s && + u.issues.push({ + origin: 'number', + input: a, + code: 'too_big', + maximum: s, + inst: e, + })); + })); + }), + mg = y('$ZodCheckBigIntFormat', (e, t) => { + K.init(e, t); + let [i, n] = kv[t.format]; + (e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), (o.minimum = i), (o.maximum = n)); + }), + (e._zod.check = (r) => { + let o = r.value; + (o < i && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_small', + minimum: i, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + o > n && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_big', + maximum: n, + inst: e, + })); + })); + }), + pg = y('$ZodCheckMaxSize', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.maximum) != null ? r : Number.POSITIVE_INFINITY; + t.maximum < o && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size <= t.maximum || + n.issues.push({ + origin: eo(r), + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + fg = y('$ZodCheckMinSize', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.minimum) != null ? r : Number.NEGATIVE_INFINITY; + t.minimum > o && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size >= t.minimum || + n.issues.push({ + origin: eo(r), + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + vg = y('$ZodCheckSizeEquals', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.size), (r.maximum = t.size), (r.size = t.size)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.size; + if (o === t.size) return; + let s = o > t.size; + n.issues.push({ + origin: eo(r), + ...(s + ? { code: 'too_big', maximum: t.size } + : { code: 'too_small', minimum: t.size }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + gg = y('$ZodCheckMaxLength', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.maximum) != null ? r : Number.POSITIVE_INFINITY; + t.maximum < o && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length <= t.maximum) return; + let o = to(r); + n.issues.push({ + origin: o, + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + hg = y('$ZodCheckMinLength', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.minimum) != null ? r : Number.NEGATIVE_INFINITY; + t.minimum > o && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length >= t.minimum) return; + let o = to(r); + n.issues.push({ + origin: o, + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + bg = y('$ZodCheckLengthEquals', (e, t) => { + var i; + (K.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !bt(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.length), + (r.maximum = t.length), + (r.length = t.length)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.length; + if (o === t.length) return; + let s = to(r), + u = o > t.length; + n.issues.push({ + origin: s, + ...(u + ? { code: 'too_big', maximum: t.length } + : { code: 'too_small', minimum: t.length }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + or = y('$ZodCheckStringFormat', (e, t) => { + var i, n; + (K.init(e, t), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), + t.pattern && + (o.patterns != null || (o.patterns = new Set()), + o.patterns.add(t.pattern))); + }), + t.pattern + ? (i = e._zod).check != null || + (i.check = (r) => { + ((t.pattern.lastIndex = 0), + t.pattern.test(r.value) || + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: t.format, + input: r.value, + ...(t.pattern ? { pattern: t.pattern.toString() } : {}), + inst: e, + continue: !t.abort, + })); + }) + : (n = e._zod).check != null || (n.check = () => {})); + }), + yg = y('$ZodCheckRegex', (e, t) => { + (or.init(e, t), + (e._zod.check = (i) => { + ((t.pattern.lastIndex = 0), + t.pattern.test(i.value) || + i.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'regex', + input: i.value, + pattern: t.pattern.toString(), + inst: e, + continue: !t.abort, + })); + })); + }), + $g = y('$ZodCheckLowerCase', (e, t) => { + (t.pattern != null || (t.pattern = sg), or.init(e, t)); + }), + _g = y('$ZodCheckUpperCase', (e, t) => { + (t.pattern != null || (t.pattern = ug), or.init(e, t)); + }), + kg = y('$ZodCheckIncludes', (e, t) => { + K.init(e, t); + let i = Xe(t.includes), + n = new RegExp( + typeof t.position == 'number' ? `^.{${t.position}}${i}` : i, + ); + ((t.pattern = n), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + (o.patterns != null || (o.patterns = new Set()), o.patterns.add(n)); + }), + (e._zod.check = (r) => { + r.value.includes(t.includes, t.position) || + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'includes', + includes: t.includes, + input: r.value, + inst: e, + continue: !t.abort, + }); + })); + }), + xg = y('$ZodCheckStartsWith', (e, t) => { + K.init(e, t); + let i = new RegExp(`^${Xe(t.prefix)}.*`); + (t.pattern != null || (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns != null || (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.startsWith(t.prefix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'starts_with', + prefix: t.prefix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + wg = y('$ZodCheckEndsWith', (e, t) => { + K.init(e, t); + let i = new RegExp(`.*${Xe(t.suffix)}$`); + (t.pattern != null || (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns != null || (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.endsWith(t.suffix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'ends_with', + suffix: t.suffix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function Xf(e, t, i) { + e.issues.length && t.issues.push(...we(i, e.issues)); + } + var Sg = y('$ZodCheckProperty', (e, t) => { + (K.init(e, t), + (e._zod.check = (i) => { + let n = t.schema._zod.run( + { value: i.value[t.property], issues: [] }, + {}, + ); + if (n instanceof Promise) return n.then((r) => Xf(r, i, t.property)); + Xf(n, i, t.property); + })); + }), + Ig = y('$ZodCheckMimeType', (e, t) => { + K.init(e, t); + let i = new Set(t.mime); + (e._zod.onattach.push((n) => { + n._zod.bag.mime = t.mime; + }), + (e._zod.check = (n) => { + i.has(n.value.type) || + n.issues.push({ + code: 'invalid_value', + values: t.mime, + input: n.value.type, + inst: e, + continue: !t.abort, + }); + })); + }), + zg = y('$ZodCheckOverwrite', (e, t) => { + (K.init(e, t), + (e._zod.check = (i) => { + i.value = t.tx(i.value); + })); + }), + jg = class { + constructor(e = []) { + ((this.content = []), (this.indent = 0), this && (this.args = e)); + } + indented(e) { + ((this.indent += 1), e(this), (this.indent -= 1)); + } + write(e) { + if (typeof e == 'function') + return ( + e(this, { execution: 'sync' }), + void e(this, { execution: 'async' }) + ); + let t = e + .split( + ` +`, + ) + .filter((r) => r), + i = Math.min(...t.map((r) => r.length - r.trimStart().length)), + n = t + .map((r) => r.slice(i)) + .map((r) => ' '.repeat(2 * this.indent) + r); + for (let r of n) this.content.push(r); + } + compile() { + var e; + return new Function( + ...(this == null ? void 0 : this.args), + [ + ...((e = this == null ? void 0 : this.content) != null + ? e + : [''] + ).map((t) => ` ${t}`), + ].join(` +`), + ); + } + }, + Og = { major: 4, minor: 1, patch: 12 }, + E = y('$ZodType', (e, t) => { + var i, n, r; + (e != null || (e = {}), + (e._zod.def = t), + (e._zod.bag = e._zod.bag || {}), + (e._zod.version = Og)); + let o = [...((i = e._zod.def.checks) != null ? i : [])]; + e._zod.traits.has('$ZodCheck') && o.unshift(e); + for (let s of o) for (let u of s._zod.onattach) u(e); + if (o.length === 0) + ((r = e._zod).deferred != null || (r.deferred = []), + (n = e._zod.deferred) == null || + n.push(() => { + e._zod.run = e._zod.parse; + })); + else { + let s = (a, c, m) => { + let p, + f = dt(a); + for (let v of c) { + if (v._zod.def.when) { + if (!v._zod.def.when(a)) continue; + } else if (f) continue; + let b = a.issues.length, + $ = v._zod.check(a); + if ($ instanceof Promise && m?.async === !1) throw new ft(); + if (p || $ instanceof Promise) + p = (p ?? Promise.resolve()).then(async () => { + (await $, a.issues.length !== b && (f || (f = dt(a, b)))); + }); + else { + if (a.issues.length === b) continue; + f || (f = dt(a, b)); + } + } + return p ? p.then(() => a) : a; + }, + u = (a, c, m) => { + if (dt(a)) return ((a.aborted = !0), a); + let p = s(c, o, m); + if (p instanceof Promise) { + if (m.async === !1) throw new ft(); + return p.then((f) => e._zod.parse(f, m)); + } + return e._zod.parse(p, m); + }; + e._zod.run = (a, c) => { + if (c.skipChecks) return e._zod.parse(a, c); + if (c.direction === 'backward') { + let p = e._zod.parse( + { value: a.value, issues: [] }, + { ...c, skipChecks: !0 }, + ); + return p instanceof Promise + ? p.then((f) => u(f, a, c)) + : u(p, a, c); + } + let m = e._zod.parse(a, c); + if (m instanceof Promise) { + if (c.async === !1) throw new ft(); + return m.then((p) => s(p, o, c)); + } + return s(m, o, c); + }; + } + e['~standard'] = { + validate: (s) => { + var u; + try { + let a = Ov(e, s); + return a.success + ? { value: a.data } + : { issues: (u = a.error) == null ? void 0 : u.issues }; + } catch { + return Uv(e, s).then((c) => { + var m; + return c.success + ? { value: c.data } + : { issues: (m = c.error) == null ? void 0 : m.issues }; + }); + } + }, + vendor: 'zod', + version: 1, + }; + }), + ar = y('$ZodString', (e, t) => { + var i, n, r; + (E.init(e, t), + (e._zod.pattern = + (r = [ + ...((n = (i = e?._zod.bag) == null ? void 0 : i.patterns) != null + ? n + : []), + ].pop()) != null + ? r + : eg(e._zod.bag)), + (e._zod.parse = (o, s) => { + if (t.coerce) + try { + o.value = String(o.value); + } catch {} + return ( + typeof o.value == 'string' || + o.issues.push({ + expected: 'string', + code: 'invalid_type', + input: o.value, + inst: e, + }), + o + ); + })); + }), + W = y('$ZodStringFormat', (e, t) => { + (or.init(e, t), ar.init(e, t)); + }), + Ug = y('$ZodGUID', (e, t) => { + (t.pattern != null || (t.pattern = Cv), W.init(e, t)); + }), + Pg = y('$ZodUUID', (e, t) => { + if (t.version) { + let i = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[ + t.version + ]; + if (i === void 0) + throw new Error(`Invalid UUID version: "${t.version}"`); + t.pattern != null || (t.pattern = Mt(i)); + } else t.pattern != null || (t.pattern = Mt()); + W.init(e, t); + }), + Ng = y('$ZodEmail', (e, t) => { + (t.pattern != null || (t.pattern = Lv), W.init(e, t)); + }), + Dg = y('$ZodURL', (e, t) => { + (W.init(e, t), + (e._zod.check = (i) => { + try { + let n = i.value.trim(), + r = new URL(n); + return ( + t.hostname && + ((t.hostname.lastIndex = 0), + t.hostname.test(r.hostname) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid hostname', + pattern: Gv.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + t.protocol && + ((t.protocol.lastIndex = 0), + t.protocol.test( + r.protocol.endsWith(':') + ? r.protocol.slice(0, -1) + : r.protocol, + ) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid protocol', + pattern: t.protocol.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + void (t.normalize ? (i.value = r.href) : (i.value = n)) + ); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'url', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + Zg = y('$ZodEmoji', (e, t) => { + (t.pattern != null || (t.pattern = Jv()), W.init(e, t)); + }), + Eg = y('$ZodNanoID', (e, t) => { + (t.pattern != null || (t.pattern = Tv), W.init(e, t)); + }), + Tg = y('$ZodCUID', (e, t) => { + (t.pattern != null || (t.pattern = Pv), W.init(e, t)); + }), + Ag = y('$ZodCUID2', (e, t) => { + (t.pattern != null || (t.pattern = Nv), W.init(e, t)); + }), + Cg = y('$ZodULID', (e, t) => { + (t.pattern != null || (t.pattern = Dv), W.init(e, t)); + }), + Lg = y('$ZodXID', (e, t) => { + (t.pattern != null || (t.pattern = Zv), W.init(e, t)); + }), + Rg = y('$ZodKSUID', (e, t) => { + (t.pattern != null || (t.pattern = Ev), W.init(e, t)); + }), + Jg = y('$ZodISODateTime', (e, t) => { + (t.pattern != null || (t.pattern = Qv(t)), W.init(e, t)); + }), + Fg = y('$ZodISODate', (e, t) => { + (t.pattern != null || (t.pattern = Xv), W.init(e, t)); + }), + Vg = y('$ZodISOTime', (e, t) => { + (t.pattern != null || (t.pattern = Yv(t)), W.init(e, t)); + }), + Mg = y('$ZodISODuration', (e, t) => { + (t.pattern != null || (t.pattern = Av), W.init(e, t)); + }), + Wg = y('$ZodIPv4', (e, t) => { + (t.pattern != null || (t.pattern = Fv), + W.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.format = 'ipv4'; + })); + }), + Bg = y('$ZodIPv6', (e, t) => { + (t.pattern != null || (t.pattern = Vv), + W.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.format = 'ipv6'; + }), + (e._zod.check = (i) => { + try { + new URL(`http://[${i.value}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'ipv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + Gg = y('$ZodCIDRv4', (e, t) => { + (t.pattern != null || (t.pattern = Mv), W.init(e, t)); + }), + Kg = y('$ZodCIDRv6', (e, t) => { + (t.pattern != null || (t.pattern = Wv), + W.init(e, t), + (e._zod.check = (i) => { + let n = i.value.split('/'); + try { + if (n.length !== 2) throw new Error(); + let [r, o] = n; + if (!o) throw new Error(); + let s = Number(o); + if (`${s}` !== o) throw new Error(); + if (s < 0 || s > 128) throw new Error(); + new URL(`http://[${r}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'cidrv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }); + function bl(e) { + if (e === '') return !0; + if (e.length % 4 != 0) return !1; + try { + return (atob(e), !0); + } catch { + return !1; + } + } + var qg = y('$ZodBase64', (e, t) => { + (t.pattern != null || (t.pattern = Bv), + W.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64'; + }), + (e._zod.check = (i) => { + bl(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function Xg(e) { + if (!vl.test(e)) return !1; + let t = e.replace(/[-_]/g, (i) => (i === '-' ? '+' : '/')); + return bl(t.padEnd(4 * Math.ceil(t.length / 4), '=')); + } + var Hg = y('$ZodBase64URL', (e, t) => { + (t.pattern != null || (t.pattern = vl), + W.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64url'; + }), + (e._zod.check = (i) => { + Xg(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64url', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Yg = y('$ZodE164', (e, t) => { + (t.pattern != null || (t.pattern = Kv), W.init(e, t)); + }); + function Qg(e, t = null) { + try { + let i = e.split('.'); + if (i.length !== 3) return !1; + let [n] = i; + if (!n) return !1; + let r = JSON.parse(atob(n)); + return ( + (!('typ' in r) || r?.typ === 'JWT') && + !!r.alg && + (!t || ('alg' in r && r.alg === t)) + ); + } catch { + return !1; + } + } + var eh = y('$ZodJWT', (e, t) => { + (W.init(e, t), + (e._zod.check = (i) => { + Qg(i.value, t.alg) || + i.issues.push({ + code: 'invalid_format', + format: 'jwt', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + th = y('$ZodCustomStringFormat', (e, t) => { + (W.init(e, t), + (e._zod.check = (i) => { + t.fn(i.value) || + i.issues.push({ + code: 'invalid_format', + format: t.format, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + yl = y('$ZodNumber', (e, t) => { + var i; + (E.init(e, t), + (e._zod.pattern = (i = e._zod.bag.pattern) != null ? i : rg), + (e._zod.parse = (n, r) => { + if (t.coerce) + try { + n.value = Number(n.value); + } catch {} + let o = n.value; + if (typeof o == 'number' && !Number.isNaN(o) && Number.isFinite(o)) + return n; + let s = + typeof o == 'number' + ? Number.isNaN(o) + ? 'NaN' + : Number.isFinite(o) + ? void 0 + : 'Infinity' + : void 0; + return ( + n.issues.push({ + expected: 'number', + code: 'invalid_type', + input: o, + inst: e, + ...(s ? { received: s } : {}), + }), + n + ); + })); + }), + nh = y('$ZodNumber', (e, t) => { + (dg.init(e, t), yl.init(e, t)); + }), + $l = y('$ZodBoolean', (e, t) => { + (E.init(e, t), + (e._zod.pattern = ig), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = !!i.value; + } catch {} + let r = i.value; + return ( + typeof r == 'boolean' || + i.issues.push({ + expected: 'boolean', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + _l = y('$ZodBigInt', (e, t) => { + (E.init(e, t), + (e._zod.pattern = tg), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = BigInt(i.value); + } catch {} + return ( + typeof i.value == 'bigint' || + i.issues.push({ + expected: 'bigint', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ); + })); + }), + rh = y('$ZodBigInt', (e, t) => { + (mg.init(e, t), _l.init(e, t)); + }), + ih = y('$ZodSymbol', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + typeof r == 'symbol' || + i.issues.push({ + expected: 'symbol', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + oh = y('$ZodUndefined', (e, t) => { + (E.init(e, t), + (e._zod.pattern = ag), + (e._zod.values = new Set([void 0])), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === void 0 || + i.issues.push({ + expected: 'undefined', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + ah = y('$ZodNull', (e, t) => { + (E.init(e, t), + (e._zod.pattern = og), + (e._zod.values = new Set([null])), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === null || + i.issues.push({ + expected: 'null', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + sh = y('$ZodAny', (e, t) => { + (E.init(e, t), (e._zod.parse = (i) => i)); + }), + uh = y('$ZodUnknown', (e, t) => { + (E.init(e, t), (e._zod.parse = (i) => i)); + }), + ch = y('$ZodNever', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => ( + i.issues.push({ + expected: 'never', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ))); + }), + lh = y('$ZodVoid', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === void 0 || + i.issues.push({ + expected: 'void', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + dh = y('$ZodDate', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = new Date(i.value); + } catch {} + let r = i.value, + o = r instanceof Date; + return ( + (o && !Number.isNaN(r.getTime())) || + i.issues.push({ + expected: 'date', + code: 'invalid_type', + input: r, + ...(o ? { received: 'Invalid Date' } : {}), + inst: e, + }), + i + ); + })); + }); + function Hf(e, t, i) { + (e.issues.length && t.issues.push(...we(i, e.issues)), + (t.value[i] = e.value)); + } + var mh = y('$ZodArray', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!Array.isArray(r)) + return ( + i.issues.push({ + expected: 'array', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + i.value = Array(r.length); + let o = []; + for (let s = 0; s < r.length; s++) { + let u = r[s], + a = t.element._zod.run({ value: u, issues: [] }, n); + a instanceof Promise + ? o.push(a.then((c) => Hf(c, i, s))) + : Hf(a, i, s); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function Bi(e, t, i, n) { + (e.issues.length && t.issues.push(...we(i, e.issues)), + e.value === void 0 + ? i in n && (t.value[i] = void 0) + : (t.value[i] = e.value)); + } + function ph(e) { + var t, i, n, r; + let o = Object.keys(e.shape); + for (let u of o) + if ( + !( + (r = + (n = + (i = (t = e.shape) == null ? void 0 : t[u]) == null + ? void 0 + : i._zod) == null + ? void 0 + : n.traits) != null && r.has('$ZodType') + ) + ) + throw new Error(`Invalid element at key "${u}": expected a Zod schema`); + let s = $v(e.shape); + return { + ...e, + keys: o, + keySet: new Set(o), + numKeys: o.length, + optionalKeys: new Set(s), + }; + } + function fh(e, t, i, n, r, o) { + let s = [], + u = r.keySet, + a = r.catchall._zod, + c = a.def.type; + for (let m of Object.keys(t)) { + if (u.has(m)) continue; + if (c === 'never') { + s.push(m); + continue; + } + let p = a.run({ value: t[m], issues: [] }, n); + p instanceof Promise + ? e.push(p.then((f) => Bi(f, i, m, t))) + : Bi(p, i, m, t); + } + return ( + s.length && + i.issues.push({ + code: 'unrecognized_keys', + keys: s, + input: t, + inst: o, + }), + e.length ? Promise.all(e).then(() => i) : i + ); + } + var vh = y('$ZodObject', (e, t) => { + E.init(e, t); + let i = Object.getOwnPropertyDescriptor(t, 'shape'); + if (!i?.get) { + let u = t.shape; + Object.defineProperty(t, 'shape', { + get: () => { + let a = { ...u }; + return (Object.defineProperty(t, 'shape', { value: a }), a); + }, + }); + } + let n = Yn(() => ph(t)); + R(e._zod, 'propValues', () => { + let u = t.shape, + a = {}; + for (let c in u) { + let m = u[c]._zod; + if (m.values) { + a[c] != null || (a[c] = new Set()); + for (let p of m.values) a[c].add(p); + } + } + return a; + }); + let r = Vt, + o = t.catchall, + s; + e._zod.parse = (u, a) => { + s != null || (s = n.value); + let c = u.value; + if (!r(c)) + return ( + u.issues.push({ + expected: 'object', + code: 'invalid_type', + input: c, + inst: e, + }), + u + ); + u.value = {}; + let m = [], + p = s.shape; + for (let f of s.keys) { + let v = p[f]._zod.run({ value: c[f], issues: [] }, a); + v instanceof Promise + ? m.push(v.then((b) => Bi(b, u, f, c))) + : Bi(v, u, f, c); + } + return o + ? fh(m, c, u, a, n.value, e) + : m.length + ? Promise.all(m).then(() => u) + : u; + }; + }), + gh = y('$ZodObjectJIT', (e, t) => { + vh.init(e, t); + let i = e._zod.parse, + n = Yn(() => ph(t)), + r, + o = Vt, + s = !Fi.jitless, + u = s && hv.value, + a = t.catchall, + c; + e._zod.parse = (m, p) => { + c != null || (c = n.value); + let f = m.value; + return o(f) + ? s && u && p?.async === !1 && p.jitless !== !0 + ? (r || + (r = ((v) => { + let b = new jg(['shape', 'payload', 'ctx']), + $ = n.value, + g = (S) => { + let P = Wc(S); + return `shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`; + }; + b.write('const input = payload.value;'); + let k = Object.create(null), + x = 0; + for (let S of $.keys) k[S] = 'key_' + x++; + b.write('const newResult = {};'); + for (let S of $.keys) { + let P = k[S], + J = Wc(S); + (b.write(`const ${P} = ${g(S)};`), + b.write(` + if (${P}.issues.length) { + payload.issues = payload.issues.concat(${P}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${J}, ...iss.path] : [${J}] + }))); + } + + + if (${P}.value === undefined) { + if (${J} in input) { + newResult[${J}] = undefined; + } + } else { + newResult[${J}] = ${P}.value; + } + + `)); + } + (b.write('payload.value = newResult;'), + b.write('return payload;')); + let w = b.compile(); + return (S, P) => w(v, S, P); + })(t.shape)), + (m = r(m, p)), + a ? fh([], f, m, p, c, e) : m) + : i(m, p) + : (m.issues.push({ + expected: 'object', + code: 'invalid_type', + input: f, + inst: e, + }), + m); + }; + }); + function Yf(e, t, i, n) { + for (let o of e) if (o.issues.length === 0) return ((t.value = o.value), t); + let r = e.filter((o) => !dt(o)); + return r.length === 1 + ? ((t.value = r[0].value), r[0]) + : (t.issues.push({ + code: 'invalid_union', + input: t.value, + inst: i, + errors: e.map((o) => o.issues.map((s) => Ie(s, n, ae()))), + }), + t); + } + var kl = y('$ZodUnion', (e, t) => { + (E.init(e, t), + R(e._zod, 'optin', () => + t.options.some((r) => r._zod.optin === 'optional') + ? 'optional' + : void 0, + ), + R(e._zod, 'optout', () => + t.options.some((r) => r._zod.optout === 'optional') + ? 'optional' + : void 0, + ), + R(e._zod, 'values', () => { + if (t.options.every((r) => r._zod.values)) + return new Set(t.options.flatMap((r) => Array.from(r._zod.values))); + }), + R(e._zod, 'pattern', () => { + if (t.options.every((r) => r._zod.pattern)) { + let r = t.options.map((o) => o._zod.pattern); + return new RegExp(`^(${r.map((o) => Qi(o.source)).join('|')})$`); + } + })); + let i = t.options.length === 1, + n = t.options[0]._zod.run; + e._zod.parse = (r, o) => { + if (i) return n(r, o); + let s = !1, + u = []; + for (let a of t.options) { + let c = a._zod.run({ value: r.value, issues: [] }, o); + if (c instanceof Promise) (u.push(c), (s = !0)); + else { + if (c.issues.length === 0) return c; + u.push(c); + } + } + return s ? Promise.all(u).then((a) => Yf(a, r, e, o)) : Yf(u, r, e, o); + }; + }), + hh = y('$ZodDiscriminatedUnion', (e, t) => { + kl.init(e, t); + let i = e._zod.parse; + R(e._zod, 'propValues', () => { + let r = {}; + for (let o of t.options) { + let s = o._zod.propValues; + if (!s || Object.keys(s).length === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(o)}"`, + ); + for (let [u, a] of Object.entries(s)) { + r[u] || (r[u] = new Set()); + for (let c of a) r[u].add(c); + } + } + return r; + }); + let n = Yn(() => { + var r; + let o = t.options, + s = new Map(); + for (let u of o) { + let a = (r = u._zod.propValues) == null ? void 0 : r[t.discriminator]; + if (!a || a.size === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(u)}"`, + ); + for (let c of a) { + if (s.has(c)) + throw new Error(`Duplicate discriminator value "${String(c)}"`); + s.set(c, u); + } + } + return s; + }); + e._zod.parse = (r, o) => { + let s = r.value; + if (!Vt(s)) + return ( + r.issues.push({ + code: 'invalid_type', + expected: 'object', + input: s, + inst: e, + }), + r + ); + let u = n.value.get(s?.[t.discriminator]); + return u + ? u._zod.run(r, o) + : t.unionFallback + ? i(r, o) + : (r.issues.push({ + code: 'invalid_union', + errors: [], + note: 'No matching discriminator', + discriminator: t.discriminator, + input: s, + path: [t.discriminator], + inst: e, + }), + r); + }; + }), + bh = y('$ZodIntersection', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value, + o = t.left._zod.run({ value: r, issues: [] }, n), + s = t.right._zod.run({ value: r, issues: [] }, n); + return o instanceof Promise || s instanceof Promise + ? Promise.all([o, s]).then(([u, a]) => Qf(i, u, a)) + : Qf(i, o, s); + })); + }); + function Kc(e, t) { + if (e === t) return { valid: !0, data: e }; + if (e instanceof Date && t instanceof Date && +e == +t) + return { valid: !0, data: e }; + if (vt(e) && vt(t)) { + let i = Object.keys(t), + n = Object.keys(e).filter((o) => i.indexOf(o) !== -1), + r = { ...e, ...t }; + for (let o of n) { + let s = Kc(e[o], t[o]); + if (!s.valid) + return { valid: !1, mergeErrorPath: [o, ...s.mergeErrorPath] }; + r[o] = s.data; + } + return { valid: !0, data: r }; + } + if (Array.isArray(e) && Array.isArray(t)) { + if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; + let i = []; + for (let n = 0; n < e.length; n++) { + let r = Kc(e[n], t[n]); + if (!r.valid) + return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; + i.push(r.data); + } + return { valid: !0, data: i }; + } + return { valid: !1, mergeErrorPath: [] }; + } + function Qf(e, t, i) { + if ( + (t.issues.length && e.issues.push(...t.issues), + i.issues.length && e.issues.push(...i.issues), + dt(e)) + ) + return e; + let n = Kc(t.value, i.value); + if (!n.valid) + throw new Error( + `Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`, + ); + return ((e.value = n.data), e); + } + var xl = y('$ZodTuple', (e, t) => { + E.init(e, t); + let i = t.items, + n = + i.length - + [...i].reverse().findIndex((r) => r._zod.optin !== 'optional'); + e._zod.parse = (r, o) => { + let s = r.value; + if (!Array.isArray(s)) + return ( + r.issues.push({ + input: s, + inst: e, + expected: 'tuple', + code: 'invalid_type', + }), + r + ); + r.value = []; + let u = []; + if (!t.rest) { + let c = s.length > i.length, + m = s.length < n - 1; + if (c || m) + return ( + r.issues.push({ + ...(c + ? { code: 'too_big', maximum: i.length } + : { code: 'too_small', minimum: i.length }), + input: s, + inst: e, + origin: 'array', + }), + r + ); + } + let a = -1; + for (let c of i) { + if ((a++, a >= s.length && a >= n)) continue; + let m = c._zod.run({ value: s[a], issues: [] }, o); + m instanceof Promise ? u.push(m.then((p) => Ai(p, r, a))) : Ai(m, r, a); + } + if (t.rest) { + let c = s.slice(i.length); + for (let m of c) { + a++; + let p = t.rest._zod.run({ value: m, issues: [] }, o); + p instanceof Promise + ? u.push(p.then((f) => Ai(f, r, a))) + : Ai(p, r, a); + } + } + return u.length ? Promise.all(u).then(() => r) : r; + }; + }); + function Ai(e, t, i) { + (e.issues.length && t.issues.push(...we(i, e.issues)), + (t.value[i] = e.value)); + } + var yh = y('$ZodRecord', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!vt(r)) + return ( + i.issues.push({ + expected: 'record', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + if (t.keyType._zod.values) { + let s = t.keyType._zod.values; + i.value = {}; + for (let a of s) + if ( + typeof a == 'string' || + typeof a == 'number' || + typeof a == 'symbol' + ) { + let c = t.valueType._zod.run({ value: r[a], issues: [] }, n); + c instanceof Promise + ? o.push( + c.then((m) => { + (m.issues.length && i.issues.push(...we(a, m.issues)), + (i.value[a] = m.value)); + }), + ) + : (c.issues.length && i.issues.push(...we(a, c.issues)), + (i.value[a] = c.value)); + } + let u; + for (let a in r) s.has(a) || ((u = u ?? []), u.push(a)); + u && + u.length > 0 && + i.issues.push({ + code: 'unrecognized_keys', + input: r, + inst: e, + keys: u, + }); + } else { + i.value = {}; + for (let s of Reflect.ownKeys(r)) { + if (s === '__proto__') continue; + let u = t.keyType._zod.run({ value: s, issues: [] }, n); + if (u instanceof Promise) + throw new Error( + 'Async schemas not supported in object keys currently', + ); + if (u.issues.length) { + (i.issues.push({ + code: 'invalid_key', + origin: 'record', + issues: u.issues.map((c) => Ie(c, n, ae())), + input: s, + path: [s], + inst: e, + }), + (i.value[u.value] = u.value)); + continue; + } + let a = t.valueType._zod.run({ value: r[s], issues: [] }, n); + a instanceof Promise + ? o.push( + a.then((c) => { + (c.issues.length && i.issues.push(...we(s, c.issues)), + (i.value[u.value] = c.value)); + }), + ) + : (a.issues.length && i.issues.push(...we(s, a.issues)), + (i.value[u.value] = a.value)); + } + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }), + $h = y('$ZodMap', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Map)) + return ( + i.issues.push({ + expected: 'map', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + i.value = new Map(); + for (let [s, u] of r) { + let a = t.keyType._zod.run({ value: s, issues: [] }, n), + c = t.valueType._zod.run({ value: u, issues: [] }, n); + a instanceof Promise || c instanceof Promise + ? o.push( + Promise.all([a, c]).then(([m, p]) => { + ev(m, p, i, s, r, e, n); + }), + ) + : ev(a, c, i, s, r, e, n); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function ev(e, t, i, n, r, o, s) { + (e.issues.length && + (Mi.has(typeof n) + ? i.issues.push(...we(n, e.issues)) + : i.issues.push({ + code: 'invalid_key', + origin: 'map', + input: r, + inst: o, + issues: e.issues.map((u) => Ie(u, s, ae())), + })), + t.issues.length && + (Mi.has(typeof n) + ? i.issues.push(...we(n, t.issues)) + : i.issues.push({ + origin: 'map', + code: 'invalid_element', + input: r, + inst: o, + key: n, + issues: t.issues.map((u) => Ie(u, s, ae())), + })), + i.value.set(e.value, t.value)); + } + var _h = y('$ZodSet', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Set)) + return ( + i.issues.push({ + input: r, + inst: e, + expected: 'set', + code: 'invalid_type', + }), + i + ); + let o = []; + i.value = new Set(); + for (let s of r) { + let u = t.valueType._zod.run({ value: s, issues: [] }, n); + u instanceof Promise ? o.push(u.then((a) => tv(a, i))) : tv(u, i); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function tv(e, t) { + (e.issues.length && t.issues.push(...e.issues), t.value.add(e.value)); + } + var kh = y('$ZodEnum', (e, t) => { + E.init(e, t); + let i = nl(t.entries), + n = new Set(i); + ((e._zod.values = n), + (e._zod.pattern = new RegExp( + `^(${i + .filter((r) => Mi.has(typeof r)) + .map((r) => (typeof r == 'string' ? Xe(r) : r.toString())) + .join('|')})$`, + )), + (e._zod.parse = (r, o) => { + let s = r.value; + return ( + n.has(s) || + r.issues.push({ + code: 'invalid_value', + values: i, + input: s, + inst: e, + }), + r + ); + })); + }), + xh = y('$ZodLiteral', (e, t) => { + if ((E.init(e, t), t.values.length === 0)) + throw new Error('Cannot create literal schema with no valid values'); + ((e._zod.values = new Set(t.values)), + (e._zod.pattern = new RegExp( + `^(${t.values.map((i) => (typeof i == 'string' ? Xe(i) : i ? Xe(i.toString()) : String(i))).join('|')})$`, + )), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + e._zod.values.has(r) || + i.issues.push({ + code: 'invalid_value', + values: t.values, + input: r, + inst: e, + }), + i + ); + })); + }), + wh = y('$ZodFile', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r instanceof File || + i.issues.push({ + expected: 'file', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + Sh = y('$ZodTransform', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Yi(e.constructor.name); + let r = t.transform(i.value, i); + if (n.async) + return (r instanceof Promise ? r : Promise.resolve(r)).then( + (o) => ((i.value = o), i), + ); + if (r instanceof Promise) throw new ft(); + return ((i.value = r), i); + })); + }); + function nv(e, t) { + return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e; + } + var Ih = y('$ZodOptional', (e, t) => { + (E.init(e, t), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + R(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, void 0]) + : void 0, + ), + R(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${Qi(i.source)})?$`) : void 0; + }), + (e._zod.parse = (i, n) => { + if (t.innerType._zod.optin === 'optional') { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => nv(o, i.value)) + : nv(r, i.value); + } + return i.value === void 0 ? i : t.innerType._zod.run(i, n); + })); + }), + zh = y('$ZodNullable', (e, t) => { + (E.init(e, t), + R(e._zod, 'optin', () => t.innerType._zod.optin), + R(e._zod, 'optout', () => t.innerType._zod.optout), + R(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${Qi(i.source)}|null)$`) : void 0; + }), + R(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, null]) + : void 0, + ), + (e._zod.parse = (i, n) => + i.value === null ? i : t.innerType._zod.run(i, n))); + }), + jh = y('$ZodDefault', (e, t) => { + (E.init(e, t), + (e._zod.optin = 'optional'), + R(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + if (i.value === void 0) return ((i.value = t.defaultValue), i); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => rv(o, t)) : rv(r, t); + })); + }); + function rv(e, t) { + return (e.value === void 0 && (e.value = t.defaultValue), e); + } + var Oh = y('$ZodPrefault', (e, t) => { + (E.init(e, t), + (e._zod.optin = 'optional'), + R(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => ( + n.direction === 'backward' || + (i.value === void 0 && (i.value = t.defaultValue)), + t.innerType._zod.run(i, n) + ))); + }), + Uh = y('$ZodNonOptional', (e, t) => { + (E.init(e, t), + R(e._zod, 'values', () => { + let i = t.innerType._zod.values; + return i ? new Set([...i].filter((n) => n !== void 0)) : void 0; + }), + (e._zod.parse = (i, n) => { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => iv(o, e)) : iv(r, e); + })); + }); + function iv(e, t) { + return ( + e.issues.length || + e.value !== void 0 || + e.issues.push({ + code: 'invalid_type', + expected: 'nonoptional', + input: e.value, + inst: t, + }), + e + ); + } + var Ph = y('$ZodSuccess', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Yi('ZodSuccess'); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => ((i.value = o.issues.length === 0), i)) + : ((i.value = r.issues.length === 0), i); + })); + }), + Nh = y('$ZodCatch', (e, t) => { + (E.init(e, t), + R(e._zod, 'optin', () => t.innerType._zod.optin), + R(e._zod, 'optout', () => t.innerType._zod.optout), + R(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then( + (o) => ( + (i.value = o.value), + o.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: o.issues.map((s) => Ie(s, n, ae())) }, + input: i.value, + })), + (i.issues = [])), + i + ), + ) + : ((i.value = r.value), + r.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: r.issues.map((o) => Ie(o, n, ae())) }, + input: i.value, + })), + (i.issues = [])), + i); + })); + }), + Dh = y('$ZodNaN', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => ( + (typeof i.value == 'number' && Number.isNaN(i.value)) || + i.issues.push({ + input: i.value, + inst: e, + expected: 'nan', + code: 'invalid_type', + }), + i + ))); + }), + Zh = y('$ZodPipe', (e, t) => { + (E.init(e, t), + R(e._zod, 'values', () => t.in._zod.values), + R(e._zod, 'optin', () => t.in._zod.optin), + R(e._zod, 'optout', () => t.out._zod.optout), + R(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') { + let o = t.out._zod.run(i, n); + return o instanceof Promise + ? o.then((s) => Ci(s, t.in, n)) + : Ci(o, t.in, n); + } + let r = t.in._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Ci(o, t.out, n)) + : Ci(r, t.out, n); + })); + }); + function Ci(e, t, i) { + return e.issues.length + ? ((e.aborted = !0), e) + : t._zod.run({ value: e.value, issues: e.issues }, i); + } + var wl = y('$ZodCodec', (e, t) => { + (E.init(e, t), + R(e._zod, 'values', () => t.in._zod.values), + R(e._zod, 'optin', () => t.in._zod.optin), + R(e._zod, 'optout', () => t.out._zod.optout), + R(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if ((n.direction || 'forward') === 'forward') { + let r = t.in._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Li(o, t, n)) + : Li(r, t, n); + } + { + let r = t.out._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Li(o, t, n)) + : Li(r, t, n); + } + })); + }); + function Li(e, t, i) { + if (e.issues.length) return ((e.aborted = !0), e); + if ((i.direction || 'forward') === 'forward') { + let n = t.transform(e.value, e); + return n instanceof Promise + ? n.then((r) => Ri(e, r, t.out, i)) + : Ri(e, n, t.out, i); + } + { + let n = t.reverseTransform(e.value, e); + return n instanceof Promise + ? n.then((r) => Ri(e, r, t.in, i)) + : Ri(e, n, t.in, i); + } + } + function Ri(e, t, i, n) { + return e.issues.length + ? ((e.aborted = !0), e) + : i._zod.run({ value: t, issues: e.issues }, n); + } + var Eh = y('$ZodReadonly', (e, t) => { + (E.init(e, t), + R(e._zod, 'propValues', () => t.innerType._zod.propValues), + R(e._zod, 'values', () => t.innerType._zod.values), + R(e._zod, 'optin', () => t.innerType._zod.optin), + R(e._zod, 'optout', () => t.innerType._zod.optout), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then(ov) : ov(r); + })); + }); + function ov(e) { + return ((e.value = Object.freeze(e.value)), e); + } + var Th = y('$ZodTemplateLiteral', (e, t) => { + E.init(e, t); + let i = []; + for (let n of t.parts) + if (typeof n == 'object' && n !== null) { + if (!n._zod.pattern) + throw new Error( + `Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`, + ); + let r = + n._zod.pattern instanceof RegExp + ? n._zod.pattern.source + : n._zod.pattern; + if (!r) + throw new Error(`Invalid template literal part: ${n._zod.traits}`); + let o = r.startsWith('^') ? 1 : 0, + s = r.endsWith('$') ? r.length - 1 : r.length; + i.push(r.slice(o, s)); + } else { + if (n !== null && !yv.has(typeof n)) + throw new Error(`Invalid template literal part: ${n}`); + i.push(Xe(`${n}`)); + } + ((e._zod.pattern = new RegExp(`^${i.join('')}$`)), + (e._zod.parse = (n, r) => { + var o; + return typeof n.value != 'string' + ? (n.issues.push({ + input: n.value, + inst: e, + expected: 'template_literal', + code: 'invalid_type', + }), + n) + : ((e._zod.pattern.lastIndex = 0), + e._zod.pattern.test(n.value) || + n.issues.push({ + input: n.value, + inst: e, + code: 'invalid_format', + format: (o = t.format) != null ? o : 'template_literal', + pattern: e._zod.pattern.source, + }), + n); + })); + }), + Ah = y( + '$ZodFunction', + (e, t) => ( + E.init(e, t), + (e._def = t), + (e._zod.def = t), + (e.implement = (i) => { + if (typeof i != 'function') + throw new Error('implement() must be called with a function'); + return function (...n) { + let r = e._def.input ? Bc(e._def.input, n) : n, + o = Reflect.apply(i, this, r); + return e._def.output ? Bc(e._def.output, o) : o; + }; + }), + (e.implementAsync = (i) => { + if (typeof i != 'function') + throw new Error('implementAsync() must be called with a function'); + return async function (...n) { + let r = e._def.input ? await Gc(e._def.input, n) : n, + o = await Reflect.apply(i, this, r); + return e._def.output ? await Gc(e._def.output, o) : o; + }; + }), + (e._zod.parse = (i, n) => { + if (typeof i.value != 'function') + return ( + i.issues.push({ + code: 'invalid_type', + expected: 'function', + input: i.value, + inst: e, + }), + i + ); + let r = e._def.output && e._def.output._zod.def.type === 'promise'; + return ( + (i.value = r ? e.implementAsync(i.value) : e.implement(i.value)), + i + ); + }), + (e.input = (...i) => { + let n = e.constructor; + return Array.isArray(i[0]) + ? new n({ + type: 'function', + input: new xl({ type: 'tuple', items: i[0], rest: i[1] }), + output: e._def.output, + }) + : new n({ type: 'function', input: i[0], output: e._def.output }); + }), + (e.output = (i) => + new e.constructor({ + type: 'function', + input: e._def.input, + output: i, + })), + e + ), + ), + Ch = y('$ZodPromise', (e, t) => { + (E.init(e, t), + (e._zod.parse = (i, n) => + Promise.resolve(i.value).then((r) => + t.innerType._zod.run({ value: r, issues: [] }, n), + ))); + }), + Lh = y('$ZodLazy', (e, t) => { + (E.init(e, t), + R(e._zod, 'innerType', () => t.getter()), + R(e._zod, 'pattern', () => e._zod.innerType._zod.pattern), + R(e._zod, 'propValues', () => e._zod.innerType._zod.propValues), + R(e._zod, 'optin', () => { + var i; + return (i = e._zod.innerType._zod.optin) != null ? i : void 0; + }), + R(e._zod, 'optout', () => { + var i; + return (i = e._zod.innerType._zod.optout) != null ? i : void 0; + }), + (e._zod.parse = (i, n) => e._zod.innerType._zod.run(i, n))); + }), + Rh = y('$ZodCustom', (e, t) => { + (K.init(e, t), + E.init(e, t), + (e._zod.parse = (i, n) => i), + (e._zod.check = (i) => { + let n = i.value, + r = t.fn(n); + if (r instanceof Promise) return r.then((o) => av(o, i, n, e)); + av(r, i, n, e); + })); + }); + function av(e, t, i, n) { + var r; + if (!e) { + let o = { + code: 'custom', + input: i, + inst: n, + path: [...((r = n._zod.def.path) != null ? r : [])], + continue: !n._zod.def.abort, + }; + (n._zod.def.params && (o.params = n._zod.def.params), + t.issues.push(Wi(o))); + } + } + var Sl = {}; + $e(Sl, { + ar: () => pz, + az: () => vz, + be: () => hz, + bg: () => yz, + ca: () => _z, + cs: () => xz, + da: () => Sz, + de: () => zz, + en: () => Jh, + eo: () => Uz, + es: () => Nz, + fa: () => Zz, + fi: () => Tz, + fr: () => Cz, + frCA: () => Rz, + he: () => Fz, + hu: () => Mz, + id: () => Bz, + is: () => Kz, + it: () => Xz, + ja: () => Yz, + ka: () => ej, + kh: () => nj, + km: () => Fh, + ko: () => ij, + lt: () => aj, + mk: () => uj, + ms: () => lj, + nl: () => mj, + no: () => fj, + ota: () => gj, + pl: () => $j, + ps: () => bj, + pt: () => kj, + ru: () => wj, + sl: () => Ij, + sv: () => jj, + ta: () => Uj, + th: () => Nj, + tr: () => Zj, + ua: () => Tj, + uk: () => Vh, + ur: () => Cj, + vi: () => Rj, + yo: () => Bj, + zhCN: () => Fj, + zhTW: () => Mj, + }); + var mz = () => { + let e = { + string: { unit: 'حرف', verb: 'أن يحوي' }, + file: { unit: 'بايت', verb: 'أن يحوي' }, + array: { unit: 'عنصر', verb: 'أن يحوي' }, + set: { unit: 'عنصر', verb: 'أن يحوي' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'مدخل', + email: 'بريد إلكتروني', + url: 'رابط', + emoji: 'إيموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاريخ ووقت بمعيار ISO', + date: 'تاريخ بمعيار ISO', + time: 'وقت بمعيار ISO', + duration: 'مدة بمعيار ISO', + ipv4: 'عنوان IPv4', + ipv6: 'عنوان IPv6', + cidrv4: 'مدى عناوين بصيغة IPv4', + cidrv6: 'مدى عناوين بصيغة IPv6', + base64: 'نَص بترميز base64-encoded', + base64url: 'نَص بترميز base64url-encoded', + json_string: 'نَص على هيئة JSON', + e164: 'رقم هاتف بمعيار E.164', + jwt: 'JWT', + template_literal: 'مدخل', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `مدخلات غير مقبولة: يفترض إدخال ${N(n.values[0])}` + : `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? ` أكبر من اللازم: يفترض أن تكون ${(r = n.origin) != null ? r : 'القيمة'} ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصر'}` + : `أكبر من اللازم: يفترض أن تكون ${(s = n.origin) != null ? s : 'القيمة'} ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${a} ${n.minimum.toString()} ${c.unit}` + : `أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"` + : a.format === 'ends_with' + ? `نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"` + : a.format === 'includes' + ? `نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"` + : a.format === 'regex' + ? `نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} غير مقبول`; + } + case 'not_multiple_of': + return `رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`; + case 'unrecognized_keys': + return `معرف${n.keys.length > 1 ? 'ات' : ''} غريب${n.keys.length > 1 ? 'ة' : ''}: ${z(n.keys, '، ')}`; + case 'invalid_key': + return `معرف غير مقبول في ${n.origin}`; + case 'invalid_union': + default: + return 'مدخل غير مقبول'; + case 'invalid_element': + return `مدخل غير مقبول في ${n.origin}`; + } + }; + }; + function pz() { + return { localeError: mz() }; + } + var fz = () => { + let e = { + string: { unit: 'simvol', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'element', verb: 'olmalıdır' }, + set: { unit: 'element', verb: 'olmalıdır' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Yanlış dəyər: gözlənilən ${N(n.values[0])}` + : `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Çox böyük: gözlənilən ${(r = n.origin) != null ? r : 'dəyər'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'element'}` + : `Çox böyük: gözlənilən ${(s = n.origin) != null ? s : 'dəyər'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Çox kiçik: gözlənilən ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `Çox kiçik: gözlənilən ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Yanlış mətn: "${a.prefix}" ilə başlamalıdır` + : a.format === 'ends_with' + ? `Yanlış mətn: "${a.suffix}" ilə bitməlidir` + : a.format === 'includes' + ? `Yanlış mətn: "${a.includes}" daxil olmalıdır` + : a.format === 'regex' + ? `Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır` + : `Yanlış ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`; + case 'unrecognized_keys': + return `Tanınmayan açar${n.keys.length > 1 ? 'lar' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} daxilində yanlış açar`; + case 'invalid_union': + default: + return 'Yanlış dəyər'; + case 'invalid_element': + return `${n.origin} daxilində yanlış dəyər`; + } + }; + }; + function vz() { + return { localeError: fz() }; + } + function sv(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var gz = () => { + let e = { + string: { + unit: { one: 'сімвал', few: 'сімвалы', many: 'сімвалаў' }, + verb: 'мець', + }, + array: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + set: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + file: { + unit: { one: 'байт', few: 'байты', many: 'байтаў' }, + verb: 'мець', + }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'увод', + email: 'email адрас', + url: 'URL', + emoji: 'эмодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата і час', + date: 'ISO дата', + time: 'ISO час', + duration: 'ISO працягласць', + ipv4: 'IPv4 адрас', + ipv6: 'IPv6 адрас', + cidrv4: 'IPv4 дыяпазон', + cidrv6: 'IPv6 дыяпазон', + base64: 'радок у фармаце base64', + base64url: 'радок у фармаце base64url', + json_string: 'JSON радок', + e164: 'нумар E.164', + jwt: 'JWT', + template_literal: 'увод', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Няправільны ўвод: чакаўся ${n.expected}, атрымана ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'лік'; + case 'object': + if (Array.isArray(u)) return 'масіў'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Няправільны ўвод: чакалася ${N(n.values[0])}` + : `Няправільны варыянт: чакаўся адзін з ${z(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + if (a) { + let c = sv(Number(n.maximum), a.unit.one, a.unit.few, a.unit.many); + return `Занадта вялікі: чакалася, што ${(r = n.origin) != null ? r : 'значэнне'} павінна ${a.verb} ${u}${n.maximum.toString()} ${c}`; + } + return `Занадта вялікі: чакалася, што ${(o = n.origin) != null ? o : 'значэнне'} павінна быць ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + if (a) { + let c = sv(Number(n.minimum), a.unit.one, a.unit.few, a.unit.many); + return `Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${u}${n.minimum.toString()} ${c}`; + } + return `Занадта малы: чакалася, што ${n.origin} павінна быць ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Няправільны радок: павінен пачынацца з "${u.prefix}"` + : u.format === 'ends_with' + ? `Няправільны радок: павінен заканчвацца на "${u.suffix}"` + : u.format === 'includes' + ? `Няправільны радок: павінен змяшчаць "${u.includes}"` + : u.format === 'regex' + ? `Няправільны радок: павінен адпавядаць шаблону ${u.pattern}` + : `Няправільны ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `Няправільны лік: павінен быць кратным ${n.divisor}`; + case 'unrecognized_keys': + return `Нераспазнаны ${n.keys.length > 1 ? 'ключы' : 'ключ'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Няправільны ключ у ${n.origin}`; + case 'invalid_union': + default: + return 'Няправільны ўвод'; + case 'invalid_element': + return `Няправільнае значэнне ў ${n.origin}`; + } + }; + }; + function hz() { + return { localeError: gz() }; + } + var bz = () => { + let e = { + string: { unit: 'символа', verb: 'да съдържа' }, + file: { unit: 'байта', verb: 'да съдържа' }, + array: { unit: 'елемента', verb: 'да съдържа' }, + set: { unit: 'елемента', verb: 'да съдържа' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'вход', + email: 'имейл адрес', + url: 'URL', + emoji: 'емоджи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO време', + date: 'ISO дата', + time: 'ISO време', + duration: 'ISO продължителност', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'base64-кодиран низ', + base64url: 'base64url-кодиран низ', + json_string: 'JSON низ', + e164: 'E.164 номер', + jwt: 'JWT', + template_literal: 'вход', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Невалиден вход: очакван ${n.expected}, получен ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(a)) return 'масив'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Невалиден вход: очакван ${N(n.values[0])}` + : `Невалидна опция: очаквано едно от ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Твърде голямо: очаква се ${(r = n.origin) != null ? r : 'стойност'} да съдържа ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елемента'}` + : `Твърде голямо: очаква се ${(s = n.origin) != null ? s : 'стойност'} да бъде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Твърде малко: очаква се ${n.origin} да съдържа ${a}${n.minimum.toString()} ${c.unit}` + : `Твърде малко: очаква се ${n.origin} да бъде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + if (a.format === 'starts_with') + return `Невалиден низ: трябва да започва с "${a.prefix}"`; + if (a.format === 'ends_with') + return `Невалиден низ: трябва да завършва с "${a.suffix}"`; + if (a.format === 'includes') + return `Невалиден низ: трябва да включва "${a.includes}"`; + if (a.format === 'regex') + return `Невалиден низ: трябва да съвпада с ${a.pattern}`; + let c = 'Невалиден'; + return ( + a.format === 'emoji' && (c = 'Невалидно'), + a.format === 'datetime' && (c = 'Невалидно'), + a.format === 'date' && (c = 'Невалидна'), + a.format === 'time' && (c = 'Невалидно'), + a.format === 'duration' && (c = 'Невалидна'), + `${c} ${(u = i[a.format]) != null ? u : n.format}` + ); + } + case 'not_multiple_of': + return `Невалидно число: трябва да бъде кратно на ${n.divisor}`; + case 'unrecognized_keys': + return `Неразпознат${n.keys.length > 1 ? 'и' : ''} ключ${n.keys.length > 1 ? 'ове' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Невалиден ключ в ${n.origin}`; + case 'invalid_union': + default: + return 'Невалиден вход'; + case 'invalid_element': + return `Невалидна стойност в ${n.origin}`; + } + }; + }; + function yz() { + return { localeError: bz() }; + } + var $z = () => { + let e = { + string: { unit: 'caràcters', verb: 'contenir' }, + file: { unit: 'bytes', verb: 'contenir' }, + array: { unit: 'elements', verb: 'contenir' }, + set: { unit: 'elements', verb: 'contenir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrada', + email: 'adreça electrònica', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'durada ISO', + ipv4: 'adreça IPv4', + ipv6: 'adreça IPv6', + cidrv4: 'rang IPv4', + cidrv6: 'rang IPv6', + base64: 'cadena codificada en base64', + base64url: 'cadena codificada en base64url', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Valor invàlid: s'esperava ${N(n.values[0])}` + : `Opció invàlida: s'esperava una de ${z(n.values, ' o ')}`; + case 'too_big': { + let a = n.inclusive ? 'com a màxim' : 'menys de', + c = t(n.origin); + return c + ? `Massa gran: s'esperava que ${(r = n.origin) != null ? r : 'el valor'} contingués ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `Massa gran: s'esperava que ${(s = n.origin) != null ? s : 'el valor'} fos ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? 'com a mínim' : 'més de', + c = t(n.origin); + return c + ? `Massa petit: s'esperava que ${n.origin} contingués ${a} ${n.minimum.toString()} ${c.unit}` + : `Massa petit: s'esperava que ${n.origin} fos ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Format invàlid: ha de començar amb "${a.prefix}"` + : a.format === 'ends_with' + ? `Format invàlid: ha d'acabar amb "${a.suffix}"` + : a.format === 'includes' + ? `Format invàlid: ha d'incloure "${a.includes}"` + : a.format === 'regex' + ? `Format invàlid: ha de coincidir amb el patró ${a.pattern}` + : `Format invàlid per a ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Número invàlid: ha de ser múltiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clau${n.keys.length > 1 ? 's' : ''} no reconeguda${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Clau invàlida a ${n.origin}`; + case 'invalid_union': + default: + return 'Entrada invàlida'; + case 'invalid_element': + return `Element invàlid a ${n.origin}`; + } + }; + }; + function _z() { + return { localeError: $z() }; + } + var kz = () => { + let e = { + string: { unit: 'znaků', verb: 'mít' }, + file: { unit: 'bajtů', verb: 'mít' }, + array: { unit: 'prvků', verb: 'mít' }, + set: { unit: 'prvků', verb: 'mít' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'regulární výraz', + email: 'e-mailová adresa', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'datum a čas ve formátu ISO', + date: 'datum ve formátu ISO', + time: 'čas ve formátu ISO', + duration: 'doba trvání ISO', + ipv4: 'IPv4 adresa', + ipv6: 'IPv6 adresa', + cidrv4: 'rozsah IPv4', + cidrv6: 'rozsah IPv6', + base64: 'řetězec zakódovaný ve formátu base64', + base64url: 'řetězec zakódovaný ve formátu base64url', + json_string: 'řetězec ve formátu JSON', + e164: 'číslo E.164', + jwt: 'JWT', + template_literal: 'vstup', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `Neplatný vstup: očekáváno ${n.expected}, obdrženo ${((p) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'číslo'; + case 'string': + return 'řetězec'; + case 'boolean': + return 'boolean'; + case 'bigint': + return 'bigint'; + case 'function': + return 'funkce'; + case 'symbol': + return 'symbol'; + case 'undefined': + return 'undefined'; + case 'object': + if (Array.isArray(p)) return 'pole'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Neplatný vstup: očekáváno ${N(n.values[0])}` + : `Neplatná možnost: očekávána jedna z hodnot ${z(n.values, '|')}`; + case 'too_big': { + let p = n.inclusive ? '<=' : '<', + f = t(n.origin); + return f + ? `Hodnota je příliš velká: ${(r = n.origin) != null ? r : 'hodnota'} musí mít ${p}${n.maximum.toString()} ${(o = f.unit) != null ? o : 'prvků'}` + : `Hodnota je příliš velká: ${(s = n.origin) != null ? s : 'hodnota'} musí být ${p}${n.maximum.toString()}`; + } + case 'too_small': { + let p = n.inclusive ? '>=' : '>', + f = t(n.origin); + return f + ? `Hodnota je příliš malá: ${(u = n.origin) != null ? u : 'hodnota'} musí mít ${p}${n.minimum.toString()} ${(a = f.unit) != null ? a : 'prvků'}` + : `Hodnota je příliš malá: ${(c = n.origin) != null ? c : 'hodnota'} musí být ${p}${n.minimum.toString()}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `Neplatný řetězec: musí začínat na "${p.prefix}"` + : p.format === 'ends_with' + ? `Neplatný řetězec: musí končit na "${p.suffix}"` + : p.format === 'includes' + ? `Neplatný řetězec: musí obsahovat "${p.includes}"` + : p.format === 'regex' + ? `Neplatný řetězec: musí odpovídat vzoru ${p.pattern}` + : `Neplatný formát ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `Neplatné číslo: musí být násobkem ${n.divisor}`; + case 'unrecognized_keys': + return `Neznámé klíče: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Neplatný klíč v ${n.origin}`; + case 'invalid_union': + default: + return 'Neplatný vstup'; + case 'invalid_element': + return `Neplatná hodnota v ${n.origin}`; + } + }; + }; + function xz() { + return { localeError: kz() }; + } + var wz = () => { + let e = { + string: { unit: 'tegn', verb: 'havde' }, + file: { unit: 'bytes', verb: 'havde' }, + array: { unit: 'elementer', verb: 'indeholdt' }, + set: { unit: 'elementer', verb: 'indeholdt' }, + }, + t = { + string: 'streng', + number: 'tal', + boolean: 'boolean', + array: 'liste', + object: 'objekt', + set: 'sæt', + file: 'fil', + }; + function i(o) { + var s; + return (s = e[o]) != null ? s : null; + } + function n(o) { + var s; + return (s = t[o]) != null ? s : o; + } + let r = { + regex: 'input', + email: 'e-mailadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslæt', + date: 'ISO-dato', + time: 'ISO-klokkeslæt', + duration: 'ISO-varighed', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodet streng', + base64url: 'base64url-kodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (o) => { + var s, u; + switch (o.code) { + case 'invalid_type': + return `Ugyldigt input: forventede ${n(o.expected)}, fik ${n( + ((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'tal'; + case 'object': + return Array.isArray(a) + ? 'liste' + : a === null + ? 'null' + : Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ? a.constructor.name + : 'objekt'; + } + return c; + })(o.input), + )}`; + case 'invalid_value': + return o.values.length === 1 + ? `Ugyldig værdi: forventede ${N(o.values[0])}` + : `Ugyldigt valg: forventede en af følgende ${z(o.values, '|')}`; + case 'too_big': { + let a = o.inclusive ? '<=' : '<', + c = i(o.origin), + m = n(o.origin); + return c + ? `For stor: forventede ${m ?? 'value'} ${c.verb} ${a} ${o.maximum.toString()} ${(s = c.unit) != null ? s : 'elementer'}` + : `For stor: forventede ${m ?? 'value'} havde ${a} ${o.maximum.toString()}`; + } + case 'too_small': { + let a = o.inclusive ? '>=' : '>', + c = i(o.origin), + m = n(o.origin); + return c + ? `For lille: forventede ${m} ${c.verb} ${a} ${o.minimum.toString()} ${c.unit}` + : `For lille: forventede ${m} havde ${a} ${o.minimum.toString()}`; + } + case 'invalid_format': { + let a = o; + return a.format === 'starts_with' + ? `Ugyldig streng: skal starte med "${a.prefix}"` + : a.format === 'ends_with' + ? `Ugyldig streng: skal ende med "${a.suffix}"` + : a.format === 'includes' + ? `Ugyldig streng: skal indeholde "${a.includes}"` + : a.format === 'regex' + ? `Ugyldig streng: skal matche mønsteret ${a.pattern}` + : `Ugyldig ${(u = r[a.format]) != null ? u : o.format}`; + } + case 'not_multiple_of': + return `Ugyldigt tal: skal være deleligt med ${o.divisor}`; + case 'unrecognized_keys': + return `${o.keys.length > 1 ? 'Ukendte nøgler' : 'Ukendt nøgle'}: ${z(o.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøgle i ${o.origin}`; + case 'invalid_union': + return 'Ugyldigt input: matcher ingen af de tilladte typer'; + case 'invalid_element': + return `Ugyldig værdi i ${o.origin}`; + default: + return 'Ugyldigt input'; + } + }; + }; + function Sz() { + return { localeError: wz() }; + } + var Iz = () => { + let e = { + string: { unit: 'Zeichen', verb: 'zu haben' }, + file: { unit: 'Bytes', verb: 'zu haben' }, + array: { unit: 'Elemente', verb: 'zu haben' }, + set: { unit: 'Elemente', verb: 'zu haben' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'Eingabe', + email: 'E-Mail-Adresse', + url: 'URL', + emoji: 'Emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-Datum und -Uhrzeit', + date: 'ISO-Datum', + time: 'ISO-Uhrzeit', + duration: 'ISO-Dauer', + ipv4: 'IPv4-Adresse', + ipv6: 'IPv6-Adresse', + cidrv4: 'IPv4-Bereich', + cidrv6: 'IPv6-Bereich', + base64: 'Base64-codierter String', + base64url: 'Base64-URL-codierter String', + json_string: 'JSON-String', + e164: 'E.164-Nummer', + jwt: 'JWT', + template_literal: 'Eingabe', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ungültige Eingabe: erwartet ${n.expected}, erhalten ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'Zahl'; + case 'object': + if (Array.isArray(a)) return 'Array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ungültige Eingabe: erwartet ${N(n.values[0])}` + : `Ungültige Option: erwartet eine von ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Zu groß: erwartet, dass ${(r = n.origin) != null ? r : 'Wert'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'Elemente'} hat` + : `Zu groß: erwartet, dass ${(s = n.origin) != null ? s : 'Wert'} ${a}${n.maximum.toString()} ist`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ${c.unit} hat` + : `Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ist`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ungültiger String: muss mit "${a.prefix}" beginnen` + : a.format === 'ends_with' + ? `Ungültiger String: muss mit "${a.suffix}" enden` + : a.format === 'includes' + ? `Ungültiger String: muss "${a.includes}" enthalten` + : a.format === 'regex' + ? `Ungültiger String: muss dem Muster ${a.pattern} entsprechen` + : `Ungültig: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Unbekannte Schlüssel' : 'Unbekannter Schlüssel'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Ungültiger Schlüssel in ${n.origin}`; + case 'invalid_union': + default: + return 'Ungültige Eingabe'; + case 'invalid_element': + return `Ungültiger Wert in ${n.origin}`; + } + }; + }; + function zz() { + return { localeError: Iz() }; + } + var jz = () => { + let e = { + string: { unit: 'characters', verb: 'to have' }, + file: { unit: 'bytes', verb: 'to have' }, + array: { unit: 'items', verb: 'to have' }, + set: { unit: 'items', verb: 'to have' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Invalid input: expected ${n.expected}, received ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Invalid input: expected ${N(n.values[0])}` + : `Invalid option: expected one of ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Too big: expected ${(r = n.origin) != null ? r : 'value'} to have ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `Too big: expected ${(s = n.origin) != null ? s : 'value'} to be ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Too small: expected ${n.origin} to have ${a}${n.minimum.toString()} ${c.unit}` + : `Too small: expected ${n.origin} to be ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Invalid string: must start with "${a.prefix}"` + : a.format === 'ends_with' + ? `Invalid string: must end with "${a.suffix}"` + : a.format === 'includes' + ? `Invalid string: must include "${a.includes}"` + : a.format === 'regex' + ? `Invalid string: must match pattern ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Invalid number: must be a multiple of ${n.divisor}`; + case 'unrecognized_keys': + return `Unrecognized key${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Invalid key in ${n.origin}`; + case 'invalid_union': + default: + return 'Invalid input'; + case 'invalid_element': + return `Invalid value in ${n.origin}`; + } + }; + }; + function Jh() { + return { localeError: jz() }; + } + var Oz = () => { + let e = { + string: { unit: 'karaktrojn', verb: 'havi' }, + file: { unit: 'bajtojn', verb: 'havi' }, + array: { unit: 'elementojn', verb: 'havi' }, + set: { unit: 'elementojn', verb: 'havi' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'enigo', + email: 'retadreso', + url: 'URL', + emoji: 'emoĝio', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datotempo', + date: 'ISO-dato', + time: 'ISO-tempo', + duration: 'ISO-daŭro', + ipv4: 'IPv4-adreso', + ipv6: 'IPv6-adreso', + cidrv4: 'IPv4-rango', + cidrv6: 'IPv6-rango', + base64: '64-ume kodita karaktraro', + base64url: 'URL-64-ume kodita karaktraro', + json_string: 'JSON-karaktraro', + e164: 'E.164-nombro', + jwt: 'JWT', + template_literal: 'enigo', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Nevalida enigo: atendiĝis ${n.expected}, riceviĝis ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombro'; + case 'object': + if (Array.isArray(a)) return 'tabelo'; + if (a === null) return 'senvalora'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Nevalida enigo: atendiĝis ${N(n.values[0])}` + : `Nevalida opcio: atendiĝis unu el ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Tro granda: atendiĝis ke ${(r = n.origin) != null ? r : 'valoro'} havu ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementojn'}` + : `Tro granda: atendiĝis ke ${(s = n.origin) != null ? s : 'valoro'} havu ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Tro malgranda: atendiĝis ke ${n.origin} havu ${a}${n.minimum.toString()} ${c.unit}` + : `Tro malgranda: atendiĝis ke ${n.origin} estu ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Nevalida karaktraro: devas komenciĝi per "${a.prefix}"` + : a.format === 'ends_with' + ? `Nevalida karaktraro: devas finiĝi per "${a.suffix}"` + : a.format === 'includes' + ? `Nevalida karaktraro: devas inkluzivi "${a.includes}"` + : a.format === 'regex' + ? `Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}` + : `Nevalida ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Nevalida nombro: devas esti oblo de ${n.divisor}`; + case 'unrecognized_keys': + return `Nekonata${n.keys.length > 1 ? 'j' : ''} ŝlosilo${n.keys.length > 1 ? 'j' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Nevalida ŝlosilo en ${n.origin}`; + case 'invalid_union': + default: + return 'Nevalida enigo'; + case 'invalid_element': + return `Nevalida valoro en ${n.origin}`; + } + }; + }; + function Uz() { + return { localeError: Oz() }; + } + var Pz = () => { + let e = { + string: { unit: 'caracteres', verb: 'tener' }, + file: { unit: 'bytes', verb: 'tener' }, + array: { unit: 'elementos', verb: 'tener' }, + set: { unit: 'elementos', verb: 'tener' }, + }, + t = { + string: 'texto', + number: 'número', + boolean: 'booleano', + array: 'arreglo', + object: 'objeto', + set: 'conjunto', + file: 'archivo', + date: 'fecha', + bigint: 'número grande', + symbol: 'símbolo', + undefined: 'indefinido', + null: 'nulo', + function: 'función', + map: 'mapa', + record: 'registro', + tuple: 'tupla', + enum: 'enumeración', + union: 'unión', + literal: 'literal', + promise: 'promesa', + void: 'vacío', + never: 'nunca', + unknown: 'desconocido', + any: 'cualquiera', + }; + function i(o) { + var s; + return (s = e[o]) != null ? s : null; + } + function n(o) { + var s; + return (s = t[o]) != null ? s : o; + } + let r = { + regex: 'entrada', + email: 'dirección de correo electrónico', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'fecha y hora ISO', + date: 'fecha ISO', + time: 'hora ISO', + duration: 'duración ISO', + ipv4: 'dirección IPv4', + ipv6: 'dirección IPv6', + cidrv4: 'rango IPv4', + cidrv6: 'rango IPv6', + base64: 'cadena codificada en base64', + base64url: 'URL codificada en base64', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (o) => { + var s, u; + switch (o.code) { + case 'invalid_type': + return `Entrada inválida: se esperaba ${n(o.expected)}, recibido ${n( + ((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + return Array.isArray(a) + ? 'array' + : a === null + ? 'null' + : Object.getPrototypeOf(a) !== Object.prototype + ? a.constructor.name + : 'object'; + } + return c; + })(o.input), + )}`; + case 'invalid_value': + return o.values.length === 1 + ? `Entrada inválida: se esperaba ${N(o.values[0])}` + : `Opción inválida: se esperaba una de ${z(o.values, '|')}`; + case 'too_big': { + let a = o.inclusive ? '<=' : '<', + c = i(o.origin), + m = n(o.origin); + return c + ? `Demasiado grande: se esperaba que ${m ?? 'valor'} tuviera ${a}${o.maximum.toString()} ${(s = c.unit) != null ? s : 'elementos'}` + : `Demasiado grande: se esperaba que ${m ?? 'valor'} fuera ${a}${o.maximum.toString()}`; + } + case 'too_small': { + let a = o.inclusive ? '>=' : '>', + c = i(o.origin), + m = n(o.origin); + return c + ? `Demasiado pequeño: se esperaba que ${m} tuviera ${a}${o.minimum.toString()} ${c.unit}` + : `Demasiado pequeño: se esperaba que ${m} fuera ${a}${o.minimum.toString()}`; + } + case 'invalid_format': { + let a = o; + return a.format === 'starts_with' + ? `Cadena inválida: debe comenzar con "${a.prefix}"` + : a.format === 'ends_with' + ? `Cadena inválida: debe terminar en "${a.suffix}"` + : a.format === 'includes' + ? `Cadena inválida: debe incluir "${a.includes}"` + : a.format === 'regex' + ? `Cadena inválida: debe coincidir con el patrón ${a.pattern}` + : `Inválido ${(u = r[a.format]) != null ? u : o.format}`; + } + case 'not_multiple_of': + return `Número inválido: debe ser múltiplo de ${o.divisor}`; + case 'unrecognized_keys': + return `Llave${o.keys.length > 1 ? 's' : ''} desconocida${o.keys.length > 1 ? 's' : ''}: ${z(o.keys, ', ')}`; + case 'invalid_key': + return `Llave inválida en ${n(o.origin)}`; + case 'invalid_union': + default: + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido en ${n(o.origin)}`; + } + }; + }; + function Nz() { + return { localeError: Pz() }; + } + var Dz = () => { + let e = { + string: { unit: 'کاراکتر', verb: 'داشته باشد' }, + file: { unit: 'بایت', verb: 'داشته باشد' }, + array: { unit: 'آیتم', verb: 'داشته باشد' }, + set: { unit: 'آیتم', verb: 'داشته باشد' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ورودی', + email: 'آدرس ایمیل', + url: 'URL', + emoji: 'ایموجی', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاریخ و زمان ایزو', + date: 'تاریخ ایزو', + time: 'زمان ایزو', + duration: 'مدت زمان ایزو', + ipv4: 'IPv4 آدرس', + ipv6: 'IPv6 آدرس', + cidrv4: 'IPv4 دامنه', + cidrv6: 'IPv6 دامنه', + base64: 'base64-encoded رشته', + base64url: 'base64url-encoded رشته', + json_string: 'JSON رشته', + e164: 'E.164 عدد', + jwt: 'JWT', + template_literal: 'ورودی', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ورودی نامعتبر: می‌بایست ${n.expected} می‌بود، ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'عدد'; + case 'object': + if (Array.isArray(a)) return 'آرایه'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} دریافت شد`; + case 'invalid_value': + return n.values.length === 1 + ? `ورودی نامعتبر: می‌بایست ${N(n.values[0])} می‌بود` + : `گزینه نامعتبر: می‌بایست یکی از ${z(n.values, '|')} می‌بود`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `خیلی بزرگ: ${(r = n.origin) != null ? r : 'مقدار'} باید ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصر'} باشد` + : `خیلی بزرگ: ${(s = n.origin) != null ? s : 'مقدار'} باید ${a}${n.maximum.toString()} باشد`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `خیلی کوچک: ${n.origin} باید ${a}${n.minimum.toString()} ${c.unit} باشد` + : `خیلی کوچک: ${n.origin} باید ${a}${n.minimum.toString()} باشد`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `رشته نامعتبر: باید با "${a.prefix}" شروع شود` + : a.format === 'ends_with' + ? `رشته نامعتبر: باید با "${a.suffix}" تمام شود` + : a.format === 'includes' + ? `رشته نامعتبر: باید شامل "${a.includes}" باشد` + : a.format === 'regex' + ? `رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد` + : `${(u = i[a.format]) != null ? u : n.format} نامعتبر`; + } + case 'not_multiple_of': + return `عدد نامعتبر: باید مضرب ${n.divisor} باشد`; + case 'unrecognized_keys': + return `کلید${n.keys.length > 1 ? 'های' : ''} ناشناس: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `کلید ناشناس در ${n.origin}`; + case 'invalid_union': + default: + return 'ورودی نامعتبر'; + case 'invalid_element': + return `مقدار نامعتبر در ${n.origin}`; + } + }; + }; + function Zz() { + return { localeError: Dz() }; + } + var Ez = () => { + let e = { + string: { unit: 'merkkiä', subject: 'merkkijonon' }, + file: { unit: 'tavua', subject: 'tiedoston' }, + array: { unit: 'alkiota', subject: 'listan' }, + set: { unit: 'alkiota', subject: 'joukon' }, + number: { unit: '', subject: 'luvun' }, + bigint: { unit: '', subject: 'suuren kokonaisluvun' }, + int: { unit: '', subject: 'kokonaisluvun' }, + date: { unit: '', subject: 'päivämäärän' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'säännöllinen lauseke', + email: 'sähköpostiosoite', + url: 'URL-osoite', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-aikaleima', + date: 'ISO-päivämäärä', + time: 'ISO-aika', + duration: 'ISO-kesto', + ipv4: 'IPv4-osoite', + ipv6: 'IPv6-osoite', + cidrv4: 'IPv4-alue', + cidrv6: 'IPv6-alue', + base64: 'base64-koodattu merkkijono', + base64url: 'base64url-koodattu merkkijono', + json_string: 'JSON-merkkijono', + e164: 'E.164-luku', + jwt: 'JWT', + template_literal: 'templaattimerkkijono', + }; + return (n) => { + var r; + switch (n.code) { + case 'invalid_type': + return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${((o) => { + let s = typeof o; + switch (s) { + case 'number': + return Number.isNaN(o) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(o)) return 'array'; + if (o === null) return 'null'; + if ( + Object.getPrototypeOf(o) !== Object.prototype && + o.constructor + ) + return o.constructor.name; + } + return s; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Virheellinen syöte: täytyy olla ${N(n.values[0])}` + : `Virheellinen valinta: täytyy olla yksi seuraavista: ${z(n.values, '|')}`; + case 'too_big': { + let o = n.inclusive ? '<=' : '<', + s = t(n.origin); + return s + ? `Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim() + : `Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`; + } + case 'too_small': { + let o = n.inclusive ? '>=' : '>', + s = t(n.origin); + return s + ? `Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim() + : `Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`; + } + case 'invalid_format': { + let o = n; + return o.format === 'starts_with' + ? `Virheellinen syöte: täytyy alkaa "${o.prefix}"` + : o.format === 'ends_with' + ? `Virheellinen syöte: täytyy loppua "${o.suffix}"` + : o.format === 'includes' + ? `Virheellinen syöte: täytyy sisältää "${o.includes}"` + : o.format === 'regex' + ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}` + : `Virheellinen ${(r = i[o.format]) != null ? r : n.format}`; + } + case 'not_multiple_of': + return `Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Tuntemattomat avaimet' : 'Tuntematon avain'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return 'Virheellinen avain tietueessa'; + case 'invalid_union': + return 'Virheellinen unioni'; + case 'invalid_element': + return 'Virheellinen arvo joukossa'; + default: + return 'Virheellinen syöte'; + } + }; + }; + function Tz() { + return { localeError: Ez() }; + } + var Az = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrée', + email: 'adresse e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date et heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Entrée invalide : ${n.expected} attendu, ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombre'; + case 'object': + if (Array.isArray(a)) return 'tableau'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} reçu`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrée invalide : ${N(n.values[0])} attendu` + : `Option invalide : une valeur parmi ${z(n.values, '|')} attendue`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Trop grand : ${(r = n.origin) != null ? r : 'valeur'} doit ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'élément(s)'}` + : `Trop grand : ${(s = n.origin) != null ? s : 'valeur'} doit être ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Trop petit : ${n.origin} doit ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Trop petit : ${n.origin} doit être ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${a.prefix}"` + : a.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${a.suffix}"` + : a.format === 'includes' + ? `Chaîne invalide : doit inclure "${a.includes}"` + : a.format === 'regex' + ? `Chaîne invalide : doit correspondre au modèle ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clé${n.keys.length > 1 ? 's' : ''} non reconnue${n.keys.length > 1 ? 's' : ''} : ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${n.origin}`; + case 'invalid_union': + default: + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${n.origin}`; + } + }; + }; + function Cz() { + return { localeError: Az() }; + } + var Lz = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrée', + email: 'adresse courriel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date-heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Entrée invalide : attendu ${n.expected}, reçu ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(u)) return 'array'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrée invalide : attendu ${N(n.values[0])}` + : `Option invalide : attendu l'une des valeurs suivantes ${z(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '≤' : '<', + a = t(n.origin); + return a + ? `Trop grand : attendu que ${(r = n.origin) != null ? r : 'la valeur'} ait ${u}${n.maximum.toString()} ${a.unit}` + : `Trop grand : attendu que ${(o = n.origin) != null ? o : 'la valeur'} soit ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '≥' : '>', + a = t(n.origin); + return a + ? `Trop petit : attendu que ${n.origin} ait ${u}${n.minimum.toString()} ${a.unit}` + : `Trop petit : attendu que ${n.origin} soit ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${u.prefix}"` + : u.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${u.suffix}"` + : u.format === 'includes' + ? `Chaîne invalide : doit inclure "${u.includes}"` + : u.format === 'regex' + ? `Chaîne invalide : doit correspondre au motif ${u.pattern}` + : `${(s = i[u.format]) != null ? s : n.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clé${n.keys.length > 1 ? 's' : ''} non reconnue${n.keys.length > 1 ? 's' : ''} : ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${n.origin}`; + case 'invalid_union': + default: + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${n.origin}`; + } + }; + }; + function Rz() { + return { localeError: Lz() }; + } + var Jz = () => { + let e = { + string: { unit: 'אותיות', verb: 'לכלול' }, + file: { unit: 'בייטים', verb: 'לכלול' }, + array: { unit: 'פריטים', verb: 'לכלול' }, + set: { unit: 'פריטים', verb: 'לכלול' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'קלט', + email: 'כתובת אימייל', + url: 'כתובת רשת', + emoji: "אימוג'י", + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'תאריך וזמן ISO', + date: 'תאריך ISO', + time: 'זמן ISO', + duration: 'משך זמן ISO', + ipv4: 'כתובת IPv4', + ipv6: 'כתובת IPv6', + cidrv4: 'טווח IPv4', + cidrv6: 'טווח IPv6', + base64: 'מחרוזת בבסיס 64', + base64url: 'מחרוזת בבסיס 64 לכתובות רשת', + json_string: 'מחרוזת JSON', + e164: 'מספר E.164', + jwt: 'JWT', + template_literal: 'קלט', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `קלט לא תקין: צריך ${n.expected}, התקבל ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `קלט לא תקין: צריך ${N(n.values[0])}` + : `קלט לא תקין: צריך אחת מהאפשרויות ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `גדול מדי: ${(r = n.origin) != null ? r : 'value'} צריך להיות ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `גדול מדי: ${(s = n.origin) != null ? s : 'value'} צריך להיות ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `קטן מדי: ${n.origin} צריך להיות ${a}${n.minimum.toString()} ${c.unit}` + : `קטן מדי: ${n.origin} צריך להיות ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `מחרוזת לא תקינה: חייבת להתחיל ב"${a.prefix}"` + : a.format === 'ends_with' + ? `מחרוזת לא תקינה: חייבת להסתיים ב "${a.suffix}"` + : a.format === 'includes' + ? `מחרוזת לא תקינה: חייבת לכלול "${a.includes}"` + : a.format === 'regex' + ? `מחרוזת לא תקינה: חייבת להתאים לתבנית ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} לא תקין`; + } + case 'not_multiple_of': + return `מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`; + case 'unrecognized_keys': + return `מפתח${n.keys.length > 1 ? 'ות' : ''} לא מזוה${n.keys.length > 1 ? 'ים' : 'ה'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `מפתח לא תקין ב${n.origin}`; + case 'invalid_union': + default: + return 'קלט לא תקין'; + case 'invalid_element': + return `ערך לא תקין ב${n.origin}`; + } + }; + }; + function Fz() { + return { localeError: Jz() }; + } + var Vz = () => { + let e = { + string: { unit: 'karakter', verb: 'legyen' }, + file: { unit: 'byte', verb: 'legyen' }, + array: { unit: 'elem', verb: 'legyen' }, + set: { unit: 'elem', verb: 'legyen' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'bemenet', + email: 'email cím', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO időbélyeg', + date: 'ISO dátum', + time: 'ISO idő', + duration: 'ISO időintervallum', + ipv4: 'IPv4 cím', + ipv6: 'IPv6 cím', + cidrv4: 'IPv4 tartomány', + cidrv6: 'IPv6 tartomány', + base64: 'base64-kódolt string', + base64url: 'base64url-kódolt string', + json_string: 'JSON string', + e164: 'E.164 szám', + jwt: 'JWT', + template_literal: 'bemenet', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'szám'; + case 'object': + if (Array.isArray(a)) return 'tömb'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Érvénytelen bemenet: a várt érték ${N(n.values[0])}` + : `Érvénytelen opció: valamelyik érték várt ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Túl nagy: ${(r = n.origin) != null ? r : 'érték'} mérete túl nagy ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elem'}` + : `Túl nagy: a bemeneti érték ${(s = n.origin) != null ? s : 'érték'} túl nagy: ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${a}${n.minimum.toString()} ${c.unit}` + : `Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie` + : a.format === 'ends_with' + ? `Érvénytelen string: "${a.suffix}" értékkel kell végződnie` + : a.format === 'includes' + ? `Érvénytelen string: "${a.includes}" értéket kell tartalmaznia` + : a.format === 'regex' + ? `Érvénytelen string: ${a.pattern} mintának kell megfelelnie` + : `Érvénytelen ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Érvénytelen szám: ${n.divisor} többszörösének kell lennie`; + case 'unrecognized_keys': + return `Ismeretlen kulcs${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Érvénytelen kulcs ${n.origin}`; + case 'invalid_union': + default: + return 'Érvénytelen bemenet'; + case 'invalid_element': + return `Érvénytelen érték: ${n.origin}`; + } + }; + }; + function Mz() { + return { localeError: Vz() }; + } + var Wz = () => { + let e = { + string: { unit: 'karakter', verb: 'memiliki' }, + file: { unit: 'byte', verb: 'memiliki' }, + array: { unit: 'item', verb: 'memiliki' }, + set: { unit: 'item', verb: 'memiliki' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'alamat email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tanggal dan waktu format ISO', + date: 'tanggal format ISO', + time: 'jam format ISO', + duration: 'durasi format ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'rentang alamat IPv4', + cidrv6: 'rentang alamat IPv6', + base64: 'string dengan enkode base64', + base64url: 'string dengan enkode base64url', + json_string: 'string JSON', + e164: 'angka E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input tidak valid: diharapkan ${n.expected}, diterima ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input tidak valid: diharapkan ${N(n.values[0])}` + : `Pilihan tidak valid: diharapkan salah satu dari ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Terlalu besar: diharapkan ${(r = n.origin) != null ? r : 'value'} memiliki ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elemen'}` + : `Terlalu besar: diharapkan ${(s = n.origin) != null ? s : 'value'} menjadi ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Terlalu kecil: diharapkan ${n.origin} memiliki ${a}${n.minimum.toString()} ${c.unit}` + : `Terlalu kecil: diharapkan ${n.origin} menjadi ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `String tidak valid: harus dimulai dengan "${a.prefix}"` + : a.format === 'ends_with' + ? `String tidak valid: harus berakhir dengan "${a.suffix}"` + : a.format === 'includes' + ? `String tidak valid: harus menyertakan "${a.includes}"` + : a.format === 'regex' + ? `String tidak valid: harus sesuai pola ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} tidak valid`; + } + case 'not_multiple_of': + return `Angka tidak valid: harus kelipatan dari ${n.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali ${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak valid di ${n.origin}`; + case 'invalid_union': + default: + return 'Input tidak valid'; + case 'invalid_element': + return `Nilai tidak valid di ${n.origin}`; + } + }; + }; + function Bz() { + return { localeError: Wz() }; + } + var Gz = () => { + let e = { + string: { unit: 'stafi', verb: 'að hafa' }, + file: { unit: 'bæti', verb: 'að hafa' }, + array: { unit: 'hluti', verb: 'að hafa' }, + set: { unit: 'hluti', verb: 'að hafa' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'gildi', + email: 'netfang', + url: 'vefslóð', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dagsetning og tími', + date: 'ISO dagsetning', + time: 'ISO tími', + duration: 'ISO tímalengd', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded strengur', + base64url: 'base64url-encoded strengur', + json_string: 'JSON strengur', + e164: 'E.164 tölugildi', + jwt: 'JWT', + template_literal: 'gildi', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Rangt gildi: Þú slóst inn ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'númer'; + case 'object': + if (Array.isArray(a)) return 'fylki'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} þar sem á að vera ${n.expected}`; + case 'invalid_value': + return n.values.length === 1 + ? `Rangt gildi: gert ráð fyrir ${N(n.values[0])}` + : `Ógilt val: má vera eitt af eftirfarandi ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Of stórt: gert er ráð fyrir að ${(r = n.origin) != null ? r : 'gildi'} hafi ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'hluti'}` + : `Of stórt: gert er ráð fyrir að ${(s = n.origin) != null ? s : 'gildi'} sé ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Of lítið: gert er ráð fyrir að ${n.origin} hafi ${a}${n.minimum.toString()} ${c.unit}` + : `Of lítið: gert er ráð fyrir að ${n.origin} sé ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ógildur strengur: verður að byrja á "${a.prefix}"` + : a.format === 'ends_with' + ? `Ógildur strengur: verður að enda á "${a.suffix}"` + : a.format === 'includes' + ? `Ógildur strengur: verður að innihalda "${a.includes}"` + : a.format === 'regex' + ? `Ógildur strengur: verður að fylgja mynstri ${a.pattern}` + : `Rangt ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Röng tala: verður að vera margfeldi af ${n.divisor}`; + case 'unrecognized_keys': + return `Óþekkt ${n.keys.length > 1 ? 'ir lyklar' : 'ur lykill'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Rangur lykill í ${n.origin}`; + case 'invalid_union': + default: + return 'Rangt gildi'; + case 'invalid_element': + return `Rangt gildi í ${n.origin}`; + } + }; + }; + function Kz() { + return { localeError: Gz() }; + } + var qz = () => { + let e = { + string: { unit: 'caratteri', verb: 'avere' }, + file: { unit: 'byte', verb: 'avere' }, + array: { unit: 'elementi', verb: 'avere' }, + set: { unit: 'elementi', verb: 'avere' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'indirizzo email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e ora ISO', + date: 'data ISO', + time: 'ora ISO', + duration: 'durata ISO', + ipv4: 'indirizzo IPv4', + ipv6: 'indirizzo IPv6', + cidrv4: 'intervallo IPv4', + cidrv6: 'intervallo IPv6', + base64: 'stringa codificata in base64', + base64url: 'URL codificata in base64', + json_string: 'stringa JSON', + e164: 'numero E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input non valido: atteso ${n.expected}, ricevuto ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'numero'; + case 'object': + if (Array.isArray(a)) return 'vettore'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input non valido: atteso ${N(n.values[0])}` + : `Opzione non valida: atteso uno tra ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Troppo grande: ${(r = n.origin) != null ? r : 'valore'} deve avere ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementi'}` + : `Troppo grande: ${(s = n.origin) != null ? s : 'valore'} deve essere ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Troppo piccolo: ${n.origin} deve avere ${a}${n.minimum.toString()} ${c.unit}` + : `Troppo piccolo: ${n.origin} deve essere ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Stringa non valida: deve iniziare con "${a.prefix}"` + : a.format === 'ends_with' + ? `Stringa non valida: deve terminare con "${a.suffix}"` + : a.format === 'includes' + ? `Stringa non valida: deve includere "${a.includes}"` + : a.format === 'regex' + ? `Stringa non valida: deve corrispondere al pattern ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Numero non valido: deve essere un multiplo di ${n.divisor}`; + case 'unrecognized_keys': + return `Chiav${n.keys.length > 1 ? 'i' : 'e'} non riconosciut${n.keys.length > 1 ? 'e' : 'a'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Chiave non valida in ${n.origin}`; + case 'invalid_union': + default: + return 'Input non valido'; + case 'invalid_element': + return `Valore non valido in ${n.origin}`; + } + }; + }; + function Xz() { + return { localeError: qz() }; + } + var Hz = () => { + let e = { + string: { unit: '文字', verb: 'である' }, + file: { unit: 'バイト', verb: 'である' }, + array: { unit: '要素', verb: 'である' }, + set: { unit: '要素', verb: 'である' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '入力値', + email: 'メールアドレス', + url: 'URL', + emoji: '絵文字', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日時', + date: 'ISO日付', + time: 'ISO時刻', + duration: 'ISO期間', + ipv4: 'IPv4アドレス', + ipv6: 'IPv6アドレス', + cidrv4: 'IPv4範囲', + cidrv6: 'IPv6範囲', + base64: 'base64エンコード文字列', + base64url: 'base64urlエンコード文字列', + json_string: 'JSON文字列', + e164: 'E.164番号', + jwt: 'JWT', + template_literal: '入力値', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `無効な入力: ${n.expected}が期待されましたが、${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : '数値'; + case 'object': + if (Array.isArray(a)) return '配列'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}が入力されました`; + case 'invalid_value': + return n.values.length === 1 + ? `無効な入力: ${N(n.values[0])}が期待されました` + : `無効な選択: ${z(n.values, '、')}のいずれかである必要があります`; + case 'too_big': { + let a = n.inclusive ? '以下である' : 'より小さい', + c = t(n.origin); + return c + ? `大きすぎる値: ${(r = n.origin) != null ? r : '値'}は${n.maximum.toString()}${(o = c.unit) != null ? o : '要素'}${a}必要があります` + : `大きすぎる値: ${(s = n.origin) != null ? s : '値'}は${n.maximum.toString()}${a}必要があります`; + } + case 'too_small': { + let a = n.inclusive ? '以上である' : 'より大きい', + c = t(n.origin); + return c + ? `小さすぎる値: ${n.origin}は${n.minimum.toString()}${c.unit}${a}必要があります` + : `小さすぎる値: ${n.origin}は${n.minimum.toString()}${a}必要があります`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `無効な文字列: "${a.prefix}"で始まる必要があります` + : a.format === 'ends_with' + ? `無効な文字列: "${a.suffix}"で終わる必要があります` + : a.format === 'includes' + ? `無効な文字列: "${a.includes}"を含む必要があります` + : a.format === 'regex' + ? `無効な文字列: パターン${a.pattern}に一致する必要があります` + : `無効な${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `無効な数値: ${n.divisor}の倍数である必要があります`; + case 'unrecognized_keys': + return `認識されていないキー${n.keys.length > 1 ? '群' : ''}: ${z(n.keys, '、')}`; + case 'invalid_key': + return `${n.origin}内の無効なキー`; + case 'invalid_union': + default: + return '無効な入力'; + case 'invalid_element': + return `${n.origin}内の無効な値`; + } + }; + }; + function Yz() { + return { localeError: Hz() }; + } + var Qz = () => { + let e = { + string: { unit: 'სიმბოლო', verb: 'უნდა შეიცავდეს' }, + file: { unit: 'ბაიტი', verb: 'უნდა შეიცავდეს' }, + array: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + set: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'შეყვანა', + email: 'ელ-ფოსტის მისამართი', + url: 'URL', + emoji: 'ემოჯი', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'თარიღი-დრო', + date: 'თარიღი', + time: 'დრო', + duration: 'ხანგრძლივობა', + ipv4: 'IPv4 მისამართი', + ipv6: 'IPv6 მისამართი', + cidrv4: 'IPv4 დიაპაზონი', + cidrv6: 'IPv6 დიაპაზონი', + base64: 'base64-კოდირებული სტრინგი', + base64url: 'base64url-კოდირებული სტრინგი', + json_string: 'JSON სტრინგი', + e164: 'E.164 ნომერი', + jwt: 'JWT', + template_literal: 'შეყვანა', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `არასწორი შეყვანა: მოსალოდნელი ${n.expected}, მიღებული ${(( + u, + ) => { + var a; + let c = typeof u; + switch (c) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'რიცხვი'; + case 'object': + if (Array.isArray(u)) return 'მასივი'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return (a = { + string: 'სტრინგი', + boolean: 'ბულეანი', + undefined: 'undefined', + bigint: 'bigint', + symbol: 'symbol', + function: 'ფუნქცია', + }[c]) != null + ? a + : c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `არასწორი შეყვანა: მოსალოდნელი ${N(n.values[0])}` + : `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${z(n.values, '|')}-დან`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + return a + ? `ზედმეტად დიდი: მოსალოდნელი ${(r = n.origin) != null ? r : 'მნიშვნელობა'} ${a.verb} ${u}${n.maximum.toString()} ${a.unit}` + : `ზედმეტად დიდი: მოსალოდნელი ${(o = n.origin) != null ? o : 'მნიშვნელობა'} იყოს ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + return a + ? `ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${u}${n.minimum.toString()} ${a.unit}` + : `ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `არასწორი სტრინგი: უნდა იწყებოდეს "${u.prefix}"-ით` + : u.format === 'ends_with' + ? `არასწორი სტრინგი: უნდა მთავრდებოდეს "${u.suffix}"-ით` + : u.format === 'includes' + ? `არასწორი სტრინგი: უნდა შეიცავდეს "${u.includes}"-ს` + : u.format === 'regex' + ? `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${u.pattern}` + : `არასწორი ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`; + case 'unrecognized_keys': + return `უცნობი გასაღებ${n.keys.length > 1 ? 'ები' : 'ი'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `არასწორი გასაღები ${n.origin}-ში`; + case 'invalid_union': + default: + return 'არასწორი შეყვანა'; + case 'invalid_element': + return `არასწორი მნიშვნელობა ${n.origin}-ში`; + } + }; + }; + function ej() { + return { localeError: Qz() }; + } + var tj = () => { + let e = { + string: { unit: 'តួអក្សរ', verb: 'គួរមាន' }, + file: { unit: 'បៃ', verb: 'គួរមាន' }, + array: { unit: 'ធាតុ', verb: 'គួរមាន' }, + set: { unit: 'ធាតុ', verb: 'គួរមាន' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ទិន្នន័យបញ្ចូល', + email: 'អាសយដ្ឋានអ៊ីមែល', + url: 'URL', + emoji: 'សញ្ញាអារម្មណ៍', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'កាលបរិច្ឆេទ និងម៉ោង ISO', + date: 'កាលបរិច្ឆេទ ISO', + time: 'ម៉ោង ISO', + duration: 'រយៈពេល ISO', + ipv4: 'អាសយដ្ឋាន IPv4', + ipv6: 'អាសយដ្ឋាន IPv6', + cidrv4: 'ដែនអាសយដ្ឋាន IPv4', + cidrv6: 'ដែនអាសយដ្ឋាន IPv6', + base64: 'ខ្សែអក្សរអ៊ិកូដ base64', + base64url: 'ខ្សែអក្សរអ៊ិកូដ base64url', + json_string: 'ខ្សែអក្សរ JSON', + e164: 'លេខ E.164', + jwt: 'JWT', + template_literal: 'ទិន្នន័យបញ្ចូល', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'មិនមែនជាលេខ (NaN)' : 'លេខ'; + case 'object': + if (Array.isArray(a)) return 'អារេ (Array)'; + if (a === null) return 'គ្មានតម្លៃ (null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${N(n.values[0])}` + : `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `ធំពេក៖ ត្រូវការ ${(r = n.origin) != null ? r : 'តម្លៃ'} ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'ធាតុ'}` + : `ធំពេក៖ ត្រូវការ ${(s = n.origin) != null ? s : 'តម្លៃ'} ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `តូចពេក៖ ត្រូវការ ${n.origin} ${a} ${n.minimum.toString()} ${c.unit}` + : `តូចពេក៖ ត្រូវការ ${n.origin} ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"` + : a.format === 'ends_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"` + : a.format === 'includes' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"` + : a.format === 'regex' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}` + : `មិនត្រឹមត្រូវ៖ ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`; + case 'unrecognized_keys': + return `រកឃើញសោមិនស្គាល់៖ ${z(n.keys, ', ')}`; + case 'invalid_key': + return `សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`; + case 'invalid_union': + default: + return 'ទិន្នន័យមិនត្រឹមត្រូវ'; + case 'invalid_element': + return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`; + } + }; + }; + function Fh() { + return { localeError: tj() }; + } + function nj() { + return Fh(); + } + var rj = () => { + let e = { + string: { unit: '문자', verb: 'to have' }, + file: { unit: '바이트', verb: 'to have' }, + array: { unit: '개', verb: 'to have' }, + set: { unit: '개', verb: 'to have' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '입력', + email: '이메일 주소', + url: 'URL', + emoji: '이모지', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 날짜시간', + date: 'ISO 날짜', + time: 'ISO 시간', + duration: 'ISO 기간', + ipv4: 'IPv4 주소', + ipv6: 'IPv6 주소', + cidrv4: 'IPv4 범위', + cidrv6: 'IPv6 범위', + base64: 'base64 인코딩 문자열', + base64url: 'base64url 인코딩 문자열', + json_string: 'JSON 문자열', + e164: 'E.164 번호', + jwt: 'JWT', + template_literal: '입력', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${(( + p, + ) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(p)) return 'array'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}입니다`; + case 'invalid_value': + return n.values.length === 1 + ? `잘못된 입력: 값은 ${N(n.values[0])} 이어야 합니다` + : `잘못된 옵션: ${z(n.values, '또는 ')} 중 하나여야 합니다`; + case 'too_big': { + let p = n.inclusive ? '이하' : '미만', + f = p === '미만' ? '이어야 합니다' : '여야 합니다', + v = t(n.origin), + b = (r = v?.unit) != null ? r : '요소'; + return v + ? `${(o = n.origin) != null ? o : '값'}이 너무 큽니다: ${n.maximum.toString()}${b} ${p}${f}` + : `${(s = n.origin) != null ? s : '값'}이 너무 큽니다: ${n.maximum.toString()} ${p}${f}`; + } + case 'too_small': { + let p = n.inclusive ? '이상' : '초과', + f = p === '이상' ? '이어야 합니다' : '여야 합니다', + v = t(n.origin), + b = (u = v?.unit) != null ? u : '요소'; + return v + ? `${(a = n.origin) != null ? a : '값'}이 너무 작습니다: ${n.minimum.toString()}${b} ${p}${f}` + : `${(c = n.origin) != null ? c : '값'}이 너무 작습니다: ${n.minimum.toString()} ${p}${f}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `잘못된 문자열: "${p.prefix}"(으)로 시작해야 합니다` + : p.format === 'ends_with' + ? `잘못된 문자열: "${p.suffix}"(으)로 끝나야 합니다` + : p.format === 'includes' + ? `잘못된 문자열: "${p.includes}"을(를) 포함해야 합니다` + : p.format === 'regex' + ? `잘못된 문자열: 정규식 ${p.pattern} 패턴과 일치해야 합니다` + : `잘못된 ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `잘못된 숫자: ${n.divisor}의 배수여야 합니다`; + case 'unrecognized_keys': + return `인식할 수 없는 키: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `잘못된 키: ${n.origin}`; + case 'invalid_union': + default: + return '잘못된 입력'; + case 'invalid_element': + return `잘못된 값: ${n.origin}`; + } + }; + }; + function ij() { + return { localeError: rj() }; + } + var Wn = (e, t = void 0) => { + switch (e) { + case 'number': + return Number.isNaN(t) ? 'NaN' : 'skaičius'; + case 'bigint': + return 'sveikasis skaičius'; + case 'string': + return 'eilutė'; + case 'boolean': + return 'loginė reikšmė'; + case 'undefined': + case 'void': + return 'neapibrėžta reikšmė'; + case 'function': + return 'funkcija'; + case 'symbol': + return 'simbolis'; + case 'object': + return t === void 0 + ? 'nežinomas objektas' + : t === null + ? 'nulinė reikšmė' + : Array.isArray(t) + ? 'masyvas' + : Object.getPrototypeOf(t) !== Object.prototype && t.constructor + ? t.constructor.name + : 'objektas'; + case 'null': + return 'nulinė reikšmė'; + } + return e; + }, + Bn = (e) => e.charAt(0).toUpperCase() + e.slice(1); + function uv(e) { + let t = Math.abs(e), + i = t % 10, + n = t % 100; + return (n >= 11 && n <= 19) || i === 0 ? 'many' : i === 1 ? 'one' : 'few'; + } + var oj = () => { + let e = { + string: { + unit: { one: 'simbolis', few: 'simboliai', many: 'simbolių' }, + verb: { + smaller: { + inclusive: 'turi būti ne ilgesnė kaip', + notInclusive: 'turi būti trumpesnė kaip', + }, + bigger: { + inclusive: 'turi būti ne trumpesnė kaip', + notInclusive: 'turi būti ilgesnė kaip', + }, + }, + }, + file: { + unit: { one: 'baitas', few: 'baitai', many: 'baitų' }, + verb: { + smaller: { + inclusive: 'turi būti ne didesnis kaip', + notInclusive: 'turi būti mažesnis kaip', + }, + bigger: { + inclusive: 'turi būti ne mažesnis kaip', + notInclusive: 'turi būti didesnis kaip', + }, + }, + }, + array: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + set: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + }; + function t(n, r, o, s) { + var u; + let a = (u = e[n]) != null ? u : null; + return a === null + ? a + : { + unit: a.unit[r], + verb: a.verb[s][o ? 'inclusive' : 'notInclusive'], + }; + } + let i = { + regex: 'įvestis', + email: 'el. pašto adresas', + url: 'URL', + emoji: 'jaustukas', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO data ir laikas', + date: 'ISO data', + time: 'ISO laikas', + duration: 'ISO trukmė', + ipv4: 'IPv4 adresas', + ipv6: 'IPv6 adresas', + cidrv4: 'IPv4 tinklo prefiksas (CIDR)', + cidrv6: 'IPv6 tinklo prefiksas (CIDR)', + base64: 'base64 užkoduota eilutė', + base64url: 'base64url užkoduota eilutė', + json_string: 'JSON eilutė', + e164: 'E.164 numeris', + jwt: 'JWT', + template_literal: 'įvestis', + }; + return (n) => { + var r, o, s, u, a, c, m, p, f, v, b; + switch (n.code) { + case 'invalid_type': + return `Gautas tipas ${((b = n.input), Wn(typeof b, b))}, o tikėtasi - ${Wn(n.expected)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Privalo būti ${N(n.values[0])}` + : `Privalo būti vienas iš ${z(n.values, '|')} pasirinkimų`; + case 'too_big': { + let $ = Wn(n.origin), + g = t( + n.origin, + uv(Number(n.maximum)), + (r = n.inclusive) != null && r, + 'smaller', + ); + if (g?.verb) + return `${Bn((o = $ ?? n.origin) != null ? o : 'reikšmė')} ${g.verb} ${n.maximum.toString()} ${(s = g.unit) != null ? s : 'elementų'}`; + let k = n.inclusive ? 'ne didesnis kaip' : 'mažesnis kaip'; + return `${Bn((u = $ ?? n.origin) != null ? u : 'reikšmė')} turi būti ${k} ${n.maximum.toString()} ${g?.unit}`; + } + case 'too_small': { + let $ = Wn(n.origin), + g = t( + n.origin, + uv(Number(n.minimum)), + (a = n.inclusive) != null && a, + 'bigger', + ); + if (g?.verb) + return `${Bn((c = $ ?? n.origin) != null ? c : 'reikšmė')} ${g.verb} ${n.minimum.toString()} ${(m = g.unit) != null ? m : 'elementų'}`; + let k = n.inclusive ? 'ne mažesnis kaip' : 'didesnis kaip'; + return `${Bn((p = $ ?? n.origin) != null ? p : 'reikšmė')} turi būti ${k} ${n.minimum.toString()} ${g?.unit}`; + } + case 'invalid_format': { + let $ = n; + return $.format === 'starts_with' + ? `Eilutė privalo prasidėti "${$.prefix}"` + : $.format === 'ends_with' + ? `Eilutė privalo pasibaigti "${$.suffix}"` + : $.format === 'includes' + ? `Eilutė privalo įtraukti "${$.includes}"` + : $.format === 'regex' + ? `Eilutė privalo atitikti ${$.pattern}` + : `Neteisingas ${(f = i[$.format]) != null ? f : n.format}`; + } + case 'not_multiple_of': + return `Skaičius privalo būti ${n.divisor} kartotinis.`; + case 'unrecognized_keys': + return `Neatpažint${n.keys.length > 1 ? 'i' : 'as'} rakt${n.keys.length > 1 ? 'ai' : 'as'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return 'Rastas klaidingas raktas'; + case 'invalid_union': + default: + return 'Klaidinga įvestis'; + case 'invalid_element': { + let $ = Wn(n.origin); + return `${Bn((v = $ ?? n.origin) != null ? v : 'reikšmė')} turi klaidingą įvestį`; + } + } + }; + }; + function aj() { + return { localeError: oj() }; + } + var sj = () => { + let e = { + string: { unit: 'знаци', verb: 'да имаат' }, + file: { unit: 'бајти', verb: 'да имаат' }, + array: { unit: 'ставки', verb: 'да имаат' }, + set: { unit: 'ставки', verb: 'да имаат' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'внес', + email: 'адреса на е-пошта', + url: 'URL', + emoji: 'емоџи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO датум и време', + date: 'ISO датум', + time: 'ISO време', + duration: 'ISO времетраење', + ipv4: 'IPv4 адреса', + ipv6: 'IPv6 адреса', + cidrv4: 'IPv4 опсег', + cidrv6: 'IPv6 опсег', + base64: 'base64-енкодирана низа', + base64url: 'base64url-енкодирана низа', + json_string: 'JSON низа', + e164: 'E.164 број', + jwt: 'JWT', + template_literal: 'внес', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Грешен внес: се очекува ${n.expected}, примено ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'број'; + case 'object': + if (Array.isArray(a)) return 'низа'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Invalid input: expected ${N(n.values[0])}` + : `Грешана опција: се очекува една ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Премногу голем: се очекува ${(r = n.origin) != null ? r : 'вредноста'} да има ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елементи'}` + : `Премногу голем: се очекува ${(s = n.origin) != null ? s : 'вредноста'} да биде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Премногу мал: се очекува ${n.origin} да има ${a}${n.minimum.toString()} ${c.unit}` + : `Премногу мал: се очекува ${n.origin} да биде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Неважечка низа: мора да започнува со "${a.prefix}"` + : a.format === 'ends_with' + ? `Неважечка низа: мора да завршува со "${a.suffix}"` + : a.format === 'includes' + ? `Неважечка низа: мора да вклучува "${a.includes}"` + : a.format === 'regex' + ? `Неважечка низа: мора да одгоара на патернот ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Грешен број: мора да биде делив со ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Непрепознаени клучеви' : 'Непрепознаен клуч'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Грешен клуч во ${n.origin}`; + case 'invalid_union': + default: + return 'Грешен внес'; + case 'invalid_element': + return `Грешна вредност во ${n.origin}`; + } + }; + }; + function uj() { + return { localeError: sj() }; + } + var cj = () => { + let e = { + string: { unit: 'aksara', verb: 'mempunyai' }, + file: { unit: 'bait', verb: 'mempunyai' }, + array: { unit: 'elemen', verb: 'mempunyai' }, + set: { unit: 'elemen', verb: 'mempunyai' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'alamat e-mel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tarikh masa ISO', + date: 'tarikh ISO', + time: 'masa ISO', + duration: 'tempoh ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'julat IPv4', + cidrv6: 'julat IPv6', + base64: 'string dikodkan base64', + base64url: 'string dikodkan base64url', + json_string: 'string JSON', + e164: 'nombor E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input tidak sah: dijangka ${n.expected}, diterima ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombor'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input tidak sah: dijangka ${N(n.values[0])}` + : `Pilihan tidak sah: dijangka salah satu daripada ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Terlalu besar: dijangka ${(r = n.origin) != null ? r : 'nilai'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elemen'}` + : `Terlalu besar: dijangka ${(s = n.origin) != null ? s : 'nilai'} adalah ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Terlalu kecil: dijangka ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Terlalu kecil: dijangka ${n.origin} adalah ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `String tidak sah: mesti bermula dengan "${a.prefix}"` + : a.format === 'ends_with' + ? `String tidak sah: mesti berakhir dengan "${a.suffix}"` + : a.format === 'includes' + ? `String tidak sah: mesti mengandungi "${a.includes}"` + : a.format === 'regex' + ? `String tidak sah: mesti sepadan dengan corak ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} tidak sah`; + } + case 'not_multiple_of': + return `Nombor tidak sah: perlu gandaan ${n.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak sah dalam ${n.origin}`; + case 'invalid_union': + default: + return 'Input tidak sah'; + case 'invalid_element': + return `Nilai tidak sah dalam ${n.origin}`; + } + }; + }; + function lj() { + return { localeError: cj() }; + } + var dj = () => { + let e = { + string: { unit: 'tekens' }, + file: { unit: 'bytes' }, + array: { unit: 'elementen' }, + set: { unit: 'elementen' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'invoer', + email: 'emailadres', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum en tijd', + date: 'ISO datum', + time: 'ISO tijd', + duration: 'ISO duur', + ipv4: 'IPv4-adres', + ipv6: 'IPv6-adres', + cidrv4: 'IPv4-bereik', + cidrv6: 'IPv6-bereik', + base64: 'base64-gecodeerde tekst', + base64url: 'base64 URL-gecodeerde tekst', + json_string: 'JSON string', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'invoer', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ongeldige invoer: verwacht ${n.expected}, ontving ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'getal'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ongeldige invoer: verwacht ${N(n.values[0])}` + : `Ongeldige optie: verwacht één van ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Te lang: verwacht dat ${(r = n.origin) != null ? r : 'waarde'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementen'} bevat` + : `Te lang: verwacht dat ${(s = n.origin) != null ? s : 'waarde'} ${a}${n.maximum.toString()} is`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} ${c.unit} bevat` + : `Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} is`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ongeldige tekst: moet met "${a.prefix}" beginnen` + : a.format === 'ends_with' + ? `Ongeldige tekst: moet op "${a.suffix}" eindigen` + : a.format === 'includes' + ? `Ongeldige tekst: moet "${a.includes}" bevatten` + : a.format === 'regex' + ? `Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}` + : `Ongeldig: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`; + case 'unrecognized_keys': + return `Onbekende key${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Ongeldige key in ${n.origin}`; + case 'invalid_union': + default: + return 'Ongeldige invoer'; + case 'invalid_element': + return `Ongeldige waarde in ${n.origin}`; + } + }; + }; + function mj() { + return { localeError: dj() }; + } + var pj = () => { + let e = { + string: { unit: 'tegn', verb: 'å ha' }, + file: { unit: 'bytes', verb: 'å ha' }, + array: { unit: 'elementer', verb: 'å inneholde' }, + set: { unit: 'elementer', verb: 'å inneholde' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'e-postadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslett', + date: 'ISO-dato', + time: 'ISO-klokkeslett', + duration: 'ISO-varighet', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spekter', + cidrv6: 'IPv6-spekter', + base64: 'base64-enkodet streng', + base64url: 'base64url-enkodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ugyldig input: forventet ${n.expected}, fikk ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'tall'; + case 'object': + if (Array.isArray(a)) return 'liste'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ugyldig verdi: forventet ${N(n.values[0])}` + : `Ugyldig valg: forventet en av ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `For stor(t): forventet ${(r = n.origin) != null ? r : 'value'} til å ha ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementer'}` + : `For stor(t): forventet ${(s = n.origin) != null ? s : 'value'} til å ha ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `For lite(n): forventet ${n.origin} til å ha ${a}${n.minimum.toString()} ${c.unit}` + : `For lite(n): forventet ${n.origin} til å ha ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ugyldig streng: må starte med "${a.prefix}"` + : a.format === 'ends_with' + ? `Ugyldig streng: må ende med "${a.suffix}"` + : a.format === 'includes' + ? `Ugyldig streng: må inneholde "${a.includes}"` + : a.format === 'regex' + ? `Ugyldig streng: må matche mønsteret ${a.pattern}` + : `Ugyldig ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ugyldig tall: må være et multiplum av ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Ukjente nøkler' : 'Ukjent nøkkel'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøkkel i ${n.origin}`; + case 'invalid_union': + default: + return 'Ugyldig input'; + case 'invalid_element': + return `Ugyldig verdi i ${n.origin}`; + } + }; + }; + function fj() { + return { localeError: pj() }; + } + var vj = () => { + let e = { + string: { unit: 'harf', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'unsur', verb: 'olmalıdır' }, + set: { unit: 'unsur', verb: 'olmalıdır' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'giren', + email: 'epostagâh', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO hengâmı', + date: 'ISO tarihi', + time: 'ISO zamanı', + duration: 'ISO müddeti', + ipv4: 'IPv4 nişânı', + ipv6: 'IPv6 nişânı', + cidrv4: 'IPv4 menzili', + cidrv6: 'IPv6 menzili', + base64: 'base64-şifreli metin', + base64url: 'base64url-şifreli metin', + json_string: 'JSON metin', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'giren', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Fâsit giren: umulan ${n.expected}, alınan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'numara'; + case 'object': + if (Array.isArray(a)) return 'saf'; + if (a === null) return 'gayb'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Fâsit giren: umulan ${N(n.values[0])}` + : `Fâsit tercih: mûteberler ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Fazla büyük: ${(r = n.origin) != null ? r : 'value'}, ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'} sahip olmalıydı.` + : `Fazla büyük: ${(s = n.origin) != null ? s : 'value'}, ${a}${n.maximum.toString()} olmalıydı.`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Fazla küçük: ${n.origin}, ${a}${n.minimum.toString()} ${c.unit} sahip olmalıydı.` + : `Fazla küçük: ${n.origin}, ${a}${n.minimum.toString()} olmalıydı.`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Fâsit metin: "${a.prefix}" ile başlamalı.` + : a.format === 'ends_with' + ? `Fâsit metin: "${a.suffix}" ile bitmeli.` + : a.format === 'includes' + ? `Fâsit metin: "${a.includes}" ihtivâ etmeli.` + : a.format === 'regex' + ? `Fâsit metin: ${a.pattern} nakşına uymalı.` + : `Fâsit ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Fâsit sayı: ${n.divisor} katı olmalıydı.`; + case 'unrecognized_keys': + return `Tanınmayan anahtar ${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} için tanınmayan anahtar var.`; + case 'invalid_union': + return 'Giren tanınamadı.'; + case 'invalid_element': + return `${n.origin} için tanınmayan kıymet var.`; + default: + return 'Kıymet tanınamadı.'; + } + }; + }; + function gj() { + return { localeError: vj() }; + } + var hj = () => { + let e = { + string: { unit: 'توکي', verb: 'ولري' }, + file: { unit: 'بایټس', verb: 'ولري' }, + array: { unit: 'توکي', verb: 'ولري' }, + set: { unit: 'توکي', verb: 'ولري' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ورودي', + email: 'بریښنالیک', + url: 'یو آر ال', + emoji: 'ایموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'نیټه او وخت', + date: 'نېټه', + time: 'وخت', + duration: 'موده', + ipv4: 'د IPv4 پته', + ipv6: 'د IPv6 پته', + cidrv4: 'د IPv4 ساحه', + cidrv6: 'د IPv6 ساحه', + base64: 'base64-encoded متن', + base64url: 'base64url-encoded متن', + json_string: 'JSON متن', + e164: 'د E.164 شمېره', + jwt: 'JWT', + template_literal: 'ورودي', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ناسم ورودي: باید ${n.expected} وای, مګر ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'عدد'; + case 'object': + if (Array.isArray(a)) return 'ارې'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} ترلاسه شو`; + case 'invalid_value': + return n.values.length === 1 + ? `ناسم ورودي: باید ${N(n.values[0])} وای` + : `ناسم انتخاب: باید یو له ${z(n.values, '|')} څخه وای`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `ډیر لوی: ${(r = n.origin) != null ? r : 'ارزښت'} باید ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصرونه'} ولري` + : `ډیر لوی: ${(s = n.origin) != null ? s : 'ارزښت'} باید ${a}${n.maximum.toString()} وي`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `ډیر کوچنی: ${n.origin} باید ${a}${n.minimum.toString()} ${c.unit} ولري` + : `ډیر کوچنی: ${n.origin} باید ${a}${n.minimum.toString()} وي`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `ناسم متن: باید د "${a.prefix}" سره پیل شي` + : a.format === 'ends_with' + ? `ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي` + : a.format === 'includes' + ? `ناسم متن: باید "${a.includes}" ولري` + : a.format === 'regex' + ? `ناسم متن: باید د ${a.pattern} سره مطابقت ولري` + : `${(u = i[a.format]) != null ? u : n.format} ناسم دی`; + } + case 'not_multiple_of': + return `ناسم عدد: باید د ${n.divisor} مضرب وي`; + case 'unrecognized_keys': + return `ناسم ${n.keys.length > 1 ? 'کلیډونه' : 'کلیډ'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `ناسم کلیډ په ${n.origin} کې`; + case 'invalid_union': + default: + return 'ناسمه ورودي'; + case 'invalid_element': + return `ناسم عنصر په ${n.origin} کې`; + } + }; + }; + function bj() { + return { localeError: hj() }; + } + var yj = () => { + let e = { + string: { unit: 'znaków', verb: 'mieć' }, + file: { unit: 'bajtów', verb: 'mieć' }, + array: { unit: 'elementów', verb: 'mieć' }, + set: { unit: 'elementów', verb: 'mieć' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'wyrażenie', + email: 'adres email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i godzina w formacie ISO', + date: 'data w formacie ISO', + time: 'godzina w formacie ISO', + duration: 'czas trwania ISO', + ipv4: 'adres IPv4', + ipv6: 'adres IPv6', + cidrv4: 'zakres IPv4', + cidrv6: 'zakres IPv6', + base64: 'ciąg znaków zakodowany w formacie base64', + base64url: 'ciąg znaków zakodowany w formacie base64url', + json_string: 'ciąg znaków w formacie JSON', + e164: 'liczba E.164', + jwt: 'JWT', + template_literal: 'wejście', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${(( + p, + ) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'liczba'; + case 'object': + if (Array.isArray(p)) return 'tablica'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Nieprawidłowe dane wejściowe: oczekiwano ${N(n.values[0])}` + : `Nieprawidłowa opcja: oczekiwano jednej z wartości ${z(n.values, '|')}`; + case 'too_big': { + let p = n.inclusive ? '<=' : '<', + f = t(n.origin); + return f + ? `Za duża wartość: oczekiwano, że ${(r = n.origin) != null ? r : 'wartość'} będzie mieć ${p}${n.maximum.toString()} ${(o = f.unit) != null ? o : 'elementów'}` + : `Zbyt duż(y/a/e): oczekiwano, że ${(s = n.origin) != null ? s : 'wartość'} będzie wynosić ${p}${n.maximum.toString()}`; + } + case 'too_small': { + let p = n.inclusive ? '>=' : '>', + f = t(n.origin); + return f + ? `Za mała wartość: oczekiwano, że ${(u = n.origin) != null ? u : 'wartość'} będzie mieć ${p}${n.minimum.toString()} ${(a = f.unit) != null ? a : 'elementów'}` + : `Zbyt mał(y/a/e): oczekiwano, że ${(c = n.origin) != null ? c : 'wartość'} będzie wynosić ${p}${n.minimum.toString()}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `Nieprawidłowy ciąg znaków: musi zaczynać się od "${p.prefix}"` + : p.format === 'ends_with' + ? `Nieprawidłowy ciąg znaków: musi kończyć się na "${p.suffix}"` + : p.format === 'includes' + ? `Nieprawidłowy ciąg znaków: musi zawierać "${p.includes}"` + : p.format === 'regex' + ? `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${p.pattern}` + : `Nieprawidłow(y/a/e) ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`; + case 'unrecognized_keys': + return `Nierozpoznane klucze${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Nieprawidłowy klucz w ${n.origin}`; + case 'invalid_union': + default: + return 'Nieprawidłowe dane wejściowe'; + case 'invalid_element': + return `Nieprawidłowa wartość w ${n.origin}`; + } + }; + }; + function $j() { + return { localeError: yj() }; + } + var _j = () => { + let e = { + string: { unit: 'caracteres', verb: 'ter' }, + file: { unit: 'bytes', verb: 'ter' }, + array: { unit: 'itens', verb: 'ter' }, + set: { unit: 'itens', verb: 'ter' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'padrão', + email: 'endereço de e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'duração ISO', + ipv4: 'endereço IPv4', + ipv6: 'endereço IPv6', + cidrv4: 'faixa de IPv4', + cidrv6: 'faixa de IPv6', + base64: 'texto codificado em base64', + base64url: 'URL codificada em base64', + json_string: 'texto JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Tipo inválido: esperado ${n.expected}, recebido ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'número'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'nulo'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrada inválida: esperado ${N(n.values[0])}` + : `Opção inválida: esperada uma das ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Muito grande: esperado que ${(r = n.origin) != null ? r : 'valor'} tivesse ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementos'}` + : `Muito grande: esperado que ${(s = n.origin) != null ? s : 'valor'} fosse ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Muito pequeno: esperado que ${n.origin} tivesse ${a}${n.minimum.toString()} ${c.unit}` + : `Muito pequeno: esperado que ${n.origin} fosse ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Texto inválido: deve começar com "${a.prefix}"` + : a.format === 'ends_with' + ? `Texto inválido: deve terminar com "${a.suffix}"` + : a.format === 'includes' + ? `Texto inválido: deve incluir "${a.includes}"` + : a.format === 'regex' + ? `Texto inválido: deve corresponder ao padrão ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} inválido`; + } + case 'not_multiple_of': + return `Número inválido: deve ser múltiplo de ${n.divisor}`; + case 'unrecognized_keys': + return `Chave${n.keys.length > 1 ? 's' : ''} desconhecida${n.keys.length > 1 ? 's' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Chave inválida em ${n.origin}`; + case 'invalid_union': + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido em ${n.origin}`; + default: + return 'Campo inválido'; + } + }; + }; + function kj() { + return { localeError: _j() }; + } + function cv(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var xj = () => { + let e = { + string: { + unit: { one: 'символ', few: 'символа', many: 'символов' }, + verb: 'иметь', + }, + file: { + unit: { one: 'байт', few: 'байта', many: 'байт' }, + verb: 'иметь', + }, + array: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + set: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ввод', + email: 'email адрес', + url: 'URL', + emoji: 'эмодзи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата и время', + date: 'ISO дата', + time: 'ISO время', + duration: 'ISO длительность', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'строка в формате base64', + base64url: 'строка в формате base64url', + json_string: 'JSON строка', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'ввод', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Неверный ввод: ожидалось ${n.expected}, получено ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(u)) return 'массив'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Неверный ввод: ожидалось ${N(n.values[0])}` + : `Неверный вариант: ожидалось одно из ${z(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + if (a) { + let c = cv(Number(n.maximum), a.unit.one, a.unit.few, a.unit.many); + return `Слишком большое значение: ожидалось, что ${(r = n.origin) != null ? r : 'значение'} будет иметь ${u}${n.maximum.toString()} ${c}`; + } + return `Слишком большое значение: ожидалось, что ${(o = n.origin) != null ? o : 'значение'} будет ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + if (a) { + let c = cv(Number(n.minimum), a.unit.one, a.unit.few, a.unit.many); + return `Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${u}${n.minimum.toString()} ${c}`; + } + return `Слишком маленькое значение: ожидалось, что ${n.origin} будет ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Неверная строка: должна начинаться с "${u.prefix}"` + : u.format === 'ends_with' + ? `Неверная строка: должна заканчиваться на "${u.suffix}"` + : u.format === 'includes' + ? `Неверная строка: должна содержать "${u.includes}"` + : u.format === 'regex' + ? `Неверная строка: должна соответствовать шаблону ${u.pattern}` + : `Неверный ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `Неверное число: должно быть кратным ${n.divisor}`; + case 'unrecognized_keys': + return `Нераспознанн${n.keys.length > 1 ? 'ые' : 'ый'} ключ${n.keys.length > 1 ? 'и' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Неверный ключ в ${n.origin}`; + case 'invalid_union': + default: + return 'Неверные входные данные'; + case 'invalid_element': + return `Неверное значение в ${n.origin}`; + } + }; + }; + function wj() { + return { localeError: xj() }; + } + var Sj = () => { + let e = { + string: { unit: 'znakov', verb: 'imeti' }, + file: { unit: 'bajtov', verb: 'imeti' }, + array: { unit: 'elementov', verb: 'imeti' }, + set: { unit: 'elementov', verb: 'imeti' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'vnos', + email: 'e-poštni naslov', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum in čas', + date: 'ISO datum', + time: 'ISO čas', + duration: 'ISO trajanje', + ipv4: 'IPv4 naslov', + ipv6: 'IPv6 naslov', + cidrv4: 'obseg IPv4', + cidrv6: 'obseg IPv6', + base64: 'base64 kodiran niz', + base64url: 'base64url kodiran niz', + json_string: 'JSON niz', + e164: 'E.164 številka', + jwt: 'JWT', + template_literal: 'vnos', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Neveljaven vnos: pričakovano ${n.expected}, prejeto ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'število'; + case 'object': + if (Array.isArray(a)) return 'tabela'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Neveljaven vnos: pričakovano ${N(n.values[0])}` + : `Neveljavna možnost: pričakovano eno izmed ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Preveliko: pričakovano, da bo ${(r = n.origin) != null ? r : 'vrednost'} imelo ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementov'}` + : `Preveliko: pričakovano, da bo ${(s = n.origin) != null ? s : 'vrednost'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Premajhno: pričakovano, da bo ${n.origin} imelo ${a}${n.minimum.toString()} ${c.unit}` + : `Premajhno: pričakovano, da bo ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Neveljaven niz: mora se začeti z "${a.prefix}"` + : a.format === 'ends_with' + ? `Neveljaven niz: mora se končati z "${a.suffix}"` + : a.format === 'includes' + ? `Neveljaven niz: mora vsebovati "${a.includes}"` + : a.format === 'regex' + ? `Neveljaven niz: mora ustrezati vzorcu ${a.pattern}` + : `Neveljaven ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Neveljavno število: mora biti večkratnik ${n.divisor}`; + case 'unrecognized_keys': + return `Neprepoznan${n.keys.length > 1 ? 'i ključi' : ' ključ'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Neveljaven ključ v ${n.origin}`; + case 'invalid_union': + default: + return 'Neveljaven vnos'; + case 'invalid_element': + return `Neveljavna vrednost v ${n.origin}`; + } + }; + }; + function Ij() { + return { localeError: Sj() }; + } + var zj = () => { + let e = { + string: { unit: 'tecken', verb: 'att ha' }, + file: { unit: 'bytes', verb: 'att ha' }, + array: { unit: 'objekt', verb: 'att innehålla' }, + set: { unit: 'objekt', verb: 'att innehålla' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'reguljärt uttryck', + email: 'e-postadress', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datum och tid', + date: 'ISO-datum', + time: 'ISO-tid', + duration: 'ISO-varaktighet', + ipv4: 'IPv4-intervall', + ipv6: 'IPv6-intervall', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodad sträng', + base64url: 'base64url-kodad sträng', + json_string: 'JSON-sträng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'mall-literal', + }; + return (n) => { + var r, o, s, u, a, c, m, p; + switch (n.code) { + case 'invalid_type': + return `Ogiltig inmatning: förväntat ${n.expected}, fick ${((f) => { + let v = typeof f; + switch (v) { + case 'number': + return Number.isNaN(f) ? 'NaN' : 'antal'; + case 'object': + if (Array.isArray(f)) return 'lista'; + if (f === null) return 'null'; + if ( + Object.getPrototypeOf(f) !== Object.prototype && + f.constructor + ) + return f.constructor.name; + } + return v; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ogiltig inmatning: förväntat ${N(n.values[0])}` + : `Ogiltigt val: förväntade en av ${z(n.values, '|')}`; + case 'too_big': { + let f = n.inclusive ? '<=' : '<', + v = t(n.origin); + return v + ? `För stor(t): förväntade ${(r = n.origin) != null ? r : 'värdet'} att ha ${f}${n.maximum.toString()} ${(o = v.unit) != null ? o : 'element'}` + : `För stor(t): förväntat ${(s = n.origin) != null ? s : 'värdet'} att ha ${f}${n.maximum.toString()}`; + } + case 'too_small': { + let f = n.inclusive ? '>=' : '>', + v = t(n.origin); + return v + ? `För lite(t): förväntade ${(u = n.origin) != null ? u : 'värdet'} att ha ${f}${n.minimum.toString()} ${v.unit}` + : `För lite(t): förväntade ${(a = n.origin) != null ? a : 'värdet'} att ha ${f}${n.minimum.toString()}`; + } + case 'invalid_format': { + let f = n; + return f.format === 'starts_with' + ? `Ogiltig sträng: måste börja med "${f.prefix}"` + : f.format === 'ends_with' + ? `Ogiltig sträng: måste sluta med "${f.suffix}"` + : f.format === 'includes' + ? `Ogiltig sträng: måste innehålla "${f.includes}"` + : f.format === 'regex' + ? `Ogiltig sträng: måste matcha mönstret "${f.pattern}"` + : `Ogiltig(t) ${(c = i[f.format]) != null ? c : n.format}`; + } + case 'not_multiple_of': + return `Ogiltigt tal: måste vara en multipel av ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Okända nycklar' : 'Okänd nyckel'}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Ogiltig nyckel i ${(m = n.origin) != null ? m : 'värdet'}`; + case 'invalid_union': + default: + return 'Ogiltig input'; + case 'invalid_element': + return `Ogiltigt värde i ${(p = n.origin) != null ? p : 'värdet'}`; + } + }; + }; + function jj() { + return { localeError: zj() }; + } + var Oj = () => { + let e = { + string: { unit: 'எழுத்துக்கள்', verb: 'கொண்டிருக்க வேண்டும்' }, + file: { unit: 'பைட்டுகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + array: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + set: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'உள்ளீடு', + email: 'மின்னஞ்சல் முகவரி', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO தேதி நேரம்', + date: 'ISO தேதி', + time: 'ISO நேரம்', + duration: 'ISO கால அளவு', + ipv4: 'IPv4 முகவரி', + ipv6: 'IPv6 முகவரி', + cidrv4: 'IPv4 வரம்பு', + cidrv6: 'IPv6 வரம்பு', + base64: 'base64-encoded சரம்', + base64url: 'base64url-encoded சரம்', + json_string: 'JSON சரம்', + e164: 'E.164 எண்', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'எண் அல்லாதது' : 'எண்'; + case 'object': + if (Array.isArray(a)) return 'அணி'; + if (a === null) return 'வெறுமை'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${N(n.values[0])}` + : `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${z(n.values, '|')} இல் ஒன்று`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${(r = n.origin) != null ? r : 'மதிப்பு'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'உறுப்புகள்'} ஆக இருக்க வேண்டும்` + : `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${(s = n.origin) != null ? s : 'மதிப்பு'} ${a}${n.maximum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${a}${n.minimum.toString()} ${c.unit} ஆக இருக்க வேண்டும்` + : `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${a}${n.minimum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்` + : a.format === 'ends_with' + ? `தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்` + : a.format === 'includes' + ? `தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்` + : a.format === 'regex' + ? `தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்` + : `தவறான ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`; + case 'unrecognized_keys': + return `அடையாளம் தெரியாத விசை${n.keys.length > 1 ? 'கள்' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} இல் தவறான விசை`; + case 'invalid_union': + default: + return 'தவறான உள்ளீடு'; + case 'invalid_element': + return `${n.origin} இல் தவறான மதிப்பு`; + } + }; + }; + function Uj() { + return { localeError: Oj() }; + } + var Pj = () => { + let e = { + string: { unit: 'ตัวอักษร', verb: 'ควรมี' }, + file: { unit: 'ไบต์', verb: 'ควรมี' }, + array: { unit: 'รายการ', verb: 'ควรมี' }, + set: { unit: 'รายการ', verb: 'ควรมี' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ข้อมูลที่ป้อน', + email: 'ที่อยู่อีเมล', + url: 'URL', + emoji: 'อิโมจิ', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'วันที่เวลาแบบ ISO', + date: 'วันที่แบบ ISO', + time: 'เวลาแบบ ISO', + duration: 'ช่วงเวลาแบบ ISO', + ipv4: 'ที่อยู่ IPv4', + ipv6: 'ที่อยู่ IPv6', + cidrv4: 'ช่วง IP แบบ IPv4', + cidrv6: 'ช่วง IP แบบ IPv6', + base64: 'ข้อความแบบ Base64', + base64url: 'ข้อความแบบ Base64 สำหรับ URL', + json_string: 'ข้อความแบบ JSON', + e164: 'เบอร์โทรศัพท์ระหว่างประเทศ (E.164)', + jwt: 'โทเคน JWT', + template_literal: 'ข้อมูลที่ป้อน', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'ไม่ใช่ตัวเลข (NaN)' : 'ตัวเลข'; + case 'object': + if (Array.isArray(a)) return 'อาร์เรย์ (Array)'; + if (a === null) return 'ไม่มีค่า (null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `ค่าไม่ถูกต้อง: ควรเป็น ${N(n.values[0])}` + : `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? 'ไม่เกิน' : 'น้อยกว่า', + c = t(n.origin); + return c + ? `เกินกำหนด: ${(r = n.origin) != null ? r : 'ค่า'} ควรมี${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'รายการ'}` + : `เกินกำหนด: ${(s = n.origin) != null ? s : 'ค่า'} ควรมี${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? 'อย่างน้อย' : 'มากกว่า', + c = t(n.origin); + return c + ? `น้อยกว่ากำหนด: ${n.origin} ควรมี${a} ${n.minimum.toString()} ${c.unit}` + : `น้อยกว่ากำหนด: ${n.origin} ควรมี${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"` + : a.format === 'ends_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"` + : a.format === 'includes' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ` + : a.format === 'regex' + ? `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}` + : `รูปแบบไม่ถูกต้อง: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`; + case 'unrecognized_keys': + return `พบคีย์ที่ไม่รู้จัก: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `คีย์ไม่ถูกต้องใน ${n.origin}`; + case 'invalid_union': + return 'ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้'; + case 'invalid_element': + return `ข้อมูลไม่ถูกต้องใน ${n.origin}`; + default: + return 'ข้อมูลไม่ถูกต้อง'; + } + }; + }; + function Nj() { + return { localeError: Pj() }; + } + var Dj = () => { + let e = { + string: { unit: 'karakter', verb: 'olmalı' }, + file: { unit: 'bayt', verb: 'olmalı' }, + array: { unit: 'öğe', verb: 'olmalı' }, + set: { unit: 'öğe', verb: 'olmalı' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'girdi', + email: 'e-posta adresi', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO tarih ve saat', + date: 'ISO tarih', + time: 'ISO saat', + duration: 'ISO süre', + ipv4: 'IPv4 adresi', + ipv6: 'IPv6 adresi', + cidrv4: 'IPv4 aralığı', + cidrv6: 'IPv6 aralığı', + base64: 'base64 ile şifrelenmiş metin', + base64url: 'base64url ile şifrelenmiş metin', + json_string: 'JSON dizesi', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'Şablon dizesi', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Geçersiz değer: beklenen ${n.expected}, alınan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Geçersiz değer: beklenen ${N(n.values[0])}` + : `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Çok büyük: beklenen ${(r = n.origin) != null ? r : 'değer'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'öğe'}` + : `Çok büyük: beklenen ${(s = n.origin) != null ? s : 'değer'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Çok küçük: beklenen ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `Çok küçük: beklenen ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Geçersiz metin: "${a.prefix}" ile başlamalı` + : a.format === 'ends_with' + ? `Geçersiz metin: "${a.suffix}" ile bitmeli` + : a.format === 'includes' + ? `Geçersiz metin: "${a.includes}" içermeli` + : a.format === 'regex' + ? `Geçersiz metin: ${a.pattern} desenine uymalı` + : `Geçersiz ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`; + case 'unrecognized_keys': + return `Tanınmayan anahtar${n.keys.length > 1 ? 'lar' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} içinde geçersiz anahtar`; + case 'invalid_union': + default: + return 'Geçersiz değer'; + case 'invalid_element': + return `${n.origin} içinde geçersiz değer`; + } + }; + }; + function Zj() { + return { localeError: Dj() }; + } + var Ej = () => { + let e = { + string: { unit: 'символів', verb: 'матиме' }, + file: { unit: 'байтів', verb: 'матиме' }, + array: { unit: 'елементів', verb: 'матиме' }, + set: { unit: 'елементів', verb: 'матиме' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'вхідні дані', + email: 'адреса електронної пошти', + url: 'URL', + emoji: 'емодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'дата та час ISO', + date: 'дата ISO', + time: 'час ISO', + duration: 'тривалість ISO', + ipv4: 'адреса IPv4', + ipv6: 'адреса IPv6', + cidrv4: 'діапазон IPv4', + cidrv6: 'діапазон IPv6', + base64: 'рядок у кодуванні base64', + base64url: 'рядок у кодуванні base64url', + json_string: 'рядок JSON', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'вхідні дані', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Неправильні вхідні дані: очікується ${n.expected}, отримано ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(a)) return 'масив'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Неправильні вхідні дані: очікується ${N(n.values[0])}` + : `Неправильна опція: очікується одне з ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Занадто велике: очікується, що ${(r = n.origin) != null ? r : 'значення'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елементів'}` + : `Занадто велике: очікується, що ${(s = n.origin) != null ? s : 'значення'} буде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Занадто мале: очікується, що ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Занадто мале: очікується, що ${n.origin} буде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Неправильний рядок: повинен починатися з "${a.prefix}"` + : a.format === 'ends_with' + ? `Неправильний рядок: повинен закінчуватися на "${a.suffix}"` + : a.format === 'includes' + ? `Неправильний рядок: повинен містити "${a.includes}"` + : a.format === 'regex' + ? `Неправильний рядок: повинен відповідати шаблону ${a.pattern}` + : `Неправильний ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Неправильне число: повинно бути кратним ${n.divisor}`; + case 'unrecognized_keys': + return `Нерозпізнаний ключ${n.keys.length > 1 ? 'і' : ''}: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Неправильний ключ у ${n.origin}`; + case 'invalid_union': + default: + return 'Неправильні вхідні дані'; + case 'invalid_element': + return `Неправильне значення у ${n.origin}`; + } + }; + }; + function Vh() { + return { localeError: Ej() }; + } + function Tj() { + return Vh(); + } + var Aj = () => { + let e = { + string: { unit: 'حروف', verb: 'ہونا' }, + file: { unit: 'بائٹس', verb: 'ہونا' }, + array: { unit: 'آئٹمز', verb: 'ہونا' }, + set: { unit: 'آئٹمز', verb: 'ہونا' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ان پٹ', + email: 'ای میل ایڈریس', + url: 'یو آر ایل', + emoji: 'ایموجی', + uuid: 'یو یو آئی ڈی', + uuidv4: 'یو یو آئی ڈی وی 4', + uuidv6: 'یو یو آئی ڈی وی 6', + nanoid: 'نینو آئی ڈی', + guid: 'جی یو آئی ڈی', + cuid: 'سی یو آئی ڈی', + cuid2: 'سی یو آئی ڈی 2', + ulid: 'یو ایل آئی ڈی', + xid: 'ایکس آئی ڈی', + ksuid: 'کے ایس یو آئی ڈی', + datetime: 'آئی ایس او ڈیٹ ٹائم', + date: 'آئی ایس او تاریخ', + time: 'آئی ایس او وقت', + duration: 'آئی ایس او مدت', + ipv4: 'آئی پی وی 4 ایڈریس', + ipv6: 'آئی پی وی 6 ایڈریس', + cidrv4: 'آئی پی وی 4 رینج', + cidrv6: 'آئی پی وی 6 رینج', + base64: 'بیس 64 ان کوڈڈ سٹرنگ', + base64url: 'بیس 64 یو آر ایل ان کوڈڈ سٹرنگ', + json_string: 'جے ایس او این سٹرنگ', + e164: 'ای 164 نمبر', + jwt: 'جے ڈبلیو ٹی', + template_literal: 'ان پٹ', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `غلط ان پٹ: ${n.expected} متوقع تھا، ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'نمبر'; + case 'object': + if (Array.isArray(a)) return 'آرے'; + if (a === null) return 'نل'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} موصول ہوا`; + case 'invalid_value': + return n.values.length === 1 + ? `غلط ان پٹ: ${N(n.values[0])} متوقع تھا` + : `غلط آپشن: ${z(n.values, '|')} میں سے ایک متوقع تھا`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `بہت بڑا: ${(r = n.origin) != null ? r : 'ویلیو'} کے ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عناصر'} ہونے متوقع تھے` + : `بہت بڑا: ${(s = n.origin) != null ? s : 'ویلیو'} کا ${a}${n.maximum.toString()} ہونا متوقع تھا`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `بہت چھوٹا: ${n.origin} کے ${a}${n.minimum.toString()} ${c.unit} ہونے متوقع تھے` + : `بہت چھوٹا: ${n.origin} کا ${a}${n.minimum.toString()} ہونا متوقع تھا`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے` + : a.format === 'ends_with' + ? `غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے` + : a.format === 'includes' + ? `غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے` + : a.format === 'regex' + ? `غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے` + : `غلط ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`; + case 'unrecognized_keys': + return `غیر تسلیم شدہ کی${n.keys.length > 1 ? 'ز' : ''}: ${z(n.keys, '، ')}`; + case 'invalid_key': + return `${n.origin} میں غلط کی`; + case 'invalid_union': + default: + return 'غلط ان پٹ'; + case 'invalid_element': + return `${n.origin} میں غلط ویلیو`; + } + }; + }; + function Cj() { + return { localeError: Aj() }; + } + var Lj = () => { + let e = { + string: { unit: 'ký tự', verb: 'có' }, + file: { unit: 'byte', verb: 'có' }, + array: { unit: 'phần tử', verb: 'có' }, + set: { unit: 'phần tử', verb: 'có' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'đầu vào', + email: 'địa chỉ email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ngày giờ ISO', + date: 'ngày ISO', + time: 'giờ ISO', + duration: 'khoảng thời gian ISO', + ipv4: 'địa chỉ IPv4', + ipv6: 'địa chỉ IPv6', + cidrv4: 'dải IPv4', + cidrv6: 'dải IPv6', + base64: 'chuỗi mã hóa base64', + base64url: 'chuỗi mã hóa base64url', + json_string: 'chuỗi JSON', + e164: 'số E.164', + jwt: 'JWT', + template_literal: 'đầu vào', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'số'; + case 'object': + if (Array.isArray(a)) return 'mảng'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Đầu vào không hợp lệ: mong đợi ${N(n.values[0])}` + : `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Quá lớn: mong đợi ${(r = n.origin) != null ? r : 'giá trị'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'phần tử'}` + : `Quá lớn: mong đợi ${(s = n.origin) != null ? s : 'giá trị'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Quá nhỏ: mong đợi ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Quá nhỏ: mong đợi ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"` + : a.format === 'ends_with' + ? `Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"` + : a.format === 'includes' + ? `Chuỗi không hợp lệ: phải bao gồm "${a.includes}"` + : a.format === 'regex' + ? `Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} không hợp lệ`; + } + case 'not_multiple_of': + return `Số không hợp lệ: phải là bội số của ${n.divisor}`; + case 'unrecognized_keys': + return `Khóa không được nhận dạng: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Khóa không hợp lệ trong ${n.origin}`; + case 'invalid_union': + default: + return 'Đầu vào không hợp lệ'; + case 'invalid_element': + return `Giá trị không hợp lệ trong ${n.origin}`; + } + }; + }; + function Rj() { + return { localeError: Lj() }; + } + var Jj = () => { + let e = { + string: { unit: '字符', verb: '包含' }, + file: { unit: '字节', verb: '包含' }, + array: { unit: '项', verb: '包含' }, + set: { unit: '项', verb: '包含' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '输入', + email: '电子邮件', + url: 'URL', + emoji: '表情符号', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日期时间', + date: 'ISO日期', + time: 'ISO时间', + duration: 'ISO时长', + ipv4: 'IPv4地址', + ipv6: 'IPv6地址', + cidrv4: 'IPv4网段', + cidrv6: 'IPv6网段', + base64: 'base64编码字符串', + base64url: 'base64url编码字符串', + json_string: 'JSON字符串', + e164: 'E.164号码', + jwt: 'JWT', + template_literal: '输入', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `无效输入:期望 ${n.expected},实际接收 ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? '非数字(NaN)' : '数字'; + case 'object': + if (Array.isArray(a)) return '数组'; + if (a === null) return '空值(null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `无效输入:期望 ${N(n.values[0])}` + : `无效选项:期望以下之一 ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `数值过大:期望 ${(r = n.origin) != null ? r : '值'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : '个元素'}` + : `数值过大:期望 ${(s = n.origin) != null ? s : '值'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `数值过小:期望 ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `数值过小:期望 ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `无效字符串:必须以 "${a.prefix}" 开头` + : a.format === 'ends_with' + ? `无效字符串:必须以 "${a.suffix}" 结尾` + : a.format === 'includes' + ? `无效字符串:必须包含 "${a.includes}"` + : a.format === 'regex' + ? `无效字符串:必须满足正则表达式 ${a.pattern}` + : `无效${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `无效数字:必须是 ${n.divisor} 的倍数`; + case 'unrecognized_keys': + return `出现未知的键(key): ${z(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} 中的键(key)无效`; + case 'invalid_union': + default: + return '无效输入'; + case 'invalid_element': + return `${n.origin} 中包含无效值(value)`; + } + }; + }; + function Fj() { + return { localeError: Jj() }; + } + var Vj = () => { + let e = { + string: { unit: '字元', verb: '擁有' }, + file: { unit: '位元組', verb: '擁有' }, + array: { unit: '項目', verb: '擁有' }, + set: { unit: '項目', verb: '擁有' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '輸入', + email: '郵件地址', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 日期時間', + date: 'ISO 日期', + time: 'ISO 時間', + duration: 'ISO 期間', + ipv4: 'IPv4 位址', + ipv6: 'IPv6 位址', + cidrv4: 'IPv4 範圍', + cidrv6: 'IPv6 範圍', + base64: 'base64 編碼字串', + base64url: 'base64url 編碼字串', + json_string: 'JSON 字串', + e164: 'E.164 數值', + jwt: 'JWT', + template_literal: '輸入', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `無效的輸入值:預期為 ${n.expected},但收到 ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `無效的輸入值:預期為 ${N(n.values[0])}` + : `無效的選項:預期為以下其中之一 ${z(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `數值過大:預期 ${(r = n.origin) != null ? r : '值'} 應為 ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : '個元素'}` + : `數值過大:預期 ${(s = n.origin) != null ? s : '值'} 應為 ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `數值過小:預期 ${n.origin} 應為 ${a}${n.minimum.toString()} ${c.unit}` + : `數值過小:預期 ${n.origin} 應為 ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `無效的字串:必須以 "${a.prefix}" 開頭` + : a.format === 'ends_with' + ? `無效的字串:必須以 "${a.suffix}" 結尾` + : a.format === 'includes' + ? `無效的字串:必須包含 "${a.includes}"` + : a.format === 'regex' + ? `無效的字串:必須符合格式 ${a.pattern}` + : `無效的 ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `無效的數字:必須為 ${n.divisor} 的倍數`; + case 'unrecognized_keys': + return `無法識別的鍵值${n.keys.length > 1 ? '們' : ''}:${z(n.keys, '、')}`; + case 'invalid_key': + return `${n.origin} 中有無效的鍵值`; + case 'invalid_union': + default: + return '無效的輸入值'; + case 'invalid_element': + return `${n.origin} 中有無效的值`; + } + }; + }; + function Mj() { + return { localeError: Vj() }; + } + var Wj = () => { + let e = { + string: { unit: 'àmi', verb: 'ní' }, + file: { unit: 'bytes', verb: 'ní' }, + array: { unit: 'nkan', verb: 'ní' }, + set: { unit: 'nkan', verb: 'ní' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ẹ̀rọ ìbáwọlé', + email: 'àdírẹ́sì ìmẹ́lì', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'àkókò ISO', + date: 'ọjọ́ ISO', + time: 'àkókò ISO', + duration: 'àkókò tó pé ISO', + ipv4: 'àdírẹ́sì IPv4', + ipv6: 'àdírẹ́sì IPv6', + cidrv4: 'àgbègbè IPv4', + cidrv6: 'àgbègbè IPv6', + base64: 'ọ̀rọ̀ tí a kọ́ ní base64', + base64url: 'ọ̀rọ̀ base64url', + json_string: 'ọ̀rọ̀ JSON', + e164: 'nọ́mbà E.164', + jwt: 'JWT', + template_literal: 'ẹ̀rọ ìbáwọlé', + }; + return (n) => { + var r, o; + switch (n.code) { + case 'invalid_type': + return `Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${(( + s, + ) => { + let u = typeof s; + switch (u) { + case 'number': + return Number.isNaN(s) ? 'NaN' : 'nọ́mbà'; + case 'object': + if (Array.isArray(s)) return 'akopọ'; + if (s === null) return 'null'; + if ( + Object.getPrototypeOf(s) !== Object.prototype && + s.constructor + ) + return s.constructor.name; + } + return u; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ìbáwọlé aṣìṣe: a ní láti fi ${N(n.values[0])}` + : `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${z(n.values, '|')}`; + case 'too_big': { + let s = n.inclusive ? '<=' : '<', + u = t(n.origin); + return u + ? `Tó pọ̀ jù: a ní láti jẹ́ pé ${(r = n.origin) != null ? r : 'iye'} ${u.verb} ${s}${n.maximum} ${u.unit}` + : `Tó pọ̀ jù: a ní láti jẹ́ ${s}${n.maximum}`; + } + case 'too_small': { + let s = n.inclusive ? '>=' : '>', + u = t(n.origin); + return u + ? `Kéré ju: a ní láti jẹ́ pé ${n.origin} ${u.verb} ${s}${n.minimum} ${u.unit}` + : `Kéré ju: a ní láti jẹ́ ${s}${n.minimum}`; + } + case 'invalid_format': { + let s = n; + return s.format === 'starts_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${s.prefix}"` + : s.format === 'ends_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${s.suffix}"` + : s.format === 'includes' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${s.includes}"` + : s.format === 'regex' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${s.pattern}` + : `Aṣìṣe: ${(o = i[s.format]) != null ? o : n.format}`; + } + case 'not_multiple_of': + return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`; + case 'unrecognized_keys': + return `Bọtìnì àìmọ̀: ${z(n.keys, ', ')}`; + case 'invalid_key': + return `Bọtìnì aṣìṣe nínú ${n.origin}`; + case 'invalid_union': + default: + return 'Ìbáwọlé aṣìṣe'; + case 'invalid_element': + return `Iye aṣìṣe nínú ${n.origin}`; + } + }; + }; + function Bj() { + return { localeError: Wj() }; + } + var Mh = Symbol('ZodOutput'), + Wh = Symbol('ZodInput'), + Il = class { + constructor() { + ((this._map = new WeakMap()), (this._idmap = new Map())); + } + add(e, ...t) { + let i = t[0]; + if ((this._map.set(e, i), i && typeof i == 'object' && 'id' in i)) { + if (this._idmap.has(i.id)) + throw new Error(`ID ${i.id} already exists in the registry`); + this._idmap.set(i.id, e); + } + return this; + } + clear() { + return ((this._map = new WeakMap()), (this._idmap = new Map()), this); + } + remove(e) { + let t = this._map.get(e); + return ( + t && typeof t == 'object' && 'id' in t && this._idmap.delete(t.id), + this._map.delete(e), + this + ); + } + get(e) { + var t; + let i = e._zod.parent; + if (i) { + let n = { ...((t = this.get(i)) != null ? t : {}) }; + delete n.id; + let r = { ...n, ...this._map.get(e) }; + return Object.keys(r).length ? r : void 0; + } + return this._map.get(e); + } + has(e) { + return this._map.has(e); + } + }; + function zl() { + return new Il(); + } + var mt = zl(); + function Bh(e, t) { + return new e({ type: 'string', ...U(t) }); + } + function Gh(e, t) { + return new e({ type: 'string', coerce: !0, ...U(t) }); + } + function jl(e, t) { + return new e({ + type: 'string', + format: 'email', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Gi(e, t) { + return new e({ + type: 'string', + format: 'guid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Ol(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Ul(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v4', + ...U(t), + }); + } + function Pl(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v6', + ...U(t), + }); + } + function Nl(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v7', + ...U(t), + }); + } + function no(e, t) { + return new e({ + type: 'string', + format: 'url', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Dl(e, t) { + return new e({ + type: 'string', + format: 'emoji', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Zl(e, t) { + return new e({ + type: 'string', + format: 'nanoid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function El(e, t) { + return new e({ + type: 'string', + format: 'cuid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Tl(e, t) { + return new e({ + type: 'string', + format: 'cuid2', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Al(e, t) { + return new e({ + type: 'string', + format: 'ulid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Cl(e, t) { + return new e({ + type: 'string', + format: 'xid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Ll(e, t) { + return new e({ + type: 'string', + format: 'ksuid', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Rl(e, t) { + return new e({ + type: 'string', + format: 'ipv4', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Jl(e, t) { + return new e({ + type: 'string', + format: 'ipv6', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Fl(e, t) { + return new e({ + type: 'string', + format: 'cidrv4', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Vl(e, t) { + return new e({ + type: 'string', + format: 'cidrv6', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Ml(e, t) { + return new e({ + type: 'string', + format: 'base64', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Wl(e, t) { + return new e({ + type: 'string', + format: 'base64url', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Bl(e, t) { + return new e({ + type: 'string', + format: 'e164', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + function Gl(e, t) { + return new e({ + type: 'string', + format: 'jwt', + check: 'string_format', + abort: !1, + ...U(t), + }); + } + var Kh = { Any: null, Minute: -1, Second: 0, Millisecond: 3, Microsecond: 6 }; + function qh(e, t) { + return new e({ + type: 'string', + format: 'datetime', + check: 'string_format', + offset: !1, + local: !1, + precision: null, + ...U(t), + }); + } + function Xh(e, t) { + return new e({ + type: 'string', + format: 'date', + check: 'string_format', + ...U(t), + }); + } + function Hh(e, t) { + return new e({ + type: 'string', + format: 'time', + check: 'string_format', + precision: null, + ...U(t), + }); + } + function Yh(e, t) { + return new e({ + type: 'string', + format: 'duration', + check: 'string_format', + ...U(t), + }); + } + function Qh(e, t) { + return new e({ type: 'number', checks: [], ...U(t) }); + } + function eb(e, t) { + return new e({ type: 'number', coerce: !0, checks: [], ...U(t) }); + } + function tb(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'safeint', + ...U(t), + }); + } + function nb(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float32', + ...U(t), + }); + } + function rb(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float64', + ...U(t), + }); + } + function ib(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'int32', + ...U(t), + }); + } + function ob(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'uint32', + ...U(t), + }); + } + function ab(e, t) { + return new e({ type: 'boolean', ...U(t) }); + } + function sb(e, t) { + return new e({ type: 'boolean', coerce: !0, ...U(t) }); + } + function ub(e, t) { + return new e({ type: 'bigint', ...U(t) }); + } + function cb(e, t) { + return new e({ type: 'bigint', coerce: !0, ...U(t) }); + } + function lb(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'int64', + ...U(t), + }); + } + function db(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'uint64', + ...U(t), + }); + } + function mb(e, t) { + return new e({ type: 'symbol', ...U(t) }); + } + function pb(e, t) { + return new e({ type: 'undefined', ...U(t) }); + } + function fb(e, t) { + return new e({ type: 'null', ...U(t) }); + } + function vb(e) { + return new e({ type: 'any' }); + } + function gb(e) { + return new e({ type: 'unknown' }); + } + function hb(e, t) { + return new e({ type: 'never', ...U(t) }); + } + function bb(e, t) { + return new e({ type: 'void', ...U(t) }); + } + function yb(e, t) { + return new e({ type: 'date', ...U(t) }); + } + function $b(e, t) { + return new e({ type: 'date', coerce: !0, ...U(t) }); + } + function _b(e, t) { + return new e({ type: 'nan', ...U(t) }); + } + function gt(e, t) { + return new gl({ check: 'less_than', ...U(t), value: e, inclusive: !1 }); + } + function Se(e, t) { + return new gl({ check: 'less_than', ...U(t), value: e, inclusive: !0 }); + } + function ht(e, t) { + return new hl({ check: 'greater_than', ...U(t), value: e, inclusive: !1 }); + } + function pe(e, t) { + return new hl({ check: 'greater_than', ...U(t), value: e, inclusive: !0 }); + } + function kb(e) { + return ht(0, e); + } + function xb(e) { + return gt(0, e); + } + function wb(e) { + return Se(0, e); + } + function Sb(e) { + return pe(0, e); + } + function Kn(e, t) { + return new lg({ check: 'multiple_of', ...U(t), value: e }); + } + function ro(e, t) { + return new pg({ check: 'max_size', ...U(t), maximum: e }); + } + function qn(e, t) { + return new fg({ check: 'min_size', ...U(t), minimum: e }); + } + function Kl(e, t) { + return new vg({ check: 'size_equals', ...U(t), size: e }); + } + function io(e, t) { + return new gg({ check: 'max_length', ...U(t), maximum: e }); + } + function Wt(e, t) { + return new hg({ check: 'min_length', ...U(t), minimum: e }); + } + function oo(e, t) { + return new bg({ check: 'length_equals', ...U(t), length: e }); + } + function ql(e, t) { + return new yg({ + check: 'string_format', + format: 'regex', + ...U(t), + pattern: e, + }); + } + function Xl(e) { + return new $g({ check: 'string_format', format: 'lowercase', ...U(e) }); + } + function Hl(e) { + return new _g({ check: 'string_format', format: 'uppercase', ...U(e) }); + } + function Yl(e, t) { + return new kg({ + check: 'string_format', + format: 'includes', + ...U(t), + includes: e, + }); + } + function Ql(e, t) { + return new xg({ + check: 'string_format', + format: 'starts_with', + ...U(t), + prefix: e, + }); + } + function ed(e, t) { + return new wg({ + check: 'string_format', + format: 'ends_with', + ...U(t), + suffix: e, + }); + } + function Ib(e, t, i) { + return new Sg({ check: 'property', property: e, schema: t, ...U(i) }); + } + function td(e, t) { + return new Ig({ check: 'mime_type', mime: e, ...U(t) }); + } + function $t(e) { + return new zg({ check: 'overwrite', tx: e }); + } + function nd(e) { + return $t((t) => t.normalize(e)); + } + function rd() { + return $t((e) => e.trim()); + } + function id() { + return $t((e) => e.toLowerCase()); + } + function od() { + return $t((e) => e.toUpperCase()); + } + function zb(e, t, i) { + return new e({ type: 'array', element: t, ...U(i) }); + } + function Gj(e, t, i) { + return new e({ type: 'union', options: t, ...U(i) }); + } + function Kj(e, t, i, n) { + return new e({ type: 'union', options: i, discriminator: t, ...U(n) }); + } + function qj(e, t, i) { + return new e({ type: 'intersection', left: t, right: i }); + } + function Xj(e, t, i, n) { + let r = i instanceof E; + return new e({ + type: 'tuple', + items: t, + rest: r ? i : null, + ...U(r ? n : i), + }); + } + function Hj(e, t, i, n) { + return new e({ type: 'record', keyType: t, valueType: i, ...U(n) }); + } + function Yj(e, t, i, n) { + return new e({ type: 'map', keyType: t, valueType: i, ...U(n) }); + } + function Qj(e, t, i) { + return new e({ type: 'set', valueType: t, ...U(i) }); + } + function e4(e, t, i) { + return new e({ + type: 'enum', + entries: Array.isArray(t) ? Object.fromEntries(t.map((n) => [n, n])) : t, + ...U(i), + }); + } + function t4(e, t, i) { + return new e({ type: 'enum', entries: t, ...U(i) }); + } + function n4(e, t, i) { + return new e({ + type: 'literal', + values: Array.isArray(t) ? t : [t], + ...U(i), + }); + } + function jb(e, t) { + return new e({ type: 'file', ...U(t) }); + } + function r4(e, t) { + return new e({ type: 'transform', transform: t }); + } + function i4(e, t) { + return new e({ type: 'optional', innerType: t }); + } + function o4(e, t) { + return new e({ type: 'nullable', innerType: t }); + } + function a4(e, t, i) { + return new e({ + type: 'default', + innerType: t, + get defaultValue() { + return typeof i == 'function' ? i() : bv(i); + }, + }); + } + function s4(e, t, i) { + return new e({ type: 'nonoptional', innerType: t, ...U(i) }); + } + function u4(e, t) { + return new e({ type: 'success', innerType: t }); + } + function c4(e, t, i) { + return new e({ + type: 'catch', + innerType: t, + catchValue: typeof i == 'function' ? i : () => i, + }); + } + function l4(e, t, i) { + return new e({ type: 'pipe', in: t, out: i }); + } + function d4(e, t) { + return new e({ type: 'readonly', innerType: t }); + } + function m4(e, t, i) { + return new e({ type: 'template_literal', parts: t, ...U(i) }); + } + function p4(e, t) { + return new e({ type: 'lazy', getter: t }); + } + function f4(e, t) { + return new e({ type: 'promise', innerType: t }); + } + function Ob(e, t, i) { + let n = U(i); + return ( + n.abort != null || (n.abort = !0), + new e({ type: 'custom', check: 'custom', fn: t, ...n }) + ); + } + function Ub(e, t, i) { + return new e({ type: 'custom', check: 'custom', fn: t, ...U(i) }); + } + function Pb(e) { + let t = Nb( + (i) => ( + (i.addIssue = (n) => { + if (typeof n == 'string') i.issues.push(Wi(n, i.value, t._zod.def)); + else { + let r = n; + (r.fatal && (r.continue = !1), + r.code != null || (r.code = 'custom'), + r.input != null || (r.input = i.value), + r.inst != null || (r.inst = t), + r.continue != null || (r.continue = !t._zod.def.abort), + i.issues.push(Wi(r))); + } + }), + e(i.value, i) + ), + ); + return t; + } + function Nb(e, t) { + let i = new K({ check: 'custom', ...U(t) }); + return ((i._zod.check = e), i); + } + function Db(e, t) { + var i, n, r, o, s; + let u = U(t), + a = + (i = u.truthy) != null ? i : ['true', '1', 'yes', 'on', 'y', 'enabled'], + c = + (n = u.falsy) != null + ? n + : ['false', '0', 'no', 'off', 'n', 'disabled']; + u.case !== 'sensitive' && + ((a = a.map(($) => (typeof $ == 'string' ? $.toLowerCase() : $))), + (c = c.map(($) => (typeof $ == 'string' ? $.toLowerCase() : $)))); + let m = new Set(a), + p = new Set(c), + f = (r = e.Codec) != null ? r : wl, + v = (o = e.Boolean) != null ? o : $l, + b = new f({ + type: 'pipe', + in: new ((s = e.String) != null ? s : ar)({ + type: 'string', + error: u.error, + }), + out: new v({ type: 'boolean', error: u.error }), + transform: ($, g) => { + let k = $; + return ( + u.case !== 'sensitive' && (k = k.toLowerCase()), + !!m.has(k) || + (!p.has(k) && + (g.issues.push({ + code: 'invalid_value', + expected: 'stringbool', + values: [...m, ...p], + input: g.value, + inst: b, + continue: !1, + }), + {})) + ); + }, + reverseTransform: ($, g) => + $ === !0 ? a[0] || 'true' : c[0] || 'false', + error: u.error, + }); + return b; + } + function sr(e, t, i, n = {}) { + let r = U(n), + o = { + ...U(n), + check: 'string_format', + type: 'string', + format: t, + fn: typeof i == 'function' ? i : (s) => i.test(s), + ...r, + }; + return (i instanceof RegExp && (o.pattern = i), new e(o)); + } + var qc = class { + constructor(e) { + var t, i, n, r, o; + ((this.counter = 0), + (this.metadataRegistry = (t = e?.metadata) != null ? t : mt), + (this.target = (i = e?.target) != null ? i : 'draft-2020-12'), + (this.unrepresentable = (n = e?.unrepresentable) != null ? n : 'throw'), + (this.override = (r = e?.override) != null ? r : () => {}), + (this.io = (o = e?.io) != null ? o : 'output'), + (this.seen = new Map())); + } + process(e, t = { path: [], schemaPath: [] }) { + var i, n, r, o, s; + let u = e._zod.def, + a = { + guid: 'uuid', + url: 'uri', + datetime: 'date-time', + json_string: 'json-string', + regex: '', + }, + c = this.seen.get(e); + if (c) + return ( + c.count++, + t.schemaPath.includes(e) && (c.cycle = t.path), + c.schema + ); + let m = { schema: {}, count: 1, cycle: void 0, path: t.path }; + this.seen.set(e, m); + let p = (n = (i = e._zod).toJSONSchema) == null ? void 0 : n.call(i); + if (p) m.schema = p; + else { + let v = { ...t, schemaPath: [...t.schemaPath, e], path: t.path }, + b = e._zod.parent; + if (b) + ((m.ref = b), this.process(b, v), (this.seen.get(b).isParent = !0)); + else { + let $ = m.schema; + switch (u.type) { + case 'string': { + let g = $; + g.type = 'string'; + let { + minimum: k, + maximum: x, + format: w, + patterns: S, + contentEncoding: P, + } = e._zod.bag; + if ( + (typeof k == 'number' && (g.minLength = k), + typeof x == 'number' && (g.maxLength = x), + w && + ((g.format = (r = a[w]) != null ? r : w), + g.format === '' && delete g.format), + P && (g.contentEncoding = P), + S && S.size > 0) + ) { + let J = [...S]; + J.length === 1 + ? (g.pattern = J[0].source) + : J.length > 1 && + (m.schema.allOf = [ + ...J.map((H) => ({ + ...(this.target === 'draft-7' || + this.target === 'draft-4' || + this.target === 'openapi-3.0' + ? { type: 'string' } + : {}), + pattern: H.source, + })), + ]); + } + break; + } + case 'number': { + let g = $, + { + minimum: k, + maximum: x, + format: w, + multipleOf: S, + exclusiveMaximum: P, + exclusiveMinimum: J, + } = e._zod.bag; + (typeof w == 'string' && w.includes('int') + ? (g.type = 'integer') + : (g.type = 'number'), + typeof J == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((g.minimum = J), (g.exclusiveMinimum = !0)) + : (g.exclusiveMinimum = J)), + typeof k == 'number' && + ((g.minimum = k), + typeof J == 'number' && + this.target !== 'draft-4' && + (J >= k ? delete g.minimum : delete g.exclusiveMinimum)), + typeof P == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((g.maximum = P), (g.exclusiveMaximum = !0)) + : (g.exclusiveMaximum = P)), + typeof x == 'number' && + ((g.maximum = x), + typeof P == 'number' && + this.target !== 'draft-4' && + (P <= x ? delete g.maximum : delete g.exclusiveMaximum)), + typeof S == 'number' && (g.multipleOf = S)); + break; + } + case 'boolean': + $.type = 'boolean'; + break; + case 'bigint': + if (this.unrepresentable === 'throw') + throw new Error('BigInt cannot be represented in JSON Schema'); + break; + case 'symbol': + if (this.unrepresentable === 'throw') + throw new Error('Symbols cannot be represented in JSON Schema'); + break; + case 'null': + this.target === 'openapi-3.0' + ? (($.type = 'string'), ($.nullable = !0), ($.enum = [null])) + : ($.type = 'null'); + break; + case 'any': + case 'unknown': + break; + case 'undefined': + if (this.unrepresentable === 'throw') + throw new Error( + 'Undefined cannot be represented in JSON Schema', + ); + break; + case 'void': + if (this.unrepresentable === 'throw') + throw new Error('Void cannot be represented in JSON Schema'); + break; + case 'never': + $.not = {}; + break; + case 'date': + if (this.unrepresentable === 'throw') + throw new Error('Date cannot be represented in JSON Schema'); + break; + case 'array': { + let g = $, + { minimum: k, maximum: x } = e._zod.bag; + (typeof k == 'number' && (g.minItems = k), + typeof x == 'number' && (g.maxItems = x), + (g.type = 'array'), + (g.items = this.process(u.element, { + ...v, + path: [...v.path, 'items'], + }))); + break; + } + case 'object': { + let g = $; + ((g.type = 'object'), (g.properties = {})); + let k = u.shape; + for (let S in k) + g.properties[S] = this.process(k[S], { + ...v, + path: [...v.path, 'properties', S], + }); + let x = new Set(Object.keys(k)), + w = new Set( + [...x].filter((S) => { + let P = u.shape[S]._zod; + return this.io === 'input' + ? P.optin === void 0 + : P.optout === void 0; + }), + ); + (w.size > 0 && (g.required = Array.from(w)), + ((o = u.catchall) == null ? void 0 : o._zod.def.type) === + 'never' + ? (g.additionalProperties = !1) + : u.catchall + ? u.catchall && + (g.additionalProperties = this.process(u.catchall, { + ...v, + path: [...v.path, 'additionalProperties'], + })) + : this.io === 'output' && (g.additionalProperties = !1)); + break; + } + case 'union': { + let g = $, + k = u.options.map((x, w) => + this.process(x, { ...v, path: [...v.path, 'anyOf', w] }), + ); + g.anyOf = k; + break; + } + case 'intersection': { + let g = $, + k = this.process(u.left, { + ...v, + path: [...v.path, 'allOf', 0], + }), + x = this.process(u.right, { + ...v, + path: [...v.path, 'allOf', 1], + }), + w = (P) => 'allOf' in P && Object.keys(P).length === 1, + S = [...(w(k) ? k.allOf : [k]), ...(w(x) ? x.allOf : [x])]; + g.allOf = S; + break; + } + case 'tuple': { + let g = $; + g.type = 'array'; + let k = this.target === 'draft-2020-12' ? 'prefixItems' : 'items', + x = + this.target === 'draft-2020-12' || + this.target === 'openapi-3.0' + ? 'items' + : 'additionalItems', + w = u.items.map((H, ee) => + this.process(H, { ...v, path: [...v.path, k, ee] }), + ), + S = u.rest + ? this.process(u.rest, { + ...v, + path: [ + ...v.path, + x, + ...(this.target === 'openapi-3.0' + ? [u.items.length] + : []), + ], + }) + : null; + this.target === 'draft-2020-12' + ? ((g.prefixItems = w), S && (g.items = S)) + : this.target === 'openapi-3.0' + ? ((g.items = { anyOf: w }), + S && g.items.anyOf.push(S), + (g.minItems = w.length), + S || (g.maxItems = w.length)) + : ((g.items = w), S && (g.additionalItems = S)); + let { minimum: P, maximum: J } = e._zod.bag; + (typeof P == 'number' && (g.minItems = P), + typeof J == 'number' && (g.maxItems = J)); + break; + } + case 'record': { + let g = $; + ((g.type = 'object'), + (this.target !== 'draft-7' && + this.target !== 'draft-2020-12') || + (g.propertyNames = this.process(u.keyType, { + ...v, + path: [...v.path, 'propertyNames'], + })), + (g.additionalProperties = this.process(u.valueType, { + ...v, + path: [...v.path, 'additionalProperties'], + }))); + break; + } + case 'map': + if (this.unrepresentable === 'throw') + throw new Error('Map cannot be represented in JSON Schema'); + break; + case 'set': + if (this.unrepresentable === 'throw') + throw new Error('Set cannot be represented in JSON Schema'); + break; + case 'enum': { + let g = $, + k = nl(u.entries); + (k.every((x) => typeof x == 'number') && (g.type = 'number'), + k.every((x) => typeof x == 'string') && (g.type = 'string'), + (g.enum = k)); + break; + } + case 'literal': { + let g = $, + k = []; + for (let x of u.values) + if (x === void 0) { + if (this.unrepresentable === 'throw') + throw new Error( + 'Literal `undefined` cannot be represented in JSON Schema', + ); + } else if (typeof x == 'bigint') { + if (this.unrepresentable === 'throw') + throw new Error( + 'BigInt literals cannot be represented in JSON Schema', + ); + k.push(Number(x)); + } else k.push(x); + if (k.length !== 0) + if (k.length === 1) { + let x = k[0]; + ((g.type = x === null ? 'null' : typeof x), + this.target === 'draft-4' || this.target === 'openapi-3.0' + ? (g.enum = [x]) + : (g.const = x)); + } else + (k.every((x) => typeof x == 'number') && (g.type = 'number'), + k.every((x) => typeof x == 'string') && (g.type = 'string'), + k.every((x) => typeof x == 'boolean') && + (g.type = 'string'), + k.every((x) => x === null) && (g.type = 'null'), + (g.enum = k)); + break; + } + case 'file': { + let g = $, + k = { + type: 'string', + format: 'binary', + contentEncoding: 'binary', + }, + { minimum: x, maximum: w, mime: S } = e._zod.bag; + (x !== void 0 && (k.minLength = x), + w !== void 0 && (k.maxLength = w), + S + ? S.length === 1 + ? ((k.contentMediaType = S[0]), Object.assign(g, k)) + : (g.anyOf = S.map((P) => ({ ...k, contentMediaType: P }))) + : Object.assign(g, k)); + break; + } + case 'transform': + if (this.unrepresentable === 'throw') + throw new Error( + 'Transforms cannot be represented in JSON Schema', + ); + break; + case 'nullable': { + let g = this.process(u.innerType, v); + this.target === 'openapi-3.0' + ? ((m.ref = u.innerType), ($.nullable = !0)) + : ($.anyOf = [g, { type: 'null' }]); + break; + } + case 'nonoptional': + case 'promise': + case 'optional': + (this.process(u.innerType, v), (m.ref = u.innerType)); + break; + case 'success': + $.type = 'boolean'; + break; + case 'default': + (this.process(u.innerType, v), + (m.ref = u.innerType), + ($.default = JSON.parse(JSON.stringify(u.defaultValue)))); + break; + case 'prefault': + (this.process(u.innerType, v), + (m.ref = u.innerType), + this.io === 'input' && + ($._prefault = JSON.parse(JSON.stringify(u.defaultValue)))); + break; + case 'catch': { + let g; + (this.process(u.innerType, v), (m.ref = u.innerType)); + try { + g = u.catchValue(void 0); + } catch { + throw new Error( + 'Dynamic catch values are not supported in JSON Schema', + ); + } + $.default = g; + break; + } + case 'nan': + if (this.unrepresentable === 'throw') + throw new Error('NaN cannot be represented in JSON Schema'); + break; + case 'template_literal': { + let g = $, + k = e._zod.pattern; + if (!k) throw new Error('Pattern not found in template literal'); + ((g.type = 'string'), (g.pattern = k.source)); + break; + } + case 'pipe': { + let g = + this.io === 'input' + ? u.in._zod.def.type === 'transform' + ? u.out + : u.in + : u.out; + (this.process(g, v), (m.ref = g)); + break; + } + case 'readonly': + (this.process(u.innerType, v), + (m.ref = u.innerType), + ($.readOnly = !0)); + break; + case 'lazy': { + let g = e._zod.innerType; + (this.process(g, v), (m.ref = g)); + break; + } + case 'custom': + if (this.unrepresentable === 'throw') + throw new Error( + 'Custom types cannot be represented in JSON Schema', + ); + break; + case 'function': + if (this.unrepresentable === 'throw') + throw new Error( + 'Function types cannot be represented in JSON Schema', + ); + } + } + } + let f = this.metadataRegistry.get(e); + return ( + f && Object.assign(m.schema, f), + this.io === 'input' && + ie(e) && + (delete m.schema.examples, delete m.schema.default), + this.io === 'input' && + m.schema._prefault && + ((s = m.schema).default != null || (s.default = m.schema._prefault)), + delete m.schema._prefault, + this.seen.get(e).schema + ); + } + emit(e, t) { + var i, n, r, o, s, u, a, c, m, p; + let f = { + cycles: (i = t?.cycles) != null ? i : 'ref', + reused: (n = t?.reused) != null ? n : 'inline', + external: (r = t?.external) != null ? r : void 0, + }, + v = this.seen.get(e); + if (!v) throw new Error('Unprocessed schema. This is a bug in Zod.'); + let b = (w) => { + var S, P, J, H, ee; + let je = this.target === 'draft-2020-12' ? '$defs' : 'definitions'; + if (f.external) { + let wt = + (S = f.external.registry.get(w[0])) == null ? void 0 : S.id, + Hd = (P = f.external.uri) != null ? P : ($$) => $$; + if (wt) return { ref: Hd(wt) }; + let Io = + (H = (J = w[1].defId) != null ? J : w[1].schema.id) != null + ? H + : 'schema' + this.counter++; + return ( + (w[1].defId = Io), + { defId: Io, ref: `${Hd('__shared')}#/${je}/${Io}` } + ); + } + if (w[1] === v) return { ref: '#' }; + let So = `#/${je}/`, + xt = + (ee = w[1].schema.id) != null ? ee : '__schema' + this.counter++; + return { defId: xt, ref: So + xt }; + }, + $ = (w) => { + if (w[1].schema.$ref) return; + let S = w[1], + { ref: P, defId: J } = b(w); + ((S.def = { ...S.schema }), J && (S.defId = J)); + let H = S.schema; + for (let ee in H) delete H[ee]; + H.$ref = P; + }; + if (f.cycles === 'throw') + for (let w of this.seen.entries()) { + let S = w[1]; + if (S.cycle) + throw new Error(`Cycle detected: #/${(o = S.cycle) == null ? void 0 : o.join('/')}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + for (let w of this.seen.entries()) { + let S = w[1]; + if (e === w[0]) { + $(w); + continue; + } + if (f.external) { + let P = (s = f.external.registry.get(w[0])) == null ? void 0 : s.id; + if (e !== w[0] && P) { + $(w); + continue; + } + } + (((u = this.metadataRegistry.get(w[0])) != null && u.id) || + S.cycle || + (S.count > 1 && f.reused === 'ref')) && + $(w); + } + let g = (w, S) => { + var P, J, H; + let ee = this.seen.get(w), + je = (P = ee.def) != null ? P : ee.schema, + So = { ...je }; + if (ee.ref === null) return; + let xt = ee.ref; + if (((ee.ref = null), xt)) { + g(xt, S); + let wt = this.seen.get(xt).schema; + !wt.$ref || + (S.target !== 'draft-7' && + S.target !== 'draft-4' && + S.target !== 'openapi-3.0') + ? (Object.assign(je, wt), Object.assign(je, So)) + : ((je.allOf = (J = je.allOf) != null ? J : []), je.allOf.push(wt)); + } + ee.isParent || + this.override({ + zodSchema: w, + jsonSchema: je, + path: (H = ee.path) != null ? H : [], + }); + }; + for (let w of [...this.seen.entries()].reverse()) + g(w[0], { target: this.target }); + let k = {}; + if ( + (this.target === 'draft-2020-12' + ? (k.$schema = 'https://json-schema.org/draft/2020-12/schema') + : this.target === 'draft-7' + ? (k.$schema = 'http://json-schema.org/draft-07/schema#') + : this.target === 'draft-4' + ? (k.$schema = 'http://json-schema.org/draft-04/schema#') + : this.target === 'openapi-3.0' || + console.warn(`Invalid target: ${this.target}`), + (a = f.external) == null ? void 0 : a.uri) + ) { + let w = (c = f.external.registry.get(e)) == null ? void 0 : c.id; + if (!w) throw new Error('Schema is missing an `id` property'); + k.$id = f.external.uri(w); + } + Object.assign(k, v.def); + let x = (p = (m = f.external) == null ? void 0 : m.defs) != null ? p : {}; + for (let w of this.seen.entries()) { + let S = w[1]; + S.def && S.defId && (x[S.defId] = S.def); + } + f.external || + (Object.keys(x).length > 0 && + (this.target === 'draft-2020-12' + ? (k.$defs = x) + : (k.definitions = x))); + try { + return JSON.parse(JSON.stringify(k)); + } catch { + throw new Error('Error converting schema to JSON.'); + } + } + }; + function Zb(e, t) { + if (e instanceof Il) { + let n = new qc(t), + r = {}; + for (let u of e._idmap.entries()) { + let [a, c] = u; + n.process(c); + } + let o = {}, + s = { registry: e, uri: t?.uri, defs: r }; + for (let u of e._idmap.entries()) { + let [a, c] = u; + o[a] = n.emit(c, { ...t, external: s }); + } + if (Object.keys(r).length > 0) { + let u = n.target === 'draft-2020-12' ? '$defs' : 'definitions'; + o.__shared = { [u]: r }; + } + return { schemas: o }; + } + let i = new qc(t); + return (i.process(e), i.emit(e, t)); + } + function ie(e, t) { + let i = t ?? { seen: new Set() }; + if (i.seen.has(e)) return !1; + i.seen.add(e); + let n = e._zod.def; + switch (n.type) { + case 'string': + case 'number': + case 'bigint': + case 'boolean': + case 'date': + case 'symbol': + case 'undefined': + case 'null': + case 'any': + case 'unknown': + case 'never': + case 'void': + case 'literal': + case 'enum': + case 'nan': + case 'file': + case 'template_literal': + case 'custom': + case 'success': + case 'catch': + case 'function': + return !1; + case 'array': + return ie(n.element, i); + case 'object': + for (let r in n.shape) if (ie(n.shape[r], i)) return !0; + return !1; + case 'union': + for (let r of n.options) if (ie(r, i)) return !0; + return !1; + case 'intersection': + return ie(n.left, i) || ie(n.right, i); + case 'tuple': + for (let r of n.items) if (ie(r, i)) return !0; + return !(!n.rest || !ie(n.rest, i)); + case 'record': + case 'map': + return ie(n.keyType, i) || ie(n.valueType, i); + case 'set': + return ie(n.valueType, i); + case 'promise': + case 'optional': + case 'nonoptional': + case 'nullable': + case 'readonly': + case 'default': + case 'prefault': + return ie(n.innerType, i); + case 'lazy': + return ie(n.getter(), i); + case 'transform': + return !0; + case 'pipe': + return ie(n.in, i) || ie(n.out, i); + } + throw new Error(`Unknown schema type: ${n.type}`); + } + var v4 = {}, + Eb = {}; + $e(Eb, { + ZodISODate: () => sd, + ZodISODateTime: () => ad, + ZodISODuration: () => cd, + ZodISOTime: () => ud, + date: () => Ab, + datetime: () => Tb, + duration: () => Lb, + time: () => Cb, + }); + var ad = y('ZodISODateTime', (e, t) => { + (Jg.init(e, t), G.init(e, t)); + }); + function Tb(e) { + return qh(ad, e); + } + var sd = y('ZodISODate', (e, t) => { + (Fg.init(e, t), G.init(e, t)); + }); + function Ab(e) { + return Xh(sd, e); + } + var ud = y('ZodISOTime', (e, t) => { + (Vg.init(e, t), G.init(e, t)); + }); + function Cb(e) { + return Hh(ud, e); + } + var cd = y('ZodISODuration', (e, t) => { + (Mg.init(e, t), G.init(e, t)); + }); + function Lb(e) { + return Yh(cd, e); + } + var Rb = (e, t) => { + (il.init(e, t), + (e.name = 'ZodError'), + Object.defineProperties(e, { + format: { value: (i) => al(e, i) }, + flatten: { value: (i) => ol(e, i) }, + addIssue: { + value: (i) => { + (e.issues.push(i), (e.message = JSON.stringify(e.issues, Vi, 2))); + }, + }, + addIssues: { + value: (i) => { + (e.issues.push(...i), + (e.message = JSON.stringify(e.issues, Vi, 2))); + }, + }, + isEmpty: { get: () => e.issues.length === 0 }, + })); + }, + g4 = y('ZodError', Rb), + ve = y('ZodError', Rb, { Parent: Error }), + Jb = Qn(ve), + Fb = er(ve), + Vb = tr(ve), + Mb = nr(ve), + Wb = sl(ve), + Bb = ul(ve), + Gb = cl(ve), + Kb = ll(ve), + qb = dl(ve), + Xb = ml(ve), + Hb = pl(ve), + Yb = fl(ve), + C = y( + 'ZodType', + (e, t) => ( + E.init(e, t), + (e.def = t), + (e.type = t.type), + Object.defineProperty(e, '_def', { value: t }), + (e.check = (...i) => { + var n; + return e.clone( + F.mergeDefs(t, { + checks: [ + ...((n = t.checks) != null ? n : []), + ...i.map((r) => + typeof r == 'function' + ? { + _zod: { + check: r, + def: { check: 'custom' }, + onattach: [], + }, + } + : r, + ), + ], + }), + ); + }), + (e.clone = (i, n) => _e(e, i, n)), + (e.brand = () => e), + (e.register = (i, n) => (i.add(e, n), e)), + (e.parse = (i, n) => Jb(e, i, n, { callee: e.parse })), + (e.safeParse = (i, n) => Vb(e, i, n)), + (e.parseAsync = async (i, n) => Fb(e, i, n, { callee: e.parseAsync })), + (e.safeParseAsync = async (i, n) => Mb(e, i, n)), + (e.spa = e.safeParseAsync), + (e.encode = (i, n) => Wb(e, i, n)), + (e.decode = (i, n) => Bb(e, i, n)), + (e.encodeAsync = async (i, n) => Gb(e, i, n)), + (e.decodeAsync = async (i, n) => Kb(e, i, n)), + (e.safeEncode = (i, n) => qb(e, i, n)), + (e.safeDecode = (i, n) => Xb(e, i, n)), + (e.safeEncodeAsync = async (i, n) => Hb(e, i, n)), + (e.safeDecodeAsync = async (i, n) => Yb(e, i, n)), + (e.refine = (i, n) => e.check(Cy(i, n))), + (e.superRefine = (i) => e.check(Ly(i))), + (e.overwrite = (i) => e.check($t(i))), + (e.optional = () => qi(e)), + (e.nullable = () => Xi(e)), + (e.nullish = () => qi(Xi(e))), + (e.nonoptional = (i) => Iy(e, i)), + (e.array = () => mo(e)), + (e.or = (i) => Pd([e, i])), + (e.and = (i) => my(e, i)), + (e.transform = (i) => Hi(e, Zd(i))), + (e.default = (i) => xy(e, i)), + (e.prefault = (i) => Sy(e, i)), + (e.catch = (i) => Oy(e, i)), + (e.pipe = (i) => Hi(e, i)), + (e.readonly = () => Ny(e)), + (e.describe = (i) => { + let n = e.clone(); + return (mt.add(n, { description: i }), n); + }), + Object.defineProperty(e, 'description', { + get() { + var i; + return (i = mt.get(e)) == null ? void 0 : i.description; + }, + configurable: !0, + }), + (e.meta = (...i) => { + if (i.length === 0) return mt.get(e); + let n = e.clone(); + return (mt.add(n, i[0]), n); + }), + (e.isOptional = () => e.safeParse(void 0).success), + (e.isNullable = () => e.safeParse(null).success), + e + ), + ), + ld = y('_ZodString', (e, t) => { + var i, n, r; + (ar.init(e, t), C.init(e, t)); + let o = e._zod.bag; + ((e.format = (i = o.format) != null ? i : null), + (e.minLength = (n = o.minimum) != null ? n : null), + (e.maxLength = (r = o.maximum) != null ? r : null), + (e.regex = (...s) => e.check(ql(...s))), + (e.includes = (...s) => e.check(Yl(...s))), + (e.startsWith = (...s) => e.check(Ql(...s))), + (e.endsWith = (...s) => e.check(ed(...s))), + (e.min = (...s) => e.check(Wt(...s))), + (e.max = (...s) => e.check(io(...s))), + (e.length = (...s) => e.check(oo(...s))), + (e.nonempty = (...s) => e.check(Wt(1, ...s))), + (e.lowercase = (s) => e.check(Xl(s))), + (e.uppercase = (s) => e.check(Hl(s))), + (e.trim = () => e.check(rd())), + (e.normalize = (...s) => e.check(nd(...s))), + (e.toLowerCase = () => e.check(id())), + (e.toUpperCase = () => e.check(od()))); + }), + ao = y('ZodString', (e, t) => { + (ar.init(e, t), + ld.init(e, t), + (e.email = (i) => e.check(jl(dd, i))), + (e.url = (i) => e.check(no(so, i))), + (e.jwt = (i) => e.check(Gl(Id, i))), + (e.emoji = (i) => e.check(Dl(md, i))), + (e.guid = (i) => e.check(Gi(Ki, i))), + (e.uuid = (i) => e.check(Ol(Le, i))), + (e.uuidv4 = (i) => e.check(Ul(Le, i))), + (e.uuidv6 = (i) => e.check(Pl(Le, i))), + (e.uuidv7 = (i) => e.check(Nl(Le, i))), + (e.nanoid = (i) => e.check(Zl(pd, i))), + (e.guid = (i) => e.check(Gi(Ki, i))), + (e.cuid = (i) => e.check(El(fd, i))), + (e.cuid2 = (i) => e.check(Tl(vd, i))), + (e.ulid = (i) => e.check(Al(gd, i))), + (e.base64 = (i) => e.check(Ml(xd, i))), + (e.base64url = (i) => e.check(Wl(wd, i))), + (e.xid = (i) => e.check(Cl(hd, i))), + (e.ksuid = (i) => e.check(Ll(bd, i))), + (e.ipv4 = (i) => e.check(Rl(yd, i))), + (e.ipv6 = (i) => e.check(Jl($d, i))), + (e.cidrv4 = (i) => e.check(Fl(_d, i))), + (e.cidrv6 = (i) => e.check(Vl(kd, i))), + (e.e164 = (i) => e.check(Bl(Sd, i))), + (e.datetime = (i) => e.check(Tb(i))), + (e.date = (i) => e.check(Ab(i))), + (e.time = (i) => e.check(Cb(i))), + (e.duration = (i) => e.check(Lb(i)))); + }); + function Xc(e) { + return Bh(ao, e); + } + var G = y('ZodStringFormat', (e, t) => { + (W.init(e, t), ld.init(e, t)); + }), + dd = y('ZodEmail', (e, t) => { + (Ng.init(e, t), G.init(e, t)); + }); + function h4(e) { + return jl(dd, e); + } + var Ki = y('ZodGUID', (e, t) => { + (Ug.init(e, t), G.init(e, t)); + }); + function b4(e) { + return Gi(Ki, e); + } + var Le = y('ZodUUID', (e, t) => { + (Pg.init(e, t), G.init(e, t)); + }); + function y4(e) { + return Ol(Le, e); + } + function $4(e) { + return Ul(Le, e); + } + function _4(e) { + return Pl(Le, e); + } + function k4(e) { + return Nl(Le, e); + } + var so = y('ZodURL', (e, t) => { + (Dg.init(e, t), G.init(e, t)); + }); + function x4(e) { + return no(so, e); + } + function w4(e) { + return no(so, { + protocol: /^https?$/, + hostname: yt.domain, + ...F.normalizeParams(e), + }); + } + var md = y('ZodEmoji', (e, t) => { + (Zg.init(e, t), G.init(e, t)); + }); + function S4(e) { + return Dl(md, e); + } + var pd = y('ZodNanoID', (e, t) => { + (Eg.init(e, t), G.init(e, t)); + }); + function I4(e) { + return Zl(pd, e); + } + var fd = y('ZodCUID', (e, t) => { + (Tg.init(e, t), G.init(e, t)); + }); + function z4(e) { + return El(fd, e); + } + var vd = y('ZodCUID2', (e, t) => { + (Ag.init(e, t), G.init(e, t)); + }); + function j4(e) { + return Tl(vd, e); + } + var gd = y('ZodULID', (e, t) => { + (Cg.init(e, t), G.init(e, t)); + }); + function O4(e) { + return Al(gd, e); + } + var hd = y('ZodXID', (e, t) => { + (Lg.init(e, t), G.init(e, t)); + }); + function U4(e) { + return Cl(hd, e); + } + var bd = y('ZodKSUID', (e, t) => { + (Rg.init(e, t), G.init(e, t)); + }); + function P4(e) { + return Ll(bd, e); + } + var yd = y('ZodIPv4', (e, t) => { + (Wg.init(e, t), G.init(e, t)); + }); + function N4(e) { + return Rl(yd, e); + } + var $d = y('ZodIPv6', (e, t) => { + (Bg.init(e, t), G.init(e, t)); + }); + function D4(e) { + return Jl($d, e); + } + var _d = y('ZodCIDRv4', (e, t) => { + (Gg.init(e, t), G.init(e, t)); + }); + function Z4(e) { + return Fl(_d, e); + } + var kd = y('ZodCIDRv6', (e, t) => { + (Kg.init(e, t), G.init(e, t)); + }); + function E4(e) { + return Vl(kd, e); + } + var xd = y('ZodBase64', (e, t) => { + (qg.init(e, t), G.init(e, t)); + }); + function T4(e) { + return Ml(xd, e); + } + var wd = y('ZodBase64URL', (e, t) => { + (Hg.init(e, t), G.init(e, t)); + }); + function A4(e) { + return Wl(wd, e); + } + var Sd = y('ZodE164', (e, t) => { + (Yg.init(e, t), G.init(e, t)); + }); + function C4(e) { + return Bl(Sd, e); + } + var Id = y('ZodJWT', (e, t) => { + (eh.init(e, t), G.init(e, t)); + }); + function L4(e) { + return Gl(Id, e); + } + var ur = y('ZodCustomStringFormat', (e, t) => { + (th.init(e, t), G.init(e, t)); + }); + function R4(e, t, i = {}) { + return sr(ur, e, t, i); + } + function J4(e) { + return sr(ur, 'hostname', yt.hostname, e); + } + function F4(e) { + return sr(ur, 'hex', yt.hex, e); + } + function V4(e, t) { + var i; + let n = `${e}_${(i = t?.enc) != null ? i : 'hex'}`, + r = yt[n]; + if (!r) throw new Error(`Unrecognized hash format: ${n}`); + return sr(ur, n, r, t); + } + var uo = y('ZodNumber', (e, t) => { + var i, n, r, o, s, u, a, c, m; + (yl.init(e, t), + C.init(e, t), + (e.gt = (f, v) => e.check(ht(f, v))), + (e.gte = (f, v) => e.check(pe(f, v))), + (e.min = (f, v) => e.check(pe(f, v))), + (e.lt = (f, v) => e.check(gt(f, v))), + (e.lte = (f, v) => e.check(Se(f, v))), + (e.max = (f, v) => e.check(Se(f, v))), + (e.int = (f) => e.check(Hc(f))), + (e.safe = (f) => e.check(Hc(f))), + (e.positive = (f) => e.check(ht(0, f))), + (e.nonnegative = (f) => e.check(pe(0, f))), + (e.negative = (f) => e.check(gt(0, f))), + (e.nonpositive = (f) => e.check(Se(0, f))), + (e.multipleOf = (f, v) => e.check(Kn(f, v))), + (e.step = (f, v) => e.check(Kn(f, v))), + (e.finite = () => e)); + let p = e._zod.bag; + ((e.minValue = + (r = Math.max( + (i = p.minimum) != null ? i : Number.NEGATIVE_INFINITY, + (n = p.exclusiveMinimum) != null ? n : Number.NEGATIVE_INFINITY, + )) != null + ? r + : null), + (e.maxValue = + (u = Math.min( + (o = p.maximum) != null ? o : Number.POSITIVE_INFINITY, + (s = p.exclusiveMaximum) != null ? s : Number.POSITIVE_INFINITY, + )) != null + ? u + : null), + (e.isInt = + ((a = p.format) != null ? a : '').includes('int') || + Number.isSafeInteger((c = p.multipleOf) != null ? c : 0.5)), + (e.isFinite = !0), + (e.format = (m = p.format) != null ? m : null)); + }); + function Qb(e) { + return Qh(uo, e); + } + var Gt = y('ZodNumberFormat', (e, t) => { + (nh.init(e, t), uo.init(e, t)); + }); + function Hc(e) { + return tb(Gt, e); + } + function M4(e) { + return nb(Gt, e); + } + function W4(e) { + return rb(Gt, e); + } + function B4(e) { + return ib(Gt, e); + } + function G4(e) { + return ob(Gt, e); + } + var co = y('ZodBoolean', (e, t) => { + ($l.init(e, t), C.init(e, t)); + }); + function ey(e) { + return ab(co, e); + } + var lo = y('ZodBigInt', (e, t) => { + var i, n, r; + (_l.init(e, t), + C.init(e, t), + (e.gte = (s, u) => e.check(pe(s, u))), + (e.min = (s, u) => e.check(pe(s, u))), + (e.gt = (s, u) => e.check(ht(s, u))), + (e.gte = (s, u) => e.check(pe(s, u))), + (e.min = (s, u) => e.check(pe(s, u))), + (e.lt = (s, u) => e.check(gt(s, u))), + (e.lte = (s, u) => e.check(Se(s, u))), + (e.max = (s, u) => e.check(Se(s, u))), + (e.positive = (s) => e.check(ht(BigInt(0), s))), + (e.negative = (s) => e.check(gt(BigInt(0), s))), + (e.nonpositive = (s) => e.check(Se(BigInt(0), s))), + (e.nonnegative = (s) => e.check(pe(BigInt(0), s))), + (e.multipleOf = (s, u) => e.check(Kn(s, u)))); + let o = e._zod.bag; + ((e.minValue = (i = o.minimum) != null ? i : null), + (e.maxValue = (n = o.maximum) != null ? n : null), + (e.format = (r = o.format) != null ? r : null)); + }); + function K4(e) { + return ub(lo, e); + } + var zd = y('ZodBigIntFormat', (e, t) => { + (rh.init(e, t), lo.init(e, t)); + }); + function q4(e) { + return lb(zd, e); + } + function X4(e) { + return db(zd, e); + } + var ty = y('ZodSymbol', (e, t) => { + (ih.init(e, t), C.init(e, t)); + }); + function H4(e) { + return mb(ty, e); + } + var ny = y('ZodUndefined', (e, t) => { + (oh.init(e, t), C.init(e, t)); + }); + function Y4(e) { + return pb(ny, e); + } + var ry = y('ZodNull', (e, t) => { + (ah.init(e, t), C.init(e, t)); + }); + function iy(e) { + return fb(ry, e); + } + var oy = y('ZodAny', (e, t) => { + (sh.init(e, t), C.init(e, t)); + }); + function Q4() { + return vb(oy); + } + var ay = y('ZodUnknown', (e, t) => { + (uh.init(e, t), C.init(e, t)); + }); + function Bt() { + return gb(ay); + } + var sy = y('ZodNever', (e, t) => { + (ch.init(e, t), C.init(e, t)); + }); + function jd(e) { + return hb(sy, e); + } + var uy = y('ZodVoid', (e, t) => { + (lh.init(e, t), C.init(e, t)); + }); + function e6(e) { + return bb(uy, e); + } + var Od = y('ZodDate', (e, t) => { + (dh.init(e, t), + C.init(e, t), + (e.min = (n, r) => e.check(pe(n, r))), + (e.max = (n, r) => e.check(Se(n, r)))); + let i = e._zod.bag; + ((e.minDate = i.minimum ? new Date(i.minimum) : null), + (e.maxDate = i.maximum ? new Date(i.maximum) : null)); + }); + function t6(e) { + return yb(Od, e); + } + var cy = y('ZodArray', (e, t) => { + (mh.init(e, t), + C.init(e, t), + (e.element = t.element), + (e.min = (i, n) => e.check(Wt(i, n))), + (e.nonempty = (i) => e.check(Wt(1, i))), + (e.max = (i, n) => e.check(io(i, n))), + (e.length = (i, n) => e.check(oo(i, n))), + (e.unwrap = () => e.element)); + }); + function mo(e, t) { + return zb(cy, e, t); + } + function n6(e) { + let t = e._zod.def.shape; + return Dd(Object.keys(t)); + } + var po = y('ZodObject', (e, t) => { + (gh.init(e, t), + C.init(e, t), + F.defineLazy(e, 'shape', () => t.shape), + (e.keyof = () => Dd(Object.keys(e._zod.def.shape))), + (e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i })), + (e.passthrough = () => e.clone({ ...e._zod.def, catchall: Bt() })), + (e.loose = () => e.clone({ ...e._zod.def, catchall: Bt() })), + (e.strict = () => e.clone({ ...e._zod.def, catchall: jd() })), + (e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 })), + (e.extend = (i) => F.extend(e, i)), + (e.safeExtend = (i) => F.safeExtend(e, i)), + (e.merge = (i) => F.merge(e, i)), + (e.pick = (i) => F.pick(e, i)), + (e.omit = (i) => F.omit(e, i)), + (e.partial = (...i) => F.partial(Ed, e, i[0])), + (e.required = (...i) => F.required(Td, e, i[0]))); + }); + function r6(e, t) { + let i = { type: 'object', shape: e ?? {}, ...F.normalizeParams(t) }; + return new po(i); + } + function i6(e, t) { + return new po({ + type: 'object', + shape: e, + catchall: jd(), + ...F.normalizeParams(t), + }); + } + function o6(e, t) { + return new po({ + type: 'object', + shape: e, + catchall: Bt(), + ...F.normalizeParams(t), + }); + } + var Ud = y('ZodUnion', (e, t) => { + (kl.init(e, t), C.init(e, t), (e.options = t.options)); + }); + function Pd(e, t) { + return new Ud({ type: 'union', options: e, ...F.normalizeParams(t) }); + } + var ly = y('ZodDiscriminatedUnion', (e, t) => { + (Ud.init(e, t), hh.init(e, t)); + }); + function a6(e, t, i) { + return new ly({ + type: 'union', + options: t, + discriminator: e, + ...F.normalizeParams(i), + }); + } + var dy = y('ZodIntersection', (e, t) => { + (bh.init(e, t), C.init(e, t)); + }); + function my(e, t) { + return new dy({ type: 'intersection', left: e, right: t }); + } + var py = y('ZodTuple', (e, t) => { + (xl.init(e, t), + C.init(e, t), + (e.rest = (i) => e.clone({ ...e._zod.def, rest: i }))); + }); + function fy(e, t, i) { + let n = t instanceof E, + r = n ? i : t; + return new py({ + type: 'tuple', + items: e, + rest: n ? t : null, + ...F.normalizeParams(r), + }); + } + var Nd = y('ZodRecord', (e, t) => { + (yh.init(e, t), + C.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function vy(e, t, i) { + return new Nd({ + type: 'record', + keyType: e, + valueType: t, + ...F.normalizeParams(i), + }); + } + function s6(e, t, i) { + let n = _e(e); + return ( + (n._zod.values = void 0), + new Nd({ + type: 'record', + keyType: n, + valueType: t, + ...F.normalizeParams(i), + }) + ); + } + var gy = y('ZodMap', (e, t) => { + ($h.init(e, t), + C.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function u6(e, t, i) { + return new gy({ + type: 'map', + keyType: e, + valueType: t, + ...F.normalizeParams(i), + }); + } + var hy = y('ZodSet', (e, t) => { + (_h.init(e, t), + C.init(e, t), + (e.min = (...i) => e.check(qn(...i))), + (e.nonempty = (i) => e.check(qn(1, i))), + (e.max = (...i) => e.check(ro(...i))), + (e.size = (...i) => e.check(Kl(...i)))); + }); + function c6(e, t) { + return new hy({ type: 'set', valueType: e, ...F.normalizeParams(t) }); + } + var Xn = y('ZodEnum', (e, t) => { + (kh.init(e, t), + C.init(e, t), + (e.enum = t.entries), + (e.options = Object.values(t.entries))); + let i = new Set(Object.keys(t.entries)); + ((e.extract = (n, r) => { + let o = {}; + for (let s of n) { + if (!i.has(s)) throw new Error(`Key ${s} not found in enum`); + o[s] = t.entries[s]; + } + return new Xn({ ...t, checks: [], ...F.normalizeParams(r), entries: o }); + }), + (e.exclude = (n, r) => { + let o = { ...t.entries }; + for (let s of n) { + if (!i.has(s)) throw new Error(`Key ${s} not found in enum`); + delete o[s]; + } + return new Xn({ + ...t, + checks: [], + ...F.normalizeParams(r), + entries: o, + }); + })); + }); + function Dd(e, t) { + let i = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e; + return new Xn({ type: 'enum', entries: i, ...F.normalizeParams(t) }); + } + function l6(e, t) { + return new Xn({ type: 'enum', entries: e, ...F.normalizeParams(t) }); + } + var by = y('ZodLiteral', (e, t) => { + (xh.init(e, t), + C.init(e, t), + (e.values = new Set(t.values)), + Object.defineProperty(e, 'value', { + get() { + if (t.values.length > 1) + throw new Error( + 'This schema contains multiple valid literal values. Use `.values` instead.', + ); + return t.values[0]; + }, + })); + }); + function d6(e, t) { + return new by({ + type: 'literal', + values: Array.isArray(e) ? e : [e], + ...F.normalizeParams(t), + }); + } + var yy = y('ZodFile', (e, t) => { + (wh.init(e, t), + C.init(e, t), + (e.min = (i, n) => e.check(qn(i, n))), + (e.max = (i, n) => e.check(ro(i, n))), + (e.mime = (i, n) => e.check(td(Array.isArray(i) ? i : [i], n)))); + }); + function m6(e) { + return jb(yy, e); + } + var $y = y('ZodTransform', (e, t) => { + (Sh.init(e, t), + C.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new Yi(e.constructor.name); + i.addIssue = (o) => { + if (typeof o == 'string') i.issues.push(F.issue(o, i.value, t)); + else { + let s = o; + (s.fatal && (s.continue = !1), + s.code != null || (s.code = 'custom'), + s.input != null || (s.input = i.value), + s.inst != null || (s.inst = e), + i.issues.push(F.issue(s))); + } + }; + let r = t.transform(i.value, i); + return r instanceof Promise + ? r.then((o) => ((i.value = o), i)) + : ((i.value = r), i); + })); + }); + function Zd(e) { + return new $y({ type: 'transform', transform: e }); + } + var Ed = y('ZodOptional', (e, t) => { + (Ih.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function qi(e) { + return new Ed({ type: 'optional', innerType: e }); + } + var _y = y('ZodNullable', (e, t) => { + (zh.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Xi(e) { + return new _y({ type: 'nullable', innerType: e }); + } + function p6(e) { + return qi(Xi(e)); + } + var ky = y('ZodDefault', (e, t) => { + (jh.init(e, t), + C.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeDefault = e.unwrap)); + }); + function xy(e, t) { + return new ky({ + type: 'default', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : F.shallowClone(t); + }, + }); + } + var wy = y('ZodPrefault', (e, t) => { + (Oh.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Sy(e, t) { + return new wy({ + type: 'prefault', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : F.shallowClone(t); + }, + }); + } + var Td = y('ZodNonOptional', (e, t) => { + (Uh.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Iy(e, t) { + return new Td({ + type: 'nonoptional', + innerType: e, + ...F.normalizeParams(t), + }); + } + var zy = y('ZodSuccess', (e, t) => { + (Ph.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function f6(e) { + return new zy({ type: 'success', innerType: e }); + } + var jy = y('ZodCatch', (e, t) => { + (Nh.init(e, t), + C.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeCatch = e.unwrap)); + }); + function Oy(e, t) { + return new jy({ + type: 'catch', + innerType: e, + catchValue: typeof t == 'function' ? t : () => t, + }); + } + var Uy = y('ZodNaN', (e, t) => { + (Dh.init(e, t), C.init(e, t)); + }); + function v6(e) { + return _b(Uy, e); + } + var Ad = y('ZodPipe', (e, t) => { + (Zh.init(e, t), C.init(e, t), (e.in = t.in), (e.out = t.out)); + }); + function Hi(e, t) { + return new Ad({ type: 'pipe', in: e, out: t }); + } + var Cd = y('ZodCodec', (e, t) => { + (Ad.init(e, t), wl.init(e, t)); + }); + function g6(e, t, i) { + return new Cd({ + type: 'pipe', + in: e, + out: t, + transform: i.decode, + reverseTransform: i.encode, + }); + } + var Py = y('ZodReadonly', (e, t) => { + (Eh.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Ny(e) { + return new Py({ type: 'readonly', innerType: e }); + } + var Dy = y('ZodTemplateLiteral', (e, t) => { + (Th.init(e, t), C.init(e, t)); + }); + function h6(e, t) { + return new Dy({ + type: 'template_literal', + parts: e, + ...F.normalizeParams(t), + }); + } + var Zy = y('ZodLazy', (e, t) => { + (Lh.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.getter())); + }); + function Ey(e) { + return new Zy({ type: 'lazy', getter: e }); + } + var Ty = y('ZodPromise', (e, t) => { + (Ch.init(e, t), C.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function b6(e) { + return new Ty({ type: 'promise', innerType: e }); + } + var Ay = y('ZodFunction', (e, t) => { + (Ah.init(e, t), C.init(e, t)); + }); + function lv(e) { + var t, i; + return new Ay({ + type: 'function', + input: Array.isArray(e?.input) + ? fy(e?.input) + : (t = e?.input) != null + ? t + : mo(Bt()), + output: (i = e?.output) != null ? i : Bt(), + }); + } + var fo = y('ZodCustom', (e, t) => { + (Rh.init(e, t), C.init(e, t)); + }); + function y6(e) { + let t = new K({ check: 'custom' }); + return ((t._zod.check = e), t); + } + function $6(e, t) { + return Ob(fo, e ?? (() => !0), t); + } + function Cy(e, t = {}) { + return Ub(fo, e, t); + } + function Ly(e) { + return Pb(e); + } + function _6(e, t = { error: `Input not instance of ${e.name}` }) { + let i = new fo({ + type: 'custom', + check: 'custom', + fn: (n) => n instanceof e, + abort: !0, + ...F.normalizeParams(t), + }); + return ((i._zod.bag.Class = e), i); + } + var k6 = (...e) => Db({ Codec: Cd, Boolean: co, String: ao }, ...e); + function x6(e) { + let t = Ey(() => Pd([Xc(e), Qb(), ey(), iy(), mo(t), vy(Xc(), t)])); + return t; + } + function w6(e, t) { + return Hi(Zd(e), t); + } + var Yc, + S6 = { + invalid_type: 'invalid_type', + too_big: 'too_big', + too_small: 'too_small', + invalid_format: 'invalid_format', + not_multiple_of: 'not_multiple_of', + unrecognized_keys: 'unrecognized_keys', + invalid_union: 'invalid_union', + invalid_key: 'invalid_key', + invalid_element: 'invalid_element', + invalid_value: 'invalid_value', + custom: 'custom', + }; + function I6(e) { + ae({ customError: e }); + } + function z6() { + return ae().customError; + } + Yc || (Yc = {}); + var Ry = {}; + function j6(e) { + return Gh(ao, e); + } + function O6(e) { + return eb(uo, e); + } + function U6(e) { + return sb(co, e); + } + function P6(e) { + return cb(lo, e); + } + function N6(e) { + return $b(Od, e); + } + ($e(Ry, { + bigint: () => P6, + boolean: () => U6, + date: () => N6, + number: () => O6, + string: () => j6, + }), + ae(Jh())); + var D6 = Object.defineProperty, + _t = (e, t) => { + for (var i in t) D6(e, i, { get: t[i], enumerable: !0 }); + }; + function T(e, t, i = 'draft-7') { + return l.toJSONSchema(e, { target: i }); + } + var pt = l.string(), + Z6 = l.number(), + Hn = (l.boolean(), l.string().min(1)), + Qc = l.number().int().positive(), + el = l.number().int().nonnegative(), + Jy = l.number().describe('Tagging version number'); + l.union([l.string(), l.number(), l.boolean()]).optional(); + _t( + {}, + { + ErrorHandlerSchema: () => kt, + HandlerSchema: () => Wy, + LogHandlerSchema: () => Kt, + StorageSchema: () => My, + StorageTypeSchema: () => Vy, + errorHandlerJsonSchema: () => A6, + handlerJsonSchema: () => L6, + logHandlerJsonSchema: () => C6, + storageJsonSchema: () => T6, + storageTypeJsonSchema: () => E6, + }, + ); + var Fy, + Vy = l + .enum(['local', 'session', 'cookie']) + .describe('Storage mechanism: local, session, or cookie'), + My = l + .object({ + Local: l.literal('local'), + Session: l.literal('session'), + Cookie: l.literal('cookie'), + }) + .describe('Storage type constants for type-safe references'), + kt = l.any().describe('Error handler function: (error, state?) => void'), + Kt = l.any().describe('Log handler function: (message, verbose?) => void'), + Wy = l + .object({ + Error: kt.describe('Error handler function'), + Log: Kt.describe('Log handler function'), + }) + .describe('Handler interface with error and log functions'), + E6 = T(Vy), + T6 = T(My), + A6 = T(kt), + C6 = T(Kt), + L6 = T(Wy); + (l + .object({ + onError: kt + .optional() + .describe('Error handler function: (error, state?) => void'), + onLog: Kt.optional().describe( + 'Log handler function: (message, verbose?) => void', + ), + }) + .partial(), + l + .object({ + verbose: l + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + }) + .partial(), + l + .object({ + queue: l + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + }) + .partial(), + l.object({}).partial(), + l + .object({ + init: l + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: l + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + }) + .partial(), + l + .object({ + disabled: l.boolean().describe('Set to true to disable').optional(), + }) + .partial(), + l + .object({ + primary: l + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .partial(), + l + .object({ + settings: l + .any() + .optional() + .describe('Implementation-specific configuration'), + }) + .partial(), + l + .object({ + env: l + .any() + .optional() + .describe('Environment dependencies (platform-specific)'), + }) + .partial(), + l + .object({ + type: l.string().optional().describe('Instance type identifier'), + config: l.unknown().describe('Instance configuration'), + }) + .partial(), + l + .object({ + collector: l.unknown().describe('Collector instance (runtime object)'), + config: l.unknown().describe('Configuration'), + env: l.unknown().describe('Environment dependencies'), + }) + .partial(), + l + .object({ + batch: l + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + batched: l + .unknown() + .optional() + .describe('Batch of events to be processed'), + }) + .partial(), + l + .object({ + ignore: l + .boolean() + .describe('Set to true to skip processing') + .optional(), + condition: l + .string() + .optional() + .describe('Condition function: return true to process'), + }) + .partial(), + l + .object({ + sources: l + .record(l.string(), l.unknown()) + .describe('Map of source instances'), + }) + .partial(), + l + .object({ + destinations: l + .record(l.string(), l.unknown()) + .describe('Map of destination instances'), + }) + .partial()); + _t( + {}, + { + ConsentSchema: () => Re, + DeepPartialEventSchema: () => R6, + EntitiesSchema: () => Ky, + EntitySchema: () => ho, + EventSchema: () => ze, + OrderedPropertiesSchema: () => go, + PartialEventSchema: () => qy, + PropertiesSchema: () => oe, + PropertySchema: () => vo, + PropertyTypeSchema: () => tl, + SourceSchema: () => Gy, + SourceTypeSchema: () => Ld, + UserSchema: () => cr, + VersionSchema: () => By, + consentJsonSchema: () => K6, + entityJsonSchema: () => B6, + eventJsonSchema: () => J6, + orderedPropertiesJsonSchema: () => W6, + partialEventJsonSchema: () => F6, + propertiesJsonSchema: () => M6, + sourceTypeJsonSchema: () => G6, + userJsonSchema: () => V6, + }, + ); + var tl = l.lazy(() => + l.union([l.boolean(), l.string(), l.number(), l.record(l.string(), vo)]), + ), + vo = l.lazy(() => l.union([tl, l.array(tl)])), + oe = l + .record(l.string(), vo.optional()) + .describe('Flexible property collection with optional values'), + go = l + .record(l.string(), l.tuple([vo, l.number()]).optional()) + .describe( + 'Ordered properties with [value, order] tuples for priority control', + ), + Ld = l + .union([l.enum(['web', 'server', 'app', 'other']), l.string()]) + .describe('Source type: web, server, app, other, or custom'), + Re = l + .record(l.string(), l.boolean()) + .describe('Consent requirement mapping (group name → state)'), + cr = oe + .and( + l.object({ + id: l.string().optional().describe('User identifier'), + device: l.string().optional().describe('Device identifier'), + session: l.string().optional().describe('Session identifier'), + hash: l.string().optional().describe('Hashed identifier'), + address: l.string().optional().describe('User address'), + email: l.string().email().optional().describe('User email address'), + phone: l.string().optional().describe('User phone number'), + userAgent: l + .string() + .optional() + .describe('Browser user agent string'), + browser: l.string().optional().describe('Browser name'), + browserVersion: l.string().optional().describe('Browser version'), + deviceType: l + .string() + .optional() + .describe('Device type (mobile, desktop, tablet)'), + os: l.string().optional().describe('Operating system'), + osVersion: l.string().optional().describe('Operating system version'), + screenSize: l.string().optional().describe('Screen dimensions'), + language: l.string().optional().describe('User language'), + country: l.string().optional().describe('User country'), + region: l.string().optional().describe('User region/state'), + city: l.string().optional().describe('User city'), + zip: l.string().optional().describe('User postal code'), + timezone: l.string().optional().describe('User timezone'), + ip: l.string().optional().describe('User IP address'), + internal: l + .boolean() + .optional() + .describe('Internal user flag (employee, test user)'), + }), + ) + .describe('User identification and properties'), + By = oe + .and( + l.object({ + source: pt.describe('Walker implementation version (e.g., "2.0.0")'), + tagging: Jy, + }), + ) + .describe('Walker version information'), + Gy = oe + .and( + l.object({ + type: Ld.describe('Source type identifier'), + id: pt.describe('Source identifier (typically URL on web)'), + previous_id: pt.describe( + 'Previous source identifier (typically referrer on web)', + ), + }), + ) + .describe('Event source information'), + ho = l + .lazy(() => + l.object({ + entity: l.string().describe('Entity name'), + data: oe.describe('Entity-specific properties'), + nested: l.array(ho).describe('Nested child entities'), + context: go.describe('Entity context data'), + }), + ) + .describe('Nested entity structure with recursive nesting support'), + Ky = l.array(ho).describe('Array of nested entities'), + ze = l + .object({ + name: l + .string() + .describe( + 'Event name in "entity action" format (e.g., "page view", "product add")', + ), + data: oe.describe('Event-specific properties'), + context: go.describe('Ordered context properties with priorities'), + globals: oe.describe('Global properties shared across events'), + custom: oe.describe('Custom implementation-specific properties'), + user: cr.describe('User identification and attributes'), + nested: Ky.describe('Related nested entities'), + consent: Re.describe('Consent states at event time'), + id: Hn.describe('Unique event identifier (timestamp-based)'), + trigger: pt.describe('Event trigger identifier'), + entity: pt.describe('Parsed entity from event name'), + action: pt.describe('Parsed action from event name'), + timestamp: Qc.describe('Unix timestamp in milliseconds since epoch'), + timing: Z6.describe('Event processing timing information'), + group: pt.describe('Event grouping identifier'), + count: el.describe('Event count in session'), + version: By.describe('Walker version information'), + source: Gy.describe('Event source information'), + }) + .describe('Complete walkerOS event structure'), + qy = ze + .partial() + .describe('Partial event structure with all fields optional'), + R6 = ze + .partial() + .describe('Partial event structure with all top-level fields optional'), + J6 = T(ze), + F6 = T(qy), + V6 = T(cr), + M6 = T(oe), + W6 = T(go), + B6 = T(ho), + G6 = T(Ld), + K6 = T(Re); + _t( + {}, + { + ConfigSchema: () => $o, + LoopSchema: () => Rd, + MapSchema: () => Fd, + PolicySchema: () => qt, + ResultSchema: () => q6, + RuleSchema: () => He, + RulesSchema: () => yo, + SetSchema: () => Jd, + ValueConfigSchema: () => Xy, + ValueSchema: () => ye, + ValuesSchema: () => bo, + configJsonSchema: () => iO, + loopJsonSchema: () => Y6, + mapJsonSchema: () => eO, + policyJsonSchema: () => tO, + ruleJsonSchema: () => nO, + rulesJsonSchema: () => rO, + setJsonSchema: () => Q6, + valueConfigJsonSchema: () => H6, + valueJsonSchema: () => X6, + }, + ); + var ye = l.lazy(() => + l.union([ + l.string().describe('String value or property path (e.g., "data.id")'), + l.number().describe('Numeric value'), + l.boolean().describe('Boolean value'), + l.lazy(() => Fy), + l.array(ye).describe('Array of values'), + ]), + ), + bo = l.array(ye).describe('Array of transformation values'), + Rd = l.lazy(() => + l + .tuple([ye, ye]) + .describe( + 'Loop transformation: [source, transform] tuple for array processing', + ), + ), + Jd = l.lazy(() => + l.array(ye).describe('Set: Array of values for selection or combination'), + ), + Fd = l.lazy(() => + l + .record(l.string(), ye) + .describe('Map: Object mapping keys to transformation values'), + ), + Xy = (Fy = l + .object({ + key: l + .string() + .optional() + .describe( + 'Property path to extract from event (e.g., "data.id", "user.email")', + ), + value: l + .union([l.string(), l.number(), l.boolean()]) + .optional() + .describe('Static primitive value'), + fn: l + .string() + .optional() + .describe('Custom transformation function as string (serialized)'), + map: Fd.optional().describe( + 'Object mapping: transform event data to structured output', + ), + loop: Rd.optional().describe( + 'Loop transformation: [source, transform] for array processing', + ), + set: Jd.optional().describe( + 'Set of values: combine or select from multiple values', + ), + consent: Re.optional().describe( + 'Required consent states to include this value', + ), + condition: l + .string() + .optional() + .describe( + 'Condition function as string: return true to include value', + ), + validate: l + .string() + .optional() + .describe( + 'Validation function as string: return true if value is valid', + ), + }) + .refine((e) => Object.keys(e).length > 0, { + message: 'ValueConfig must have at least one property', + }) + .describe('Value transformation configuration with multiple strategies')), + qt = l + .record(l.string(), ye) + .describe('Policy rules for event pre-processing (key → value mapping)'), + He = l + .object({ + batch: l + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + condition: l + .string() + .optional() + .describe( + 'Condition function as string: return true to process event', + ), + consent: Re.optional().describe( + 'Required consent states to process this event', + ), + settings: l + .any() + .optional() + .describe('Destination-specific settings for this event mapping'), + data: l + .union([ye, bo]) + .optional() + .describe('Data transformation rules for event'), + ignore: l + .boolean() + .optional() + .describe('Set to true to skip processing this event'), + name: l + .string() + .optional() + .describe( + 'Custom event name override (e.g., "view_item" for "product view")', + ), + policy: qt + .optional() + .describe( + 'Event-level policy overrides (applied after config-level policy)', + ), + }) + .describe('Mapping rule for specific entity-action combination'), + yo = l + .record( + l.string(), + l.record(l.string(), l.union([He, l.array(He)])).optional(), + ) + .describe( + 'Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support', + ), + $o = l + .object({ + consent: Re.optional().describe( + 'Required consent states to process any events', + ), + data: l + .union([ye, bo]) + .optional() + .describe('Global data transformation applied to all events'), + mapping: yo.optional().describe('Entity-action specific mapping rules'), + policy: qt + .optional() + .describe('Pre-processing policy rules applied before mapping'), + }) + .describe('Shared mapping configuration for sources and destinations'), + q6 = l + .object({ + eventMapping: He.optional().describe('Resolved mapping rule for event'), + mappingKey: l + .string() + .optional() + .describe('Mapping key used (e.g., "product.view")'), + }) + .describe('Mapping resolution result'), + X6 = T(ye), + H6 = T(Xy), + Y6 = T(Rd), + Q6 = T(Jd), + eO = T(Fd), + tO = T(qt), + nO = T(He), + rO = T(yo), + iO = T($o); + _t( + {}, + { + BatchSchema: () => Yy, + ConfigSchema: () => lr, + ContextSchema: () => Md, + DLQSchema: () => mO, + DataSchema: () => uO, + DestinationPolicySchema: () => oO, + DestinationsSchema: () => lO, + InitDestinationsSchema: () => cO, + InitSchema: () => Qy, + InstanceSchema: () => dr, + PartialConfigSchema: () => Vd, + PushBatchContextSchema: () => aO, + PushContextSchema: () => Wd, + PushEventSchema: () => Hy, + PushEventsSchema: () => sO, + PushResultSchema: () => dO, + RefSchema: () => Ji, + ResultSchema: () => e$, + batchJsonSchema: () => hO, + configJsonSchema: () => pO, + contextJsonSchema: () => vO, + instanceJsonSchema: () => bO, + partialConfigJsonSchema: () => fO, + pushContextJsonSchema: () => gO, + resultJsonSchema: () => yO, + }, + ); + var lr = l + .object({ + consent: Re.optional().describe( + 'Required consent states to send events to this destination', + ), + settings: l + .any() + .describe('Implementation-specific configuration') + .optional(), + data: l + .union([ye, bo]) + .optional() + .describe( + 'Global data transformation applied to all events for this destination', + ), + env: l + .any() + .describe('Environment dependencies (platform-specific)') + .optional(), + id: Hn.describe( + 'Destination instance identifier (defaults to destination key)', + ).optional(), + init: l + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: l + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + mapping: yo + .optional() + .describe( + 'Entity-action specific mapping rules for this destination', + ), + policy: qt + .optional() + .describe('Pre-processing policy rules applied before event mapping'), + queue: l + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + verbose: l + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + onError: kt.optional(), + onLog: Kt.optional(), + }) + .describe('Destination configuration'), + Vd = lr + .partial() + .describe('Partial destination configuration with all fields optional'), + oO = qt.describe('Destination policy rules for event pre-processing'), + Md = l + .object({ + collector: l.unknown().describe('Collector instance (runtime object)'), + config: lr.describe('Destination configuration'), + data: l + .union([l.unknown(), l.array(l.unknown())]) + .optional() + .describe('Transformed event data'), + env: l.unknown().describe('Environment dependencies'), + }) + .describe('Destination context for init and push functions'), + Wd = Md.extend({ + mapping: He.optional().describe( + 'Resolved mapping rule for this specific event', + ), + }).describe('Push context with event-specific mapping'), + aO = Wd.describe('Batch push context with event-specific mapping'), + Hy = l + .object({ + event: ze.describe('The event to process'), + mapping: He.optional().describe('Mapping rule for this event'), + }) + .describe('Event with optional mapping for batch processing'), + sO = l.array(Hy).describe('Array of events with mappings'), + Yy = l + .object({ + key: l + .string() + .describe('Batch key (usually mapping key like "product.view")'), + events: l.array(ze).describe('Array of events in batch'), + data: l + .array(l.union([l.unknown(), l.array(l.unknown())]).optional()) + .describe('Transformed data for each event'), + mapping: He.optional().describe('Shared mapping rule for batch'), + }) + .describe('Batch of events grouped by mapping key'), + uO = l + .union([l.unknown(), l.array(l.unknown())]) + .optional() + .describe('Transformed event data (Property, undefined, or array)'), + dr = l + .object({ + config: lr.describe('Destination configuration'), + queue: l + .array(ze) + .optional() + .describe('Queued events awaiting consent'), + dlq: l + .array(l.tuple([ze, l.unknown()])) + .optional() + .describe('Dead letter queue (failed events with errors)'), + type: l.string().optional().describe('Destination type identifier'), + env: l.unknown().optional().describe('Environment dependencies'), + init: l.unknown().optional().describe('Initialization function'), + push: l.unknown().describe('Push function for single events'), + pushBatch: l.unknown().optional().describe('Batch push function'), + on: l.unknown().optional().describe('Event lifecycle hook function'), + }) + .describe('Destination instance (runtime object with functions)'), + Qy = l + .object({ + code: dr.describe('Destination instance with implementation'), + config: Vd.optional().describe('Partial configuration overrides'), + env: l.unknown().optional().describe('Partial environment overrides'), + }) + .describe('Destination initialization configuration'), + cO = l + .record(l.string(), Qy) + .describe('Map of destination IDs to initialization configurations'), + lO = l + .record(l.string(), dr) + .describe('Map of destination IDs to runtime instances'), + Ji = l + .object({ + id: l.string().describe('Destination ID'), + destination: dr.describe('Destination instance'), + }) + .describe('Destination reference (ID + instance)'), + dO = l + .object({ + queue: l + .array(ze) + .optional() + .describe('Events queued (awaiting consent)'), + error: l.unknown().optional().describe('Error if push failed'), + }) + .describe('Push operation result'), + e$ = l + .object({ + successful: l + .array(Ji) + .describe('Destinations that processed successfully'), + queued: l.array(Ji).describe('Destinations that queued events'), + failed: l.array(Ji).describe('Destinations that failed to process'), + }) + .describe('Overall destination processing result'), + mO = l + .array(l.tuple([ze, l.unknown()])) + .describe('Dead letter queue: [(event, error), ...]'), + pO = T(lr), + fO = T(Vd), + vO = T(Md), + gO = T(Wd), + hO = T(Yy), + bO = T(dr), + yO = T(e$); + _t( + {}, + { + CommandTypeSchema: () => t$, + ConfigSchema: () => _o, + DestinationsSchema: () => o$, + InitConfigSchema: () => n$, + InstanceSchema: () => a$, + PushContextSchema: () => r$, + SessionDataSchema: () => Bd, + SourcesSchema: () => i$, + commandTypeJsonSchema: () => $O, + configJsonSchema: () => _O, + initConfigJsonSchema: () => xO, + instanceJsonSchema: () => SO, + pushContextJsonSchema: () => wO, + sessionDataJsonSchema: () => kO, + }, + ); + var t$ = l + .union([ + l.enum([ + 'action', + 'config', + 'consent', + 'context', + 'destination', + 'elb', + 'globals', + 'hook', + 'init', + 'link', + 'run', + 'user', + 'walker', + ]), + l.string(), + ]) + .describe( + 'Collector command type: standard commands or custom string for extensions', + ), + _o = l + .object({ + run: l + .boolean() + .describe('Whether to run collector automatically on initialization') + .optional(), + tagging: Jy, + globalsStatic: oe.describe( + 'Static global properties that persist across collector runs', + ), + sessionStatic: l + .record(l.string(), l.unknown()) + .describe('Static session data that persists across collector runs'), + verbose: l.boolean().describe('Enable verbose logging for debugging'), + onError: kt.optional(), + onLog: Kt.optional(), + }) + .describe('Core collector configuration'), + Bd = oe + .and( + l.object({ + isStart: l.boolean().describe('Whether this is a new session start'), + storage: l.boolean().describe('Whether storage is available'), + id: Hn.describe('Session identifier').optional(), + start: Qc.describe('Session start timestamp').optional(), + marketing: l + .literal(!0) + .optional() + .describe('Marketing attribution flag'), + updated: Qc.describe('Last update timestamp').optional(), + isNew: l + .boolean() + .describe('Whether this is a new session') + .optional(), + device: Hn.describe('Device identifier').optional(), + count: el.describe('Event count in session').optional(), + runs: el.describe('Number of runs').optional(), + }), + ) + .describe('Session state and tracking data'), + n$ = _o + .partial() + .extend({ + consent: Re.optional().describe('Initial consent state'), + user: cr.optional().describe('Initial user data'), + globals: oe.optional().describe('Initial global properties'), + sources: l.unknown().optional().describe('Source configurations'), + destinations: l + .unknown() + .optional() + .describe('Destination configurations'), + custom: oe + .optional() + .describe('Initial custom implementation-specific properties'), + }) + .describe('Collector initialization configuration with initial state'), + r$ = l + .object({ + mapping: $o.optional().describe('Source-level mapping configuration'), + }) + .describe('Push context with optional source mapping'), + i$ = l + .record(l.string(), l.unknown()) + .describe('Map of source IDs to source instances'), + o$ = l + .record(l.string(), l.unknown()) + .describe('Map of destination IDs to destination instances'), + a$ = l + .object({ + push: l.unknown().describe('Push function for processing events'), + command: l.unknown().describe('Command function for walker commands'), + allowed: l.boolean().describe('Whether event processing is allowed'), + config: _o.describe('Current collector configuration'), + consent: Re.describe('Current consent state'), + count: l.number().describe('Event count (increments with each event)'), + custom: oe.describe('Custom implementation-specific properties'), + sources: i$.describe('Registered source instances'), + destinations: o$.describe('Registered destination instances'), + globals: oe.describe('Current global properties'), + group: l.string().describe('Event grouping identifier'), + hooks: l.unknown().describe('Lifecycle hook functions'), + on: l.unknown().describe('Event lifecycle configuration'), + queue: l.array(ze).describe('Queued events awaiting processing'), + round: l + .number() + .describe('Collector run count (increments with each run)'), + session: l.union([Bd]).describe('Current session state'), + timing: l.number().describe('Event processing timing information'), + user: cr.describe('Current user data'), + version: l.string().describe('Walker implementation version'), + }) + .describe('Collector instance with state and methods'), + $O = T(t$), + _O = T(_o), + kO = T(Bd), + xO = T(n$), + wO = T(r$), + SO = T(a$); + _t( + {}, + { + BaseEnvSchema: () => ko, + ConfigSchema: () => xo, + InitSchema: () => u$, + InitSourceSchema: () => Kd, + InitSourcesSchema: () => c$, + InstanceSchema: () => s$, + PartialConfigSchema: () => Gd, + baseEnvJsonSchema: () => IO, + configJsonSchema: () => zO, + initSourceJsonSchema: () => UO, + initSourcesJsonSchema: () => PO, + instanceJsonSchema: () => OO, + partialConfigJsonSchema: () => jO, + }, + ); + var ko = l + .object({ + push: l.unknown().describe('Collector push function'), + command: l.unknown().describe('Collector command function'), + sources: l + .unknown() + .optional() + .describe('Map of registered source instances'), + elb: l + .unknown() + .describe('Public API function (alias for collector.push)'), + }) + .catchall(l.unknown()) + .describe( + 'Base environment for dependency injection - platform-specific sources extend this', + ), + xo = $o + .extend({ + settings: l + .any() + .describe('Implementation-specific configuration') + .optional(), + env: ko + .optional() + .describe('Environment dependencies (platform-specific)'), + id: Hn.describe( + 'Source identifier (defaults to source key)', + ).optional(), + onError: kt.optional(), + disabled: l.boolean().describe('Set to true to disable').optional(), + primary: l + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .describe('Source configuration with mapping and environment'), + Gd = xo + .partial() + .describe('Partial source configuration with all fields optional'), + s$ = l + .object({ + type: l + .string() + .describe('Source type identifier (e.g., "browser", "dataLayer")'), + config: xo.describe('Current source configuration'), + push: l + .any() + .describe( + 'Push function - THE HANDLER (flexible signature for platform compatibility)', + ), + destroy: l + .any() + .optional() + .describe('Cleanup function called when source is removed'), + on: l + .unknown() + .optional() + .describe('Lifecycle hook function for event types'), + }) + .describe('Source instance with push handler and lifecycle methods'), + u$ = l + .any() + .describe( + 'Source initialization function: (config, env) => Instance | Promise', + ), + Kd = l + .object({ + code: u$.describe('Source initialization function'), + config: Gd.optional().describe('Partial configuration overrides'), + env: ko.partial().optional().describe('Partial environment overrides'), + primary: l + .boolean() + .optional() + .describe('Mark as primary source (only one can be primary)'), + }) + .describe('Source initialization configuration'), + c$ = l + .record(l.string(), Kd) + .describe('Map of source IDs to initialization configurations'), + IO = T(ko), + zO = T(xo), + jO = T(Gd), + OO = T(s$), + UO = T(Kd), + PO = T(c$); + _t( + {}, + { + ConfigSchema: () => mr, + DestinationReferenceSchema: () => Xd, + PrimitiveSchema: () => l$, + SetupSchema: () => wo, + SourceReferenceSchema: () => qd, + configJsonSchema: () => AO, + destinationReferenceJsonSchema: () => LO, + parseConfig: () => ZO, + parseSetup: () => NO, + safeParseConfig: () => EO, + safeParseSetup: () => DO, + setupJsonSchema: () => TO, + sourceReferenceJsonSchema: () => CO, + }, + ); + var l$ = l + .union([l.string(), l.number(), l.boolean()]) + .describe('Primitive value: string, number, or boolean'), + qd = l + .object({ + package: l + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")', + ), + config: l + .unknown() + .optional() + .describe('Source-specific configuration object'), + env: l + .unknown() + .optional() + .describe('Source environment configuration'), + primary: l + .boolean() + .optional() + .describe( + 'Mark as primary source (provides main elb). Only one source should be primary.', + ), + }) + .describe('Source package reference with configuration'), + Xd = l + .object({ + package: l + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")', + ), + config: l + .unknown() + .optional() + .describe('Destination-specific configuration object'), + env: l + .unknown() + .optional() + .describe('Destination environment configuration'), + }) + .describe('Destination package reference with configuration'), + mr = l + .object({ + platform: l + .enum(['web', 'server'], { + error: 'Platform must be "web" or "server"', + }) + .describe( + 'Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection', + ), + sources: l + .record(l.string(), qd) + .optional() + .describe( + 'Source configurations (data capture) keyed by unique identifier', + ), + destinations: l + .record(l.string(), Xd) + .optional() + .describe( + 'Destination configurations (data output) keyed by unique identifier', + ), + collector: l + .unknown() + .optional() + .describe( + 'Collector configuration for event processing (uses Collector.InitConfig)', + ), + env: l + .record(l.string(), l.string()) + .optional() + .describe( + 'Environment-specific variables (override root-level variables)', + ), + }) + .passthrough() + .describe('Single environment configuration for one deployment target'), + wo = l + .object({ + version: l + .literal(1, { error: 'Only version 1 is currently supported' }) + .describe( + 'Configuration schema version (currently only 1 is supported)', + ), + $schema: l + .string() + .url('Schema URL must be a valid URL') + .optional() + .describe( + 'JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")', + ), + variables: l + .record(l.string(), l$) + .optional() + .describe( + 'Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)', + ), + definitions: l + .record(l.string(), l.unknown()) + .optional() + .describe( + 'Reusable configuration definitions (reference with JSON Schema $ref syntax)', + ), + environments: l + .record(l.string(), mr) + .refine((e) => Object.keys(e).length > 0, { + message: 'At least one environment is required', + }) + .describe( + 'Named environment configurations (e.g., web_prod, server_stage)', + ), + }) + .describe( + 'Complete multi-environment walkerOS configuration (walkeros.config.json)', + ); + function NO(e) { + return wo.parse(e); + } + function DO(e) { + return wo.safeParse(e); + } + function ZO(e) { + return mr.parse(e); + } + function EO(e) { + return mr.safeParse(e); + } + var TO = l.toJSONSchema(wo, { target: 'draft-7' }), + AO = T(mr), + CO = T(qd), + LO = T(Xd); + function d$(e) { + return l.toJSONSchema(e, { target: 'draft-7' }); + } + var RO = { merge: !0, shallow: !0, extend: !0 }; + function m$(e, t = {}, i = {}) { + i = { ...RO, ...i }; + let n = Object.entries(t).reduce((r, [o, s]) => { + let u = e[o]; + return ( + i.merge && Array.isArray(u) && Array.isArray(s) + ? (r[o] = s.reduce((a, c) => (a.includes(c) ? a : [...a, c]), [...u])) + : (i.extend || o in e) && (r[o] = s), + r + ); + }, {}); + return i.shallow ? { ...e, ...n } : (Object.assign(e, n), e); + } + function JO(e = 'entity action', t = {}) { + let i = t.timestamp || new Date().setHours(0, 13, 37, 0), + n = { + data: { + id: 'ers', + name: 'Everyday Ruck Snack', + color: 'black', + size: 'l', + price: 420, + }, + }, + r = { data: { id: 'cc', name: 'Cool Cap', size: 'one size', price: 42 } }; + return (function (o = {}) { + var s; + let u = o.timestamp || new Date().setHours(0, 13, 37, 0), + a = o.group || 'gr0up', + c = o.count || 1, + m = m$( + { + name: 'entity action', + data: { + string: 'foo', + number: 1, + boolean: !0, + array: [0, 'text', !1], + not: void 0, + }, + context: { dev: ['test', 1] }, + globals: { lang: 'elb' }, + custom: { completely: 'random' }, + user: { id: 'us3r', device: 'c00k13', session: 's3ss10n' }, + nested: [ + { + entity: 'child', + data: { is: 'subordinated' }, + nested: [], + context: { element: ['child', 0] }, + }, + ], + consent: { functional: !0 }, + id: `${u}-${a}-${c}`, + trigger: 'test', + entity: 'entity', + action: 'action', + timestamp: u, + timing: 3.14, + group: a, + count: c, + version: { source: '0.3.1', tagging: 1 }, + source: { + type: 'web', + id: 'https://localhost:80', + previous_id: 'http://remotehost:9001', + }, + }, + o, + { merge: !1 }, + ); + if (o.name) { + let [p, f] = (s = o.name.split(' ')) != null ? s : []; + p && f && ((m.entity = p), (m.action = f)); + } + return m; + })({ + ...{ + 'cart view': { + data: { currency: 'EUR', value: 2 * n.data.price }, + context: { shopping: ['cart', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + data: { ...n.data, quantity: 2 }, + context: { shopping: ['cart', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'checkout view': { + data: { + step: 'payment', + currency: 'EUR', + value: n.data.price + r.data.price, + }, + context: { shopping: ['checkout', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + ...n, + context: { shopping: ['checkout', 0] }, + nested: [], + }, + { + entity: 'product', + ...r, + context: { shopping: ['checkout', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'order complete': { + data: { + id: '0rd3r1d', + currency: 'EUR', + shipping: 5.22, + taxes: 73.76, + total: 555, + }, + context: { shopping: ['complete', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + ...n, + context: { shopping: ['complete', 0] }, + nested: [], + }, + { + entity: 'product', + ...r, + context: { shopping: ['complete', 0] }, + nested: [], + }, + { + entity: 'gift', + data: { name: 'Surprise' }, + context: { shopping: ['complete', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'page view': { + data: { + domain: 'www.example.com', + title: 'walkerOS documentation', + referrer: 'https://www.elbwalker.com/', + search: '?foo=bar', + hash: '#hash', + id: '/docs/', + }, + globals: { pagegroup: 'docs' }, + trigger: 'load', + }, + 'product add': { + ...n, + context: { shopping: ['intent', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'click', + }, + 'product view': { + ...n, + context: { shopping: ['detail', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'load', + }, + 'product visible': { + data: { ...n.data, position: 3, promo: !0 }, + context: { shopping: ['discover', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'load', + }, + 'promotion visible': { + data: { name: 'Setting up tracking easily', position: 'hero' }, + context: { ab_test: ['engagement', 0] }, + globals: { pagegroup: 'homepage' }, + trigger: 'visible', + }, + 'session start': { + data: { + id: 's3ss10n', + start: i, + isNew: !0, + count: 1, + runs: 1, + isStart: !0, + storage: !0, + referrer: '', + device: 'c00k13', + }, + user: { + id: 'us3r', + device: 'c00k13', + session: 's3ss10n', + hash: 'h4sh', + address: 'street number', + email: 'user@example.com', + phone: '+49 123 456 789', + userAgent: 'Mozilla...', + browser: 'Chrome', + browserVersion: '90', + deviceType: 'desktop', + language: 'de-DE', + country: 'DE', + region: 'HH', + city: 'Hamburg', + zip: '20354', + timezone: 'Berlin', + os: 'walkerOS', + osVersion: '1.0', + screenSize: '1337x420', + ip: '127.0.0.0', + internal: !0, + custom: 'value', + }, + }, + }[e], + ...t, + name: e, + }); + } + function dv(e, t, i) { + return function (...n) { + try { + return e(...n); + } catch (r) { + return t ? t(r) : void 0; + } finally { + i?.(); + } + }; + } + function Mc(e) { + return e === void 0 || + (function (t, i) { + return typeof t == typeof i; + })(e, '') + ? e + : JSON.stringify(e); + } + function mv(e = {}) { + return m$({ 'Content-Type': 'application/json; charset=utf-8' }, e); + } + function FO(e, t, i = { transport: 'fetch' }) { + switch (i.transport || 'fetch') { + case 'beacon': + return (function (n, r) { + let o = Mc(r), + s = navigator.sendBeacon(n, o); + return { ok: s, error: s ? void 0 : 'Failed to send beacon' }; + })(e, t); + case 'xhr': + return (function (n, r, o = {}) { + let s = mv(o.headers), + u = o.method || 'POST', + a = Mc(r); + return dv( + () => { + let c = new XMLHttpRequest(); + c.open(u, n, !1); + for (let p in s) c.setRequestHeader(p, s[p]); + c.send(a); + let m = c.status >= 200 && c.status < 300; + return { + ok: m, + data: dv(JSON.parse, () => c.response)(c.response), + error: m ? void 0 : `${c.status} ${c.statusText}`, + }; + }, + (c) => ({ ok: !1, error: c.message }), + )(); + })(e, t, i); + default: + return (async function (n, r, o = {}) { + let s = mv(o.headers), + u = Mc(r); + return (function (a, c, m) { + return async function (...p) { + try { + return await a(...p); + } catch (f) { + return c ? await c(f) : void 0; + } finally { + await m?.(); + } + }; + })( + async () => { + let a = await fetch(n, { + method: o.method || 'POST', + headers: s, + keepalive: !0, + credentials: o.credentials || 'same-origin', + mode: o.noCors ? 'no-cors' : 'cors', + body: u, + }), + c = o.noCors ? '' : await a.text(); + return { ok: a.ok, data: c, error: a.ok ? void 0 : a.statusText }; + }, + (a) => ({ ok: !1, error: a.message }), + )(); + })(e, t, i); + } + } + var VO = {}; + $e(VO, { env: () => p$, events: () => f$, mapping: () => v$ }); + var p$ = {}; + $e(p$, { init: () => MO, push: () => WO, simulation: () => BO }); + var MO = { sendWeb: void 0 }, + WO = { sendWeb: Object.assign(() => {}, {}) }, + BO = ['call:sendWeb'], + f$ = {}; + function GO() { + let e = JO('entity action'); + return JSON.stringify(e.data); + } + $e(f$, { entity_action: () => GO }); + var v$ = {}; + $e(v$, { config: () => KO, entity_action: () => g$ }); + var g$ = { data: 'data' }, + KO = { entity: { action: g$ } }, + qO = {}; + $e(qO, { + MappingSchema: () => b$, + SettingsSchema: () => h$, + mapping: () => HO, + settings: () => XO, + }); + var h$ = l.object({ + url: l + .string() + .url() + .describe( + 'The HTTP endpoint URL to send events to (like https://api.example.com/events)', + ), + headers: l + .record(l.string(), l.string()) + .describe( + "Additional HTTP headers to include with requests (like { 'Authorization': 'Bearer token', 'Content-Type': 'application/json' })", + ) + .optional(), + method: l + .string() + .default('POST') + .describe('HTTP method for the request'), + transform: l + .any() + .describe( + 'Function to transform event data before sending (like (data, config, mapping) => JSON.stringify(data))', + ) + .optional(), + transport: l + .enum(['fetch', 'xhr', 'beacon']) + .default('fetch') + .describe('Transport method for sending requests'), + }), + b$ = l.object({}), + XO = d$(h$), + HO = d$(b$), + y$ = { + type: 'api', + config: {}, + push(e, { config: t, mapping: i, data: n, env: r }) { + let { settings: o } = t, + { + url: s, + headers: u, + method: a, + transform: c, + transport: m = 'fetch', + } = o || {}; + if (!s) return; + let p = n !== void 0 ? n : e, + f = c ? c(p, t, i) : JSON.stringify(p); + (r?.sendWeb || FO)(s, f, { headers: u, method: a, transport: m }); + }, + }; + (async () => { + let e = async function (n = {}) { + let { tracker: r } = n, + o = r, + s = typeof globalThis.window < 'u' ? globalThis.window : void 0, + u = typeof globalThis.document < 'u' ? globalThis.document : void 0; + return await Jf({ + sources: { + demo: { + code: Mf, + config: { + settings: { + events: [ + { + name: 'page view', + data: { title: 'Home', path: '/' }, + delay: 0, + }, + { + name: 'product view', + data: { id: 'P123', name: 'Test Product', price: 99.99 }, + delay: 100, + }, + ], + }, + }, + }, + }, + destinations: { + demo: { code: Kf, config: { settings: { name: 'demo' } } }, + api: { + code: y$, + config: { settings: { url: 'http://localhost:8080/collect' } }, + }, + }, + run: !0, + globals: { language: 'en' }, + }); + }, + { collector: t, elb: i } = await e(); + typeof window < 'u' && ((window.collector = t), (window.elb = i)); + })(); +})(); diff --git a/packages/cli/examples/web-serve.json b/packages/cli/examples/web-serve.json index 5c2d198f6..a621f1c40 100644 --- a/packages/cli/examples/web-serve.json +++ b/packages/cli/examples/web-serve.json @@ -67,10 +67,9 @@ "imports": ["destinationAPI"] } }, - "code": "// walkerOS configuration", - "minify": false, - "globalName": "walkerOS", - "output": "web-serve.mjs", - "template": "templates/base.hbs" + "minify": true, + "output": "web-serve.js", + "windowCollector": "collector", + "windowElb": "elb" } } diff --git a/packages/cli/examples/web-serve.mjs b/packages/cli/examples/web-serve.mjs deleted file mode 100644 index dec9b1289..000000000 --- a/packages/cli/examples/web-serve.mjs +++ /dev/null @@ -1,8629 +0,0 @@ -"use strict"; -var walkerOS = (() => { - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - - // entry.js - var entry_exports = {}; - __export(entry_exports, { - default: () => entry_default - }); - - // node_modules/zod/v3/external.js - var external_exports = {}; - __export(external_exports, { - BRAND: () => BRAND, - DIRTY: () => DIRTY, - EMPTY_PATH: () => EMPTY_PATH, - INVALID: () => INVALID, - NEVER: () => NEVER, - OK: () => OK, - ParseStatus: () => ParseStatus, - Schema: () => ZodType, - ZodAny: () => ZodAny, - ZodArray: () => ZodArray, - ZodBigInt: () => ZodBigInt, - ZodBoolean: () => ZodBoolean, - ZodBranded: () => ZodBranded, - ZodCatch: () => ZodCatch, - ZodDate: () => ZodDate, - ZodDefault: () => ZodDefault, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodEffects: () => ZodEffects, - ZodEnum: () => ZodEnum, - ZodError: () => ZodError, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, - ZodFunction: () => ZodFunction, - ZodIntersection: () => ZodIntersection, - ZodIssueCode: () => ZodIssueCode, - ZodLazy: () => ZodLazy, - ZodLiteral: () => ZodLiteral, - ZodMap: () => ZodMap, - ZodNaN: () => ZodNaN, - ZodNativeEnum: () => ZodNativeEnum, - ZodNever: () => ZodNever, - ZodNull: () => ZodNull, - ZodNullable: () => ZodNullable, - ZodNumber: () => ZodNumber, - ZodObject: () => ZodObject, - ZodOptional: () => ZodOptional, - ZodParsedType: () => ZodParsedType, - ZodPipeline: () => ZodPipeline, - ZodPromise: () => ZodPromise, - ZodReadonly: () => ZodReadonly, - ZodRecord: () => ZodRecord, - ZodSchema: () => ZodType, - ZodSet: () => ZodSet, - ZodString: () => ZodString, - ZodSymbol: () => ZodSymbol, - ZodTransformer: () => ZodEffects, - ZodTuple: () => ZodTuple, - ZodType: () => ZodType, - ZodUndefined: () => ZodUndefined, - ZodUnion: () => ZodUnion, - ZodUnknown: () => ZodUnknown, - ZodVoid: () => ZodVoid, - addIssueToContext: () => addIssueToContext, - any: () => anyType, - array: () => arrayType, - bigint: () => bigIntType, - boolean: () => booleanType, - coerce: () => coerce, - custom: () => custom, - date: () => dateType, - datetimeRegex: () => datetimeRegex, - defaultErrorMap: () => en_default, - discriminatedUnion: () => discriminatedUnionType, - effect: () => effectsType, - enum: () => enumType, - function: () => functionType, - getErrorMap: () => getErrorMap, - getParsedType: () => getParsedType, - instanceof: () => instanceOfType, - intersection: () => intersectionType, - isAborted: () => isAborted, - isAsync: () => isAsync, - isDirty: () => isDirty, - isValid: () => isValid, - late: () => late, - lazy: () => lazyType, - literal: () => literalType, - makeIssue: () => makeIssue, - map: () => mapType, - nan: () => nanType, - nativeEnum: () => nativeEnumType, - never: () => neverType, - null: () => nullType, - nullable: () => nullableType, - number: () => numberType, - object: () => objectType, - objectUtil: () => objectUtil, - oboolean: () => oboolean, - onumber: () => onumber, - optional: () => optionalType, - ostring: () => ostring, - pipeline: () => pipelineType, - preprocess: () => preprocessType, - promise: () => promiseType, - quotelessJson: () => quotelessJson, - record: () => recordType, - set: () => setType, - setErrorMap: () => setErrorMap, - strictObject: () => strictObjectType, - string: () => stringType, - symbol: () => symbolType, - transformer: () => effectsType, - tuple: () => tupleType, - undefined: () => undefinedType, - union: () => unionType, - unknown: () => unknownType, - util: () => util, - void: () => voidType - }); - - // node_modules/zod/v3/helpers/util.js - var util; - (function(util2) { - util2.assertEqual = (_4) => { - }; - function assertIs(_arg) { - } - util2.assertIs = assertIs; - function assertNever(_x) { - throw new Error(); - } - util2.assertNever = assertNever; - util2.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util2.getValidEnumValues = (obj) => { - const validKeys = util2.objectKeys(obj).filter((k3) => typeof obj[obj[k3]] !== "number"); - const filtered = {}; - for (const k3 of validKeys) { - filtered[k3] = obj[k3]; - } - return util2.objectValues(filtered); - }; - util2.objectValues = (obj) => { - return util2.objectKeys(obj).map(function(e14) { - return obj[e14]; - }); - }; - util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => { - const keys = []; - for (const key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - keys.push(key); - } - } - return keys; - }; - util2.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return void 0; - }; - util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues(array, separator = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator); - } - util2.joinValues = joinValues; - util2.jsonStringifyReplacer = (_4, value) => { - if (typeof value === "bigint") { - return value.toString(); - } - return value; - }; - })(util || (util = {})); - var objectUtil; - (function(objectUtil2) { - objectUtil2.mergeShapes = (first, second) => { - return { - ...first, - ...second - // second overwrites first - }; - }; - })(objectUtil || (objectUtil = {})); - var ZodParsedType = util.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" - ]); - var getParsedType = (data) => { - const t12 = typeof data; - switch (t12) { - case "undefined": - return ZodParsedType.undefined; - case "string": - return ZodParsedType.string; - case "number": - return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; - case "boolean": - return ZodParsedType.boolean; - case "function": - return ZodParsedType.function; - case "bigint": - return ZodParsedType.bigint; - case "symbol": - return ZodParsedType.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType.array; - } - if (data === null) { - return ZodParsedType.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType.date; - } - return ZodParsedType.object; - default: - return ZodParsedType.unknown; - } - }; - - // node_modules/zod/v3/ZodError.js - var ZodIssueCode = util.arrayToEnum([ - "invalid_type", - "invalid_literal", - "custom", - "invalid_union", - "invalid_union_discriminator", - "invalid_enum_value", - "unrecognized_keys", - "invalid_arguments", - "invalid_return_type", - "invalid_date", - "invalid_string", - "too_small", - "too_big", - "invalid_intersection_types", - "not_multiple_of", - "not_finite" - ]); - var quotelessJson = (obj) => { - const json = JSON.stringify(obj, null, 2); - return json.replace(/"([^"]+)":/g, "$1:"); - }; - var ZodError = class _ZodError extends Error { - get errors() { - return this.issues; - } - constructor(issues) { - super(); - this.issues = []; - this.addIssue = (sub) => { - this.issues = [...this.issues, sub]; - }; - this.addIssues = (subs = []) => { - this.issues = [...this.issues, ...subs]; - }; - const actualProto = new.target.prototype; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, actualProto); - } else { - this.__proto__ = actualProto; - } - this.name = "ZodError"; - this.issues = issues; - } - format(_mapper) { - const mapper = _mapper || function(issue) { - return issue.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error) => { - for (const issue of error.issues) { - if (issue.code === "invalid_union") { - issue.unionErrors.map(processError); - } else if (issue.code === "invalid_return_type") { - processError(issue.returnTypeError); - } else if (issue.code === "invalid_arguments") { - processError(issue.argumentsError); - } else if (issue.path.length === 0) { - fieldErrors._errors.push(mapper(issue)); - } else { - let curr = fieldErrors; - let i4 = 0; - while (i4 < issue.path.length) { - const el = issue.path[i4]; - const terminal = i4 === issue.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue)); - } - curr = curr[el]; - i4++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value) { - if (!(value instanceof _ZodError)) { - throw new Error(`Not a ZodError: ${value}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue) => issue.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } - }; - ZodError.create = (issues) => { - const error = new ZodError(issues); - return error; - }; - - // node_modules/zod/v3/locales/en.js - var errorMap = (issue, _ctx) => { - let message; - switch (issue.code) { - case ZodIssueCode.invalid_type: - if (issue.received === ZodParsedType.undefined) { - message = "Required"; - } else { - message = `Expected ${issue.expected}, received ${issue.received}`; - } - break; - case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`; - break; - case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`; - break; - case ZodIssueCode.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`; - break; - case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`; - break; - case ZodIssueCode.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode.invalid_string: - if (typeof issue.validation === "object") { - if ("includes" in issue.validation) { - message = `Invalid input: must include "${issue.validation.includes}"`; - if (typeof issue.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`; - } - } else if ("startsWith" in issue.validation) { - message = `Invalid input: must start with "${issue.validation.startsWith}"`; - } else if ("endsWith" in issue.validation) { - message = `Invalid input: must end with "${issue.validation.endsWith}"`; - } else { - util.assertNever(issue.validation); - } - } else if (issue.validation !== "regex") { - message = `Invalid ${issue.validation}`; - } else { - message = "Invalid"; - } - break; - case ZodIssueCode.too_small: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "bigint") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.too_big: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "bigint") - message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.custom: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue.multipleOf}`; - break; - case ZodIssueCode.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util.assertNever(issue); - } - return { message }; - }; - var en_default = errorMap; - - // node_modules/zod/v3/errors.js - var overrideErrorMap = en_default; - function setErrorMap(map) { - overrideErrorMap = map; - } - function getErrorMap() { - return overrideErrorMap; - } - - // node_modules/zod/v3/helpers/parseUtil.js - var makeIssue = (params) => { - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...issueData.path || []]; - const fullIssue = { - ...issueData, - path: fullPath - }; - if (issueData.message !== void 0) { - return { - ...issueData, - path: fullPath, - message: issueData.message - }; - } - let errorMessage = ""; - const maps = errorMaps.filter((m2) => !!m2).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage - }; - }; - var EMPTY_PATH = []; - function addIssueToContext(ctx, issueData) { - const overrideMap = getErrorMap(); - const issue = makeIssue({ - issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - // contextual error map is first priority - ctx.schemaErrorMap, - // then schema-bound map if available - overrideMap, - // then global override map - overrideMap === en_default ? void 0 : en_default - // then global default map - ].filter((x3) => !!x3) - }); - ctx.common.issues.push(issue); - } - var ParseStatus = class _ParseStatus { - constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") - this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") - this.value = "aborted"; - } - static mergeArray(status, results) { - const arrayValue = []; - for (const s5 of results) { - if (s5.status === "aborted") - return INVALID; - if (s5.status === "dirty") - status.dirty(); - arrayValue.push(s5.value); - } - return { status: status.value, value: arrayValue }; - } - static async mergeObjectAsync(status, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value - }); - } - return _ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value } = pair; - if (key.status === "aborted") - return INVALID; - if (value.status === "aborted") - return INVALID; - if (key.status === "dirty") - status.dirty(); - if (value.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value.value; - } - } - return { status: status.value, value: finalObject }; - } - }; - var INVALID = Object.freeze({ - status: "aborted" - }); - var DIRTY = (value) => ({ status: "dirty", value }); - var OK = (value) => ({ status: "valid", value }); - var isAborted = (x3) => x3.status === "aborted"; - var isDirty = (x3) => x3.status === "dirty"; - var isValid = (x3) => x3.status === "valid"; - var isAsync = (x3) => typeof Promise !== "undefined" && x3 instanceof Promise; - - // node_modules/zod/v3/helpers/errorUtil.js - var errorUtil; - (function(errorUtil2) { - errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message; - })(errorUtil || (errorUtil = {})); - - // node_modules/zod/v3/types.js - var ParseInputLazyPath = class { - constructor(parent, value, path, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value; - this._path = path; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } - }; - var handleResult = (ctx, result) => { - if (isValid(result)) { - return { success: true, data: result.value }; - } else { - if (!ctx.common.issues.length) { - throw new Error("Validation failed but no issues detected."); - } - return { - success: false, - get error() { - if (this._error) - return this._error; - const error = new ZodError(ctx.common.issues); - this._error = error; - return this._error; - } - }; - } - }; - function processCreateParams(params) { - if (!params) - return {}; - const { errorMap: errorMap2, invalid_type_error, required_error, description } = params; - if (errorMap2 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap2) - return { errorMap: errorMap2, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; - } - var ZodType = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync(result)) { - throw new Error("Synchronous parse encountered promise."); - } - return result; - } - _parseAsync(input) { - const result = this._parse(input); - return Promise.resolve(result); - } - parse(data, params) { - const result = this.safeParse(data, params); - if (result.success) - return result.data; - throw result.error; - } - safeParse(data, params) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - if (!this["~standard"].async) { - try { - const result = this._parseSync({ data, path: [], parent: ctx }); - return isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }; - } catch (err) { - if (err?.message?.toLowerCase()?.includes("encountered")) { - this["~standard"].async = true; - } - ctx.common = { - issues: [], - async: true - }; - } - } - return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }); - } - async parseAsync(data, params) { - const result = await this.safeParseAsync(data, params); - if (result.success) - return result.data; - throw result.error; - } - async safeParseAsync(data, params) { - const ctx = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } else if (typeof message === "function") { - return message(val); - } else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode.custom, - ...getIssueProperties(val) - }); - if (typeof Promise !== "undefined" && result instanceof Promise) { - return result.then((data) => { - if (!data) { - setError(); - return false; - } else { - return true; - } - }); - } - if (!result) { - setError(); - return false; - } else { - return true; - } - }); - } - refinement(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects({ - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "refinement", refinement } - }); - } - superRefine(refinement) { - return this._refinement(refinement); - } - constructor(def) { - this.spa = this.safeParseAsync; - this._def = def; - this.parse = this.parse.bind(this); - this.safeParse = this.safeParse.bind(this); - this.parseAsync = this.parseAsync.bind(this); - this.safeParseAsync = this.safeParseAsync.bind(this); - this.spa = this.spa.bind(this); - this.refine = this.refine.bind(this); - this.refinement = this.refinement.bind(this); - this.superRefine = this.superRefine.bind(this); - this.optional = this.optional.bind(this); - this.nullable = this.nullable.bind(this); - this.nullish = this.nullish.bind(this); - this.array = this.array.bind(this); - this.promise = this.promise.bind(this); - this.or = this.or.bind(this); - this.and = this.and.bind(this); - this.transform = this.transform.bind(this); - this.brand = this.brand.bind(this); - this.default = this.default.bind(this); - this.catch = this.catch.bind(this); - this.describe = this.describe.bind(this); - this.pipe = this.pipe.bind(this); - this.readonly = this.readonly.bind(this); - this.isNullable = this.isNullable.bind(this); - this.isOptional = this.isOptional.bind(this); - this["~standard"] = { - version: 1, - vendor: "zod", - validate: (data) => this["~validate"](data) - }; - } - optional() { - return ZodOptional.create(this, this._def); - } - nullable() { - return ZodNullable.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray.create(this); - } - promise() { - return ZodPromise.create(this, this._def); - } - or(option) { - return ZodUnion.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects({ - ...processCreateParams(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "transform", transform } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault({ - ...processCreateParams(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind.ZodDefault - }); - } - brand() { - return new ZodBranded({ - typeName: ZodFirstPartyTypeKind.ZodBranded, - type: this, - ...processCreateParams(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch({ - ...processCreateParams(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline.create(this, target); - } - readonly() { - return ZodReadonly.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - var cuidRegex = /^c[^\s-]{8,}$/i; - var cuid2Regex = /^[0-9a-z]+$/; - var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; - var nanoidRegex = /^[a-z0-9_-]{21}$/i; - var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; - var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; - var emojiRegex; - var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; - var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; - var dateRegex = new RegExp(`^${dateRegexSource}$`); - function timeRegexSource(args) { - let secondsRegexSource = `[0-5]\\d`; - if (args.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`; - } else if (args.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; - } - function timeRegex(args) { - return new RegExp(`^${timeRegexSource(args)}$`); - } - function datetimeRegex(args) { - let regex = `${dateRegexSource}T${timeRegexSource(args)}`; - const opts = []; - opts.push(args.local ? `Z?` : `Z`); - if (args.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex = `${regex}(${opts.join("|")})`; - return new RegExp(`^${regex}$`); - } - function isValidIP(ip, version) { - if ((version === "v4" || !version) && ipv4Regex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6Regex.test(ip)) { - return true; - } - return false; - } - function isValidJWT(jwt, alg) { - if (!jwtRegex.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base64)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } catch { - return false; - } - } - function isValidCidr(ip, version) { - if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) { - return true; - } - return false; - } - var ZodString = class _ZodString extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.string) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.string, - received: ctx2.parsedType - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } else if (tooSmall) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } - status.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "email", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex) { - emojiRegex = new RegExp(_emojiRegex, "u"); - } - if (!emojiRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "emoji", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "uuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "nanoid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid2", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ulid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "url") { - try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "regex", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "trim") { - input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "datetime") { - const regex = datetimeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "datetime", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "date") { - const regex = dateRegex; - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "date", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "time") { - const regex = timeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "time", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "duration", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ip", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "jwt", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cidr", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex, validation, message) { - return this.refinement((data) => regex.test(data), { - validation, - code: ZodIssueCode.invalid_string, - ...errorUtil.errToObj(message) - }); - } - _addCheck(check) { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil.errToObj(options?.message) - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) }); - } - regex(regex, message) { - return this._addCheck({ - kind: "regex", - regex, - ...errorUtil.errToObj(message) - }); - } - includes(value, options) { - return this._addCheck({ - kind: "includes", - value, - position: options?.position, - ...errorUtil.errToObj(options?.message) - }); - } - startsWith(value, message) { - return this._addCheck({ - kind: "startsWith", - value, - ...errorUtil.errToObj(message) - }); - } - endsWith(value, message) { - return this._addCheck({ - kind: "endsWith", - value, - ...errorUtil.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil.errToObj(message)); - } - trim() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toUpperCase" }] - }); - } - get isDatetime() { - return !!this._def.checks.find((ch) => ch.kind === "datetime"); - } - get isDate() { - return !!this._def.checks.find((ch) => ch.kind === "date"); - } - get isTime() { - return !!this._def.checks.find((ch) => ch.kind === "time"); - } - get isDuration() { - return !!this._def.checks.find((ch) => ch.kind === "duration"); - } - get isEmail() { - return !!this._def.checks.find((ch) => ch.kind === "email"); - } - get isURL() { - return !!this._def.checks.find((ch) => ch.kind === "url"); - } - get isEmoji() { - return !!this._def.checks.find((ch) => ch.kind === "emoji"); - } - get isUUID() { - return !!this._def.checks.find((ch) => ch.kind === "uuid"); - } - get isNANOID() { - return !!this._def.checks.find((ch) => ch.kind === "nanoid"); - } - get isCUID() { - return !!this._def.checks.find((ch) => ch.kind === "cuid"); - } - get isCUID2() { - return !!this._def.checks.find((ch) => ch.kind === "cuid2"); - } - get isULID() { - return !!this._def.checks.find((ch) => ch.kind === "ulid"); - } - get isIP() { - return !!this._def.checks.find((ch) => ch.kind === "ip"); - } - get isCIDR() { - return !!this._def.checks.find((ch) => ch.kind === "cidr"); - } - get isBase64() { - return !!this._def.checks.find((ch) => ch.kind === "base64"); - } - get isBase64url() { - return !!this._def.checks.find((ch) => ch.kind === "base64url"); - } - get minLength() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxLength() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodString.create = (params) => { - return new ZodString({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - function floatSafeRemainder(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; - } - var ZodNumber = class _ZodNumber extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - this.step = this.multipleOf; - } - _parse(input) { - if (this._def.coerce) { - input.data = Number(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.number) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.number, - received: ctx2.parsedType - }); - return INVALID; - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_finite, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new _ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value, - message: errorUtil.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - get isInt() { - return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); - } - get isFinite() { - let max = null; - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { - return true; - } else if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } else if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return Number.isFinite(min) && Number.isFinite(max); - } - }; - ZodNumber.create = (params) => { - return new ZodNumber({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - var ZodBigInt = class _ZodBigInt extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } catch { - return this._getInvalidInput(input); - } - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.bigint) { - return this._getInvalidInput(input); - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.bigint, - received: ctx.parsedType - }); - return INVALID; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new _ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodBigInt.create = (params) => { - return new ZodBigInt({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - var ZodBoolean = class extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.boolean, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodBoolean.create = (params) => { - return new ZodBoolean({ - typeName: ZodFirstPartyTypeKind.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - var ZodDate = class _ZodDate extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.date) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.date, - received: ctx2.parsedType - }); - return INVALID; - } - if (Number.isNaN(input.data.getTime())) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_date - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new _ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil.toString(message) - }); - } - get minDate() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min != null ? new Date(min) : null; - } - get maxDate() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max != null ? new Date(max) : null; - } - }; - ZodDate.create = (params) => { - return new ZodDate({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind.ZodDate, - ...processCreateParams(params) - }); - }; - var ZodSymbol = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.symbol, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodSymbol.create = (params) => { - return new ZodSymbol({ - typeName: ZodFirstPartyTypeKind.ZodSymbol, - ...processCreateParams(params) - }); - }; - var ZodUndefined = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.undefined, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodUndefined.create = (params) => { - return new ZodUndefined({ - typeName: ZodFirstPartyTypeKind.ZodUndefined, - ...processCreateParams(params) - }); - }; - var ZodNull = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.null, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodNull.create = (params) => { - return new ZodNull({ - typeName: ZodFirstPartyTypeKind.ZodNull, - ...processCreateParams(params) - }); - }; - var ZodAny = class extends ZodType { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodAny.create = (params) => { - return new ZodAny({ - typeName: ZodFirstPartyTypeKind.ZodAny, - ...processCreateParams(params) - }); - }; - var ZodUnknown = class extends ZodType { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodUnknown.create = (params) => { - return new ZodUnknown({ - typeName: ZodFirstPartyTypeKind.ZodUnknown, - ...processCreateParams(params) - }); - }; - var ZodNever = class extends ZodType { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.never, - received: ctx.parsedType - }); - return INVALID; - } - }; - ZodNever.create = (params) => { - return new ZodNever({ - typeName: ZodFirstPartyTypeKind.ZodNever, - ...processCreateParams(params) - }); - }; - var ZodVoid = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.void, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodVoid.create = (params) => { - return new ZodVoid({ - typeName: ZodFirstPartyTypeKind.ZodVoid, - ...processCreateParams(params) - }); - }; - var ZodArray = class _ZodArray extends ZodType { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext(ctx, { - code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, - minimum: tooSmall ? def.exactLength.value : void 0, - maximum: tooBig ? def.exactLength.value : void 0, - type: "array", - inclusive: true, - exact: true, - message: def.exactLength.message - }); - status.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message - }); - status.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message - }); - status.dirty(); - } - } - if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i4) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i4)); - })).then((result2) => { - return ParseStatus.mergeArray(status, result2); - }); - } - const result = [...ctx.data].map((item, i4) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i4)); - }); - return ParseStatus.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new _ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil.toString(message) } - }); - } - max(maxLength, message) { - return new _ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil.toString(message) } - }); - } - length(len, message) { - return new _ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil.toString(message) } - }); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodArray.create = (schema, params) => { - return new ZodArray({ - type: schema, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind.ZodArray, - ...processCreateParams(params) - }); - }; - function deepPartialify(schema) { - if (schema instanceof ZodObject) { - const newShape = {}; - for (const key in schema.shape) { - const fieldSchema = schema.shape[key]; - newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); - } - return new ZodObject({ - ...schema._def, - shape: () => newShape - }); - } else if (schema instanceof ZodArray) { - return new ZodArray({ - ...schema._def, - type: deepPartialify(schema.element) - }); - } else if (schema instanceof ZodOptional) { - return ZodOptional.create(deepPartialify(schema.unwrap())); - } else if (schema instanceof ZodNullable) { - return ZodNullable.create(deepPartialify(schema.unwrap())); - } else if (schema instanceof ZodTuple) { - return ZodTuple.create(schema.items.map((item) => deepPartialify(item))); - } else { - return schema; - } - } - var ZodObject = class _ZodObject extends ZodType { - constructor() { - super(...arguments); - this._cached = null; - this.nonstrict = this.passthrough; - this.augment = this.extend; - } - _getCached() { - if (this._cached !== null) - return this._cached; - const shape = this._def.shape(); - const keys = util.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.object) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx2.parsedType - }); - return INVALID; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") { - for (const key of extraKeys) { - pairs.push({ - key: { status: "valid", value: key }, - value: { status: "valid", value: ctx.data[key] } - }); - } - } else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext(ctx, { - code: ZodIssueCode.unrecognized_keys, - keys: extraKeys - }); - status.dirty(); - } - } else if (unknownKeys === "strip") { - } else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); - } - } else { - const catchall = this._def.catchall; - for (const key of extraKeys) { - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse( - new ParseInputLazyPath(ctx, value, ctx.path, key) - //, ctx.child(key), value, getParsedType(value) - ), - alwaysSet: key in ctx.data - }); - } - } - if (ctx.common.async) { - return Promise.resolve().then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus.mergeObjectSync(status, syncPairs); - }); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil.errToObj; - return new _ZodObject({ - ...this._def, - unknownKeys: "strict", - ...message !== void 0 ? { - errorMap: (issue, ctx) => { - const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError; - if (issue.code === "unrecognized_keys") - return { - message: errorUtil.errToObj(message).message ?? defaultError - }; - return { - message: defaultError - }; - } - } : {} - }); - } - strip() { - return new _ZodObject({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new _ZodObject({ - ...this._def, - unknownKeys: "passthrough" - }); - } - // const AugmentFactory = - // (def: Def) => - // ( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, Augmentation>, - // Def["unknownKeys"], - // Def["catchall"] - // > => { - // return new ZodObject({ - // ...def, - // shape: () => ({ - // ...def.shape(), - // ...augmentation, - // }), - // }) as any; - // }; - extend(augmentation) { - return new _ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation - }) - }); - } - /** - * Prior to zod@1.0.12 there was a bug in the - * inferred type of merged objects. Please - * upgrade if you are experiencing issues. - */ - merge(merging) { - const merged = new _ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind.ZodObject - }); - return merged; - } - // merge< - // Incoming extends AnyZodObject, - // Augmentation extends Incoming["shape"], - // NewOutput extends { - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }, - // NewInput extends { - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // } - // >( - // merging: Incoming - // ): ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"], - // NewOutput, - // NewInput - // > { - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - setKey(key, schema) { - return this.augment({ [key]: schema }); - } - // merge( - // merging: Incoming - // ): //ZodObject = (merging) => { - // ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"] - // > { - // // const mergedShape = objectUtil.mergeShapes( - // // this._def.shape(), - // // merging._def.shape() - // // ); - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - catchall(index) { - return new _ZodObject({ - ...this._def, - catchall: index - }); - } - pick(mask) { - const shape = {}; - for (const key of util.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key of util.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify(this); - } - partial(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } else { - newShape[key] = fieldSchema.optional(); - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum(util.objectKeys(this.shape)); - } - }; - ZodObject.create = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.strictCreate = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.lazycreate = (shape, params) => { - return new ZodObject({ - shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - var ZodUnion = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const options = this._def.options; - function handleResults(results) { - for (const result of results) { - if (result.result.status === "valid") { - return result.result; - } - } - for (const result of results) { - if (result.result.status === "dirty") { - ctx.common.issues.push(...result.ctx.common.issues); - return result.result; - } - } - const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - if (ctx.common.async) { - return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }), - ctx: childCtx - }; - })).then(handleResults); - } else { - let dirty = void 0; - const issues = []; - for (const option of options) { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }); - if (result.status === "valid") { - return result; - } else if (result.status === "dirty" && !dirty) { - dirty = { result, ctx: childCtx }; - } - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues); - } - } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues2) => new ZodError(issues2)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - } - get options() { - return this._def.options; - } - }; - ZodUnion.create = (types, params) => { - return new ZodUnion({ - options: types, - typeName: ZodFirstPartyTypeKind.ZodUnion, - ...processCreateParams(params) - }); - }; - var getDiscriminator = (type) => { - if (type instanceof ZodLazy) { - return getDiscriminator(type.schema); - } else if (type instanceof ZodEffects) { - return getDiscriminator(type.innerType()); - } else if (type instanceof ZodLiteral) { - return [type.value]; - } else if (type instanceof ZodEnum) { - return type.options; - } else if (type instanceof ZodNativeEnum) { - return util.objectValues(type.enum); - } else if (type instanceof ZodDefault) { - return getDiscriminator(type._def.innerType); - } else if (type instanceof ZodUndefined) { - return [void 0]; - } else if (type instanceof ZodNull) { - return [null]; - } else if (type instanceof ZodOptional) { - return [void 0, ...getDiscriminator(type.unwrap())]; - } else if (type instanceof ZodNullable) { - return [null, ...getDiscriminator(type.unwrap())]; - } else if (type instanceof ZodBranded) { - return getDiscriminator(type.unwrap()); - } else if (type instanceof ZodReadonly) { - return getDiscriminator(type.unwrap()); - } else if (type instanceof ZodCatch) { - return getDiscriminator(type._def.innerType); - } else { - return []; - } - }; - var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID; - } - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - /** - * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. - * However, it only allows a union of objects, all of which need to share a discriminator property. This property must - * have a different value for each object in the union. - * @param discriminator the name of the discriminator property - * @param types an array of object schemas - * @param params - */ - static create(discriminator, options, params) { - const optionsMap = /* @__PURE__ */ new Map(); - for (const type of options) { - const discriminatorValues = getDiscriminator(type.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value of discriminatorValues) { - if (optionsMap.has(value)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); - } - optionsMap.set(value, type); - } - } - return new _ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams(params) - }); - } - }; - function mergeValues(a5, b2) { - const aType = getParsedType(a5); - const bType = getParsedType(b2); - if (a5 === b2) { - return { valid: true, data: a5 }; - } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { - const bKeys = util.objectKeys(b2); - const sharedKeys = util.objectKeys(a5).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a5, ...b2 }; - for (const key of sharedKeys) { - const sharedValue = mergeValues(a5[key], b2[key]); - if (!sharedValue.valid) { - return { valid: false }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { - if (a5.length !== b2.length) { - return { valid: false }; - } - const newArray = []; - for (let index = 0; index < a5.length; index++) { - const itemA = a5[index]; - const itemB = b2[index]; - const sharedValue = mergeValues(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a5 === +b2) { - return { valid: true, data: a5 }; - } else { - return { valid: false }; - } - } - var ZodIntersection = class extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted(parsedLeft) || isAborted(parsedRight)) { - return INVALID; - } - const merged = mergeValues(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_intersection_types - }); - return INVALID; - } - if (isDirty(parsedLeft) || isDirty(parsedRight)) { - status.dirty(); - } - return { status: status.value, value: merged.data }; - }; - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }) - ]).then(([left, right]) => handleParsed(left, right)); - } else { - return handleParsed(this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - })); - } - } - }; - ZodIntersection.create = (left, right, params) => { - return new ZodIntersection({ - left, - right, - typeName: ZodFirstPartyTypeKind.ZodIntersection, - ...processCreateParams(params) - }); - }; - var ZodTuple = class _ZodTuple extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status.dirty(); - } - const items = [...ctx.data].map((item, itemIndex) => { - const schema = this._def.items[itemIndex] || this._def.rest; - if (!schema) - return null; - return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }).filter((x3) => !!x3); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus.mergeArray(status, results); - }); - } else { - return ParseStatus.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new _ZodTuple({ - ...this._def, - rest - }); - } - }; - ZodTuple.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple({ - items: schemas, - typeName: ZodFirstPartyTypeKind.ZodTuple, - rest: null, - ...processCreateParams(params) - }); - }; - var ZodRecord = class _ZodRecord extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (ctx.common.async) { - return ParseStatus.mergeObjectAsync(status, pairs); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType) { - return new _ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(third) - }); - } - return new _ZodRecord({ - keyType: ZodString.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(second) - }); - } - }; - var ZodMap = class extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.map) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.map, - received: ctx.parsedType - }); - return INVALID; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value], index) => { - return { - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])) - }; - }); - if (ctx.common.async) { - const finalMap = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - }); - } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key = pair.key; - const value = pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - } - } - }; - ZodMap.create = (keyType, valueType, params) => { - return new ZodMap({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind.ZodMap, - ...processCreateParams(params) - }); - }; - var ZodSet = class _ZodSet extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.set) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.set, - received: ctx.parsedType - }); - return INVALID; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message - }); - status.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message - }); - status.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements2) { - const parsedSet = /* @__PURE__ */ new Set(); - for (const element of elements2) { - if (element.status === "aborted") - return INVALID; - if (element.status === "dirty") - status.dirty(); - parsedSet.add(element.value); - } - return { status: status.value, value: parsedSet }; - } - const elements = [...ctx.data.values()].map((item, i4) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i4))); - if (ctx.common.async) { - return Promise.all(elements).then((elements2) => finalizeSet(elements2)); - } else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new _ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil.toString(message) } - }); - } - max(maxSize, message) { - return new _ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil.toString(message) } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodSet.create = (valueType, params) => { - return new ZodSet({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind.ZodSet, - ...processCreateParams(params) - }); - }; - var ZodFunction = class _ZodFunction extends ZodType { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.function) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.function, - received: ctx.parsedType - }); - return INVALID; - } - function makeArgsIssue(args, error) { - return makeIssue({ - data: args, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3), - issueData: { - code: ZodIssueCode.invalid_arguments, - argumentsError: error - } - }); - } - function makeReturnsIssue(returns, error) { - return makeIssue({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3), - issueData: { - code: ZodIssueCode.invalid_return_type, - returnTypeError: error - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise) { - const me3 = this; - return OK(async function(...args) { - const error = new ZodError([]); - const parsedArgs = await me3._def.args.parseAsync(args, params).catch((e14) => { - error.addIssue(makeArgsIssue(args, e14)); - throw error; - }); - const result = await Reflect.apply(fn2, this, parsedArgs); - const parsedReturns = await me3._def.returns._def.type.parseAsync(result, params).catch((e14) => { - error.addIssue(makeReturnsIssue(result, e14)); - throw error; - }); - return parsedReturns; - }); - } else { - const me3 = this; - return OK(function(...args) { - const parsedArgs = me3._def.args.safeParse(args, params); - if (!parsedArgs.success) { - throw new ZodError([makeArgsIssue(args, parsedArgs.error)]); - } - const result = Reflect.apply(fn2, this, parsedArgs.data); - const parsedReturns = me3._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); - } - return parsedReturns.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new _ZodFunction({ - ...this._def, - args: ZodTuple.create(items).rest(ZodUnknown.create()) - }); - } - returns(returnType) { - return new _ZodFunction({ - ...this._def, - returns: returnType - }); - } - implement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - strictImplement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - static create(args, returns, params) { - return new _ZodFunction({ - args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()), - returns: returns || ZodUnknown.create(), - typeName: ZodFirstPartyTypeKind.ZodFunction, - ...processCreateParams(params) - }); - } - }; - var ZodLazy = class extends ZodType { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - const lazySchema = this._def.getter(); - return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); - } - }; - ZodLazy.create = (getter, params) => { - return new ZodLazy({ - getter, - typeName: ZodFirstPartyTypeKind.ZodLazy, - ...processCreateParams(params) - }); - }; - var ZodLiteral = class extends ZodType { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_literal, - expected: this._def.value - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } - }; - ZodLiteral.create = (value, params) => { - return new ZodLiteral({ - value, - typeName: ZodFirstPartyTypeKind.ZodLiteral, - ...processCreateParams(params) - }); - }; - function createZodEnum(values, params) { - return new ZodEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodEnum, - ...processCreateParams(params) - }); - } - var ZodEnum = class _ZodEnum extends ZodType { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Values() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - extract(values, newDef = this._def) { - return _ZodEnum.create(values, { - ...this._def, - ...newDef - }); - } - exclude(values, newDef = this._def) { - return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef - }); - } - }; - ZodEnum.create = createZodEnum; - var ZodNativeEnum = class extends ZodType { - _parse(input) { - const nativeEnumValues = util.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(util.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get enum() { - return this._def.values; - } - }; - ZodNativeEnum.create = (values, params) => { - return new ZodNativeEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodNativeEnum, - ...processCreateParams(params) - }); - }; - var ZodPromise = class extends ZodType { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.promise, - received: ctx.parsedType - }); - return INVALID; - } - const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); - return OK(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } - }; - ZodPromise.create = (schema, params) => { - return new ZodPromise({ - type: schema, - typeName: ZodFirstPartyTypeKind.ZodPromise, - ...processCreateParams(params) - }); - }; - var ZodEffects = class extends ZodType { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext(ctx, arg); - if (arg.fatal) { - status.abort(); - } else { - status.dirty(); - } - }, - get path() { - return ctx.path; - } - }; - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); - if (effect.type === "preprocess") { - const processed = effect.transform(ctx.data, checkCtx); - if (ctx.common.async) { - return Promise.resolve(processed).then(async (processed2) => { - if (status.value === "aborted") - return INVALID; - const result = await this._def.schema._parseAsync({ - data: processed2, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - }); - } else { - if (status.value === "aborted") - return INVALID; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - } - } - if (effect.type === "refinement") { - const executeRefinement = (acc) => { - const result = effect.refinement(acc, checkCtx); - if (ctx.common.async) { - return Promise.resolve(result); - } - if (result instanceof Promise) { - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - } - return acc; - }; - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - executeRefinement(inner.value); - return { status: status.value, value: inner.value }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value }; - }); - }); - } - } - if (effect.type === "transform") { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (!isValid(base)) - return INVALID; - const result = effect.transform(base.value, checkCtx); - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); - } - return { status: status.value, value: result }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { - if (!isValid(base)) - return INVALID; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result - })); - }); - } - } - util.assertNever(effect); - } - }; - ZodEffects.create = (schema, effect, params) => { - return new ZodEffects({ - schema, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect, - ...processCreateParams(params) - }); - }; - ZodEffects.createWithPreprocess = (preprocess, schema, params) => { - return new ZodEffects({ - schema, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind.ZodEffects, - ...processCreateParams(params) - }); - }; - var ZodOptional = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.undefined) { - return OK(void 0); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodOptional.create = (type, params) => { - return new ZodOptional({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodOptional, - ...processCreateParams(params) - }); - }; - var ZodNullable = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.null) { - return OK(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodNullable.create = (type, params) => { - return new ZodNullable({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodNullable, - ...processCreateParams(params) - }); - }; - var ZodDefault = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - removeDefault() { - return this._def.innerType; - } - }; - ZodDefault.create = (type, params) => { - return new ZodDefault({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams(params) - }); - }; - var ZodCatch = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - } - }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { - ...newCtx - } - }); - if (isAsync(result)) { - return result.then((result2) => { - return { - status: "valid", - value: result2.status === "valid" ? result2.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - } else { - return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - } - removeCatch() { - return this._def.innerType; - } - }; - ZodCatch.create = (type, params) => { - return new ZodCatch({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams(params) - }); - }; - var ZodNaN = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.nan, - received: ctx.parsedType - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - }; - ZodNaN.create = (params) => { - return new ZodNaN({ - typeName: ZodFirstPartyTypeKind.ZodNaN, - ...processCreateParams(params) - }); - }; - var BRAND = Symbol("zod_brand"); - var ZodBranded = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - unwrap() { - return this._def.type; - } - }; - var ZodPipeline = class _ZodPipeline extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY(inResult.value); - } else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - }; - return handleAsync(); - } else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return { - status: "dirty", - value: inResult.value - }; - } else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - } - } - static create(a5, b2) { - return new _ZodPipeline({ - in: a5, - out: b2, - typeName: ZodFirstPartyTypeKind.ZodPipeline - }); - } - }; - var ZodReadonly = class extends ZodType { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } - }; - ZodReadonly.create = (type, params) => { - return new ZodReadonly({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodReadonly, - ...processCreateParams(params) - }); - }; - function cleanParams(params, data) { - const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const p22 = typeof p2 === "string" ? { message: p2 } : p2; - return p22; - } - function custom(check, _params = {}, fatal) { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - const r3 = check(data); - if (r3 instanceof Promise) { - return r3.then((r4) => { - if (!r4) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r3) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny.create(); - } - var late = { - object: ZodObject.lazycreate - }; - var ZodFirstPartyTypeKind; - (function(ZodFirstPartyTypeKind2) { - ZodFirstPartyTypeKind2["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind2["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind2["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind2["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind2["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind2["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind2["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind2["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind2["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind2["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind2["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind2["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind2["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind2["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind2["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind2["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind2["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind2["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind2["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind2["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind2["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind2["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind2["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind2["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind2["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind2["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind2["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind2["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind2["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind2["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind2["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind2["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly"; - })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); - var instanceOfType = (cls, params = { - message: `Input not instance of ${cls.name}` - }) => custom((data) => data instanceof cls, params); - var stringType = ZodString.create; - var numberType = ZodNumber.create; - var nanType = ZodNaN.create; - var bigIntType = ZodBigInt.create; - var booleanType = ZodBoolean.create; - var dateType = ZodDate.create; - var symbolType = ZodSymbol.create; - var undefinedType = ZodUndefined.create; - var nullType = ZodNull.create; - var anyType = ZodAny.create; - var unknownType = ZodUnknown.create; - var neverType = ZodNever.create; - var voidType = ZodVoid.create; - var arrayType = ZodArray.create; - var objectType = ZodObject.create; - var strictObjectType = ZodObject.strictCreate; - var unionType = ZodUnion.create; - var discriminatedUnionType = ZodDiscriminatedUnion.create; - var intersectionType = ZodIntersection.create; - var tupleType = ZodTuple.create; - var recordType = ZodRecord.create; - var mapType = ZodMap.create; - var setType = ZodSet.create; - var functionType = ZodFunction.create; - var lazyType = ZodLazy.create; - var literalType = ZodLiteral.create; - var enumType = ZodEnum.create; - var nativeEnumType = ZodNativeEnum.create; - var promiseType = ZodPromise.create; - var effectsType = ZodEffects.create; - var optionalType = ZodOptional.create; - var nullableType = ZodNullable.create; - var preprocessType = ZodEffects.createWithPreprocess; - var pipelineType = ZodPipeline.create; - var ostring = () => stringType().optional(); - var onumber = () => numberType().optional(); - var oboolean = () => booleanType().optional(); - var coerce = { - string: (arg) => ZodString.create({ ...arg, coerce: true }), - number: (arg) => ZodNumber.create({ ...arg, coerce: true }), - boolean: (arg) => ZodBoolean.create({ - ...arg, - coerce: true - }), - bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }), - date: (arg) => ZodDate.create({ ...arg, coerce: true }) - }; - var NEVER = INVALID; - - // node_modules/zod-to-json-schema/dist/esm/Options.js - var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); - var defaultOptions = { - name: void 0, - $refStrategy: "root", - basePath: ["#"], - effectStrategy: "input", - pipeStrategy: "all", - dateStrategy: "format:date-time", - mapStrategy: "entries", - removeAdditionalStrategy: "passthrough", - allowedAdditionalProperties: true, - rejectedAdditionalProperties: false, - definitionPath: "definitions", - target: "jsonSchema7", - strictUnions: false, - definitions: {}, - errorMessages: false, - markdownDescription: false, - patternStrategy: "escape", - applyRegexFlags: false, - emailStrategy: "format:email", - base64Strategy: "contentEncoding:base64", - nameStrategy: "ref", - openAiAnyTypeName: "OpenAiAnyType" - }; - var getDefaultOptions = (options) => typeof options === "string" ? { - ...defaultOptions, - name: options - } : { - ...defaultOptions, - ...options - }; - - // node_modules/zod-to-json-schema/dist/esm/Refs.js - var getRefs = (options) => { - const _options = getDefaultOptions(options); - const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; - return { - ..._options, - flags: { hasReferencedOpenAiAnyType: false }, - currentPath, - propertyPath: void 0, - seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ - def._def, - { - def: def._def, - path: [..._options.basePath, _options.definitionPath, name], - // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. - jsonSchema: void 0 - } - ])) - }; - }; - - // node_modules/zod-to-json-schema/dist/esm/errorMessages.js - function addErrorMessage(res, key, errorMessage, refs) { - if (!refs?.errorMessages) - return; - if (errorMessage) { - res.errorMessage = { - ...res.errorMessage, - [key]: errorMessage - }; - } - } - function setResponseValueAndErrors(res, key, value, errorMessage, refs) { - res[key] = value; - addErrorMessage(res, key, errorMessage, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/getRelativePath.js - var getRelativePath = (pathA, pathB) => { - let i4 = 0; - for (; i4 < pathA.length && i4 < pathB.length; i4++) { - if (pathA[i4] !== pathB[i4]) - break; - } - return [(pathA.length - i4).toString(), ...pathB.slice(i4)].join("/"); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/any.js - function parseAnyDef(refs) { - if (refs.target !== "openAi") { - return {}; - } - const anyDefinitionPath = [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ]; - refs.flags.hasReferencedOpenAiAnyType = true; - return { - $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/array.js - function parseArrayDef(def, refs) { - const res = { - type: "array" - }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) { - res.items = parseDef(def.type._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - } - if (def.minLength) { - setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); - } - if (def.maxLength) { - setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); - } - if (def.exactLength) { - setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); - setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs); - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js - function parseBigintDef(def, refs) { - const res = { - type: "integer", - format: "int64" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js - function parseBooleanDef() { - return { - type: "boolean" - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/branded.js - function parseBrandedDef(_def, refs) { - return parseDef(_def.type._def, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/catch.js - var parseCatchDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/date.js - function parseDateDef(def, refs, overrideDateStrategy) { - const strategy = overrideDateStrategy ?? refs.dateStrategy; - if (Array.isArray(strategy)) { - return { - anyOf: strategy.map((item, i4) => parseDateDef(def, refs, item)) - }; - } - switch (strategy) { - case "string": - case "format:date-time": - return { - type: "string", - format: "date-time" - }; - case "format:date": - return { - type: "string", - format: "date" - }; - case "integer": - return integerDateParser(def, refs); - } - } - var integerDateParser = (def, refs) => { - const res = { - type: "integer", - format: "unix-time" - }; - if (refs.target === "openApi3") { - return res; - } - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors( - res, - "minimum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - case "max": - setResponseValueAndErrors( - res, - "maximum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - } - } - return res; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/default.js - function parseDefaultDef(_def, refs) { - return { - ...parseDef(_def.innerType._def, refs), - default: _def.defaultValue() - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/effects.js - function parseEffectsDef(_def, refs) { - return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/enum.js - function parseEnumDef(def) { - return { - type: "string", - enum: Array.from(def.values) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js - var isJsonSchema7AllOfType = (type) => { - if ("type" in type && type.type === "string") - return false; - return "allOf" in type; - }; - function parseIntersectionDef(def, refs) { - const allOf = [ - parseDef(def.left._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }), - parseDef(def.right._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "1"] - }) - ].filter((x3) => !!x3); - let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0; - const mergedAllOf = []; - allOf.forEach((schema) => { - if (isJsonSchema7AllOfType(schema)) { - mergedAllOf.push(...schema.allOf); - if (schema.unevaluatedProperties === void 0) { - unevaluatedProperties = void 0; - } - } else { - let nestedSchema = schema; - if ("additionalProperties" in schema && schema.additionalProperties === false) { - const { additionalProperties, ...rest } = schema; - nestedSchema = rest; - } else { - unevaluatedProperties = void 0; - } - mergedAllOf.push(nestedSchema); - } - }); - return mergedAllOf.length ? { - allOf: mergedAllOf, - ...unevaluatedProperties - } : void 0; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/literal.js - function parseLiteralDef(def, refs) { - const parsedType = typeof def.value; - if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") { - return { - type: Array.isArray(def.value) ? "array" : "object" - }; - } - if (refs.target === "openApi3") { - return { - type: parsedType === "bigint" ? "integer" : parsedType, - enum: [def.value] - }; - } - return { - type: parsedType === "bigint" ? "integer" : parsedType, - const: def.value - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/string.js - var emojiRegex2 = void 0; - var zodPatterns = { - /** - * `c` was changed to `[cC]` to replicate /i flag - */ - cuid: /^[cC][^\s-]{8,}$/, - cuid2: /^[0-9a-z]+$/, - ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, - /** - * `a-z` was added to replicate /i flag - */ - email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, - /** - * Constructed a valid Unicode RegExp - * - * Lazily instantiate since this type of regex isn't supported - * in all envs (e.g. React Native). - * - * See: - * https://github.com/colinhacks/zod/issues/2433 - * Fix in Zod: - * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b - */ - emoji: () => { - if (emojiRegex2 === void 0) { - emojiRegex2 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); - } - return emojiRegex2; - }, - /** - * Unused - */ - uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, - /** - * Unused - */ - ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, - ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, - /** - * Unused - */ - ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, - ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, - base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, - base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, - nanoid: /^[a-zA-Z0-9_-]{21}$/, - jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ - }; - function parseStringDef(def, refs) { - const res = { - type: "string" - }; - if (def.checks) { - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "email": - switch (refs.emailStrategy) { - case "format:email": - addFormat(res, "email", check.message, refs); - break; - case "format:idn-email": - addFormat(res, "idn-email", check.message, refs); - break; - case "pattern:zod": - addPattern(res, zodPatterns.email, check.message, refs); - break; - } - break; - case "url": - addFormat(res, "uri", check.message, refs); - break; - case "uuid": - addFormat(res, "uuid", check.message, refs); - break; - case "regex": - addPattern(res, check.regex, check.message, refs); - break; - case "cuid": - addPattern(res, zodPatterns.cuid, check.message, refs); - break; - case "cuid2": - addPattern(res, zodPatterns.cuid2, check.message, refs); - break; - case "startsWith": - addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs); - break; - case "endsWith": - addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs); - break; - case "datetime": - addFormat(res, "date-time", check.message, refs); - break; - case "date": - addFormat(res, "date", check.message, refs); - break; - case "time": - addFormat(res, "time", check.message, refs); - break; - case "duration": - addFormat(res, "duration", check.message, refs); - break; - case "length": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "includes": { - addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs); - break; - } - case "ip": { - if (check.version !== "v6") { - addFormat(res, "ipv4", check.message, refs); - } - if (check.version !== "v4") { - addFormat(res, "ipv6", check.message, refs); - } - break; - } - case "base64url": - addPattern(res, zodPatterns.base64url, check.message, refs); - break; - case "jwt": - addPattern(res, zodPatterns.jwt, check.message, refs); - break; - case "cidr": { - if (check.version !== "v6") { - addPattern(res, zodPatterns.ipv4Cidr, check.message, refs); - } - if (check.version !== "v4") { - addPattern(res, zodPatterns.ipv6Cidr, check.message, refs); - } - break; - } - case "emoji": - addPattern(res, zodPatterns.emoji(), check.message, refs); - break; - case "ulid": { - addPattern(res, zodPatterns.ulid, check.message, refs); - break; - } - case "base64": { - switch (refs.base64Strategy) { - case "format:binary": { - addFormat(res, "binary", check.message, refs); - break; - } - case "contentEncoding:base64": { - setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs); - break; - } - case "pattern:zod": { - addPattern(res, zodPatterns.base64, check.message, refs); - break; - } - } - break; - } - case "nanoid": { - addPattern(res, zodPatterns.nanoid, check.message, refs); - } - case "toLowerCase": - case "toUpperCase": - case "trim": - break; - default: - /* @__PURE__ */ ((_4) => { - })(check); - } - } - } - return res; - } - function escapeLiteralCheckValue(literal, refs) { - return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal; - } - var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); - function escapeNonAlphaNumeric(source) { - let result = ""; - for (let i4 = 0; i4 < source.length; i4++) { - if (!ALPHA_NUMERIC.has(source[i4])) { - result += "\\"; - } - result += source[i4]; - } - return result; - } - function addFormat(schema, value, message, refs) { - if (schema.format || schema.anyOf?.some((x3) => x3.format)) { - if (!schema.anyOf) { - schema.anyOf = []; - } - if (schema.format) { - schema.anyOf.push({ - format: schema.format, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { format: schema.errorMessage.format } - } - }); - delete schema.format; - if (schema.errorMessage) { - delete schema.errorMessage.format; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.anyOf.push({ - format: value, - ...message && refs.errorMessages && { errorMessage: { format: message } } - }); - } else { - setResponseValueAndErrors(schema, "format", value, message, refs); - } - } - function addPattern(schema, regex, message, refs) { - if (schema.pattern || schema.allOf?.some((x3) => x3.pattern)) { - if (!schema.allOf) { - schema.allOf = []; - } - if (schema.pattern) { - schema.allOf.push({ - pattern: schema.pattern, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { pattern: schema.errorMessage.pattern } - } - }); - delete schema.pattern; - if (schema.errorMessage) { - delete schema.errorMessage.pattern; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.allOf.push({ - pattern: stringifyRegExpWithFlags(regex, refs), - ...message && refs.errorMessages && { errorMessage: { pattern: message } } - }); - } else { - setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs); - } - } - function stringifyRegExpWithFlags(regex, refs) { - if (!refs.applyRegexFlags || !regex.flags) { - return regex.source; - } - const flags = { - i: regex.flags.includes("i"), - m: regex.flags.includes("m"), - s: regex.flags.includes("s") - // `.` matches newlines - }; - const source = flags.i ? regex.source.toLowerCase() : regex.source; - let pattern = ""; - let isEscaped = false; - let inCharGroup = false; - let inCharRange = false; - for (let i4 = 0; i4 < source.length; i4++) { - if (isEscaped) { - pattern += source[i4]; - isEscaped = false; - continue; - } - if (flags.i) { - if (inCharGroup) { - if (source[i4].match(/[a-z]/)) { - if (inCharRange) { - pattern += source[i4]; - pattern += `${source[i4 - 2]}-${source[i4]}`.toUpperCase(); - inCharRange = false; - } else if (source[i4 + 1] === "-" && source[i4 + 2]?.match(/[a-z]/)) { - pattern += source[i4]; - inCharRange = true; - } else { - pattern += `${source[i4]}${source[i4].toUpperCase()}`; - } - continue; - } - } else if (source[i4].match(/[a-z]/)) { - pattern += `[${source[i4]}${source[i4].toUpperCase()}]`; - continue; - } - } - if (flags.m) { - if (source[i4] === "^") { - pattern += `(^|(?<=[\r -]))`; - continue; - } else if (source[i4] === "$") { - pattern += `($|(?=[\r -]))`; - continue; - } - } - if (flags.s && source[i4] === ".") { - pattern += inCharGroup ? `${source[i4]}\r -` : `[${source[i4]}\r -]`; - continue; - } - pattern += source[i4]; - if (source[i4] === "\\") { - isEscaped = true; - } else if (inCharGroup && source[i4] === "]") { - inCharGroup = false; - } else if (!inCharGroup && source[i4] === "[") { - inCharGroup = true; - } - } - try { - new RegExp(pattern); - } catch { - console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); - return regex.source; - } - return pattern; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/record.js - function parseRecordDef(def, refs) { - if (refs.target === "openAi") { - console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); - } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - type: "object", - required: def.keyType._def.values, - properties: def.keyType._def.values.reduce((acc, key) => ({ - ...acc, - [key]: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", key] - }) ?? parseAnyDef(refs) - }), {}), - additionalProperties: refs.rejectedAdditionalProperties - }; - } - const schema = { - type: "object", - additionalProperties: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }) ?? refs.allowedAdditionalProperties - }; - if (refs.target === "openApi3") { - return schema; - } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) { - const { type, ...keyType } = parseStringDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - ...schema, - propertyNames: { - enum: def.keyType._def.values - } - }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) { - const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } - return schema; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/map.js - function parseMapDef(def, refs) { - if (refs.mapStrategy === "record") { - return parseRecordDef(def, refs); - } - const keys = parseDef(def.keyType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "0"] - }) || parseAnyDef(refs); - const values = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "1"] - }) || parseAnyDef(refs); - return { - type: "array", - maxItems: 125, - items: { - type: "array", - items: [keys, values], - minItems: 2, - maxItems: 2 - } - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js - function parseNativeEnumDef(def) { - const object = def.values; - const actualKeys = Object.keys(def.values).filter((key) => { - return typeof object[object[key]] !== "number"; - }); - const actualValues = actualKeys.map((key) => object[key]); - const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); - return { - type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"], - enum: actualValues - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/never.js - function parseNeverDef(refs) { - return refs.target === "openAi" ? void 0 : { - not: parseAnyDef({ - ...refs, - currentPath: [...refs.currentPath, "not"] - }) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/null.js - function parseNullDef(refs) { - return refs.target === "openApi3" ? { - enum: ["null"], - nullable: true - } : { - type: "null" - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/union.js - var primitiveMappings = { - ZodString: "string", - ZodNumber: "number", - ZodBigInt: "integer", - ZodBoolean: "boolean", - ZodNull: "null" - }; - function parseUnionDef(def, refs) { - if (refs.target === "openApi3") - return asAnyOf(def, refs); - const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; - if (options.every((x3) => x3._def.typeName in primitiveMappings && (!x3._def.checks || !x3._def.checks.length))) { - const types = options.reduce((types2, x3) => { - const type = primitiveMappings[x3._def.typeName]; - return type && !types2.includes(type) ? [...types2, type] : types2; - }, []); - return { - type: types.length > 1 ? types : types[0] - }; - } else if (options.every((x3) => x3._def.typeName === "ZodLiteral" && !x3.description)) { - const types = options.reduce((acc, x3) => { - const type = typeof x3._def.value; - switch (type) { - case "string": - case "number": - case "boolean": - return [...acc, type]; - case "bigint": - return [...acc, "integer"]; - case "object": - if (x3._def.value === null) - return [...acc, "null"]; - case "symbol": - case "undefined": - case "function": - default: - return acc; - } - }, []); - if (types.length === options.length) { - const uniqueTypes = types.filter((x3, i4, a5) => a5.indexOf(x3) === i4); - return { - type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], - enum: options.reduce((acc, x3) => { - return acc.includes(x3._def.value) ? acc : [...acc, x3._def.value]; - }, []) - }; - } - } else if (options.every((x3) => x3._def.typeName === "ZodEnum")) { - return { - type: "string", - enum: options.reduce((acc, x3) => [ - ...acc, - ...x3._def.values.filter((x4) => !acc.includes(x4)) - ], []) - }; - } - return asAnyOf(def, refs); - } - var asAnyOf = (def, refs) => { - const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", `${i4}`] - })).filter((x3) => !!x3 && (!refs.strictUnions || typeof x3 === "object" && Object.keys(x3).length > 0)); - return anyOf.length ? { anyOf } : void 0; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js - function parseNullableDef(def, refs) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { - if (refs.target === "openApi3") { - return { - type: primitiveMappings[def.innerType._def.typeName], - nullable: true - }; - } - return { - type: [ - primitiveMappings[def.innerType._def.typeName], - "null" - ] - }; - } - if (refs.target === "openApi3") { - const base2 = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath] - }); - if (base2 && "$ref" in base2) - return { allOf: [base2], nullable: true }; - return base2 && { ...base2, nullable: true }; - } - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "0"] - }); - return base && { anyOf: [base, { type: "null" }] }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/number.js - function parseNumberDef(def, refs) { - const res = { - type: "number" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "int": - res.type = "integer"; - addErrorMessage(res, "type", check.message, refs); - break; - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/object.js - function parseObjectDef(def, refs) { - const forceOptionalIntoNullable = refs.target === "openAi"; - const result = { - type: "object", - properties: {} - }; - const required = []; - const shape = def.shape(); - for (const propName in shape) { - let propDef = shape[propName]; - if (propDef === void 0 || propDef._def === void 0) { - continue; - } - let propOptional = safeIsOptional(propDef); - if (propOptional && forceOptionalIntoNullable) { - if (propDef._def.typeName === "ZodOptional") { - propDef = propDef._def.innerType; - } - if (!propDef.isNullable()) { - propDef = propDef.nullable(); - } - propOptional = false; - } - const parsedDef = parseDef(propDef._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", propName], - propertyPath: [...refs.currentPath, "properties", propName] - }); - if (parsedDef === void 0) { - continue; - } - result.properties[propName] = parsedDef; - if (!propOptional) { - required.push(propName); - } - } - if (required.length) { - result.required = required; - } - const additionalProperties = decideAdditionalProperties(def, refs); - if (additionalProperties !== void 0) { - result.additionalProperties = additionalProperties; - } - return result; - } - function decideAdditionalProperties(def, refs) { - if (def.catchall._def.typeName !== "ZodNever") { - return parseDef(def.catchall._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }); - } - switch (def.unknownKeys) { - case "passthrough": - return refs.allowedAdditionalProperties; - case "strict": - return refs.rejectedAdditionalProperties; - case "strip": - return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties; - } - } - function safeIsOptional(schema) { - try { - return schema.isOptional(); - } catch { - return true; - } - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/optional.js - var parseOptionalDef = (def, refs) => { - if (refs.currentPath.toString() === refs.propertyPath?.toString()) { - return parseDef(def.innerType._def, refs); - } - const innerSchema = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "1"] - }); - return innerSchema ? { - anyOf: [ - { - not: parseAnyDef(refs) - }, - innerSchema - ] - } : parseAnyDef(refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js - var parsePipelineDef = (def, refs) => { - if (refs.pipeStrategy === "input") { - return parseDef(def.in._def, refs); - } else if (refs.pipeStrategy === "output") { - return parseDef(def.out._def, refs); - } - const a5 = parseDef(def.in._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }); - const b2 = parseDef(def.out._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", a5 ? "1" : "0"] - }); - return { - allOf: [a5, b2].filter((x3) => x3 !== void 0) - }; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/promise.js - function parsePromiseDef(def, refs) { - return parseDef(def.type._def, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/set.js - function parseSetDef(def, refs) { - const items = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - const schema = { - type: "array", - uniqueItems: true, - items - }; - if (def.minSize) { - setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs); - } - if (def.maxSize) { - setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs); - } - return schema; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js - function parseTupleDef(def, refs) { - if (def.rest) { - return { - type: "array", - minItems: def.items.length, - items: def.items.map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i4}`] - })).reduce((acc, x3) => x3 === void 0 ? acc : [...acc, x3], []), - additionalItems: parseDef(def.rest._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalItems"] - }) - }; - } else { - return { - type: "array", - minItems: def.items.length, - maxItems: def.items.length, - items: def.items.map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i4}`] - })).reduce((acc, x3) => x3 === void 0 ? acc : [...acc, x3], []) - }; - } - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js - function parseUndefinedDef(refs) { - return { - not: parseAnyDef(refs) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js - function parseUnknownDef(refs) { - return parseAnyDef(refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js - var parseReadonlyDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/selectParser.js - var selectParser = (def, typeName, refs) => { - switch (typeName) { - case ZodFirstPartyTypeKind.ZodString: - return parseStringDef(def, refs); - case ZodFirstPartyTypeKind.ZodNumber: - return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind.ZodObject: - return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind.ZodBigInt: - return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind.ZodBoolean: - return parseBooleanDef(); - case ZodFirstPartyTypeKind.ZodDate: - return parseDateDef(def, refs); - case ZodFirstPartyTypeKind.ZodUndefined: - return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind.ZodNull: - return parseNullDef(refs); - case ZodFirstPartyTypeKind.ZodArray: - return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind.ZodUnion: - case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: - return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind.ZodIntersection: - return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind.ZodTuple: - return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind.ZodRecord: - return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind.ZodLiteral: - return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind.ZodEnum: - return parseEnumDef(def); - case ZodFirstPartyTypeKind.ZodNativeEnum: - return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind.ZodNullable: - return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind.ZodOptional: - return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind.ZodMap: - return parseMapDef(def, refs); - case ZodFirstPartyTypeKind.ZodSet: - return parseSetDef(def, refs); - case ZodFirstPartyTypeKind.ZodLazy: - return () => def.getter()._def; - case ZodFirstPartyTypeKind.ZodPromise: - return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind.ZodNaN: - case ZodFirstPartyTypeKind.ZodNever: - return parseNeverDef(refs); - case ZodFirstPartyTypeKind.ZodEffects: - return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind.ZodAny: - return parseAnyDef(refs); - case ZodFirstPartyTypeKind.ZodUnknown: - return parseUnknownDef(refs); - case ZodFirstPartyTypeKind.ZodDefault: - return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind.ZodBranded: - return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind.ZodReadonly: - return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind.ZodCatch: - return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind.ZodPipeline: - return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind.ZodFunction: - case ZodFirstPartyTypeKind.ZodVoid: - case ZodFirstPartyTypeKind.ZodSymbol: - return void 0; - default: - return /* @__PURE__ */ ((_4) => void 0)(typeName); - } - }; - - // node_modules/zod-to-json-schema/dist/esm/parseDef.js - function parseDef(def, refs, forceResolution = false) { - const seenItem = refs.seen.get(def); - if (refs.override) { - const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); - if (overrideResult !== ignoreOverride) { - return overrideResult; - } - } - if (seenItem && !forceResolution) { - const seenSchema = get$ref(seenItem, refs); - if (seenSchema !== void 0) { - return seenSchema; - } - } - const newItem = { def, path: refs.currentPath, jsonSchema: void 0 }; - refs.seen.set(def, newItem); - const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); - const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter; - if (jsonSchema) { - addMeta(def, refs, jsonSchema); - } - if (refs.postProcess) { - const postProcessResult = refs.postProcess(jsonSchema, def, refs); - newItem.jsonSchema = jsonSchema; - return postProcessResult; - } - newItem.jsonSchema = jsonSchema; - return jsonSchema; - } - var get$ref = (item, refs) => { - switch (refs.$refStrategy) { - case "root": - return { $ref: item.path.join("/") }; - case "relative": - return { $ref: getRelativePath(refs.currentPath, item.path) }; - case "none": - case "seen": { - if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) { - console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); - return parseAnyDef(refs); - } - return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0; - } - } - }; - var addMeta = (def, refs, jsonSchema) => { - if (def.description) { - jsonSchema.description = def.description; - if (refs.markdownDescription) { - jsonSchema.markdownDescription = def.description; - } - } - return jsonSchema; - }; - - // node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js - var zodToJsonSchema = (schema, options) => { - const refs = getRefs(options); - let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({ - ...acc, - [name2]: parseDef(schema2._def, { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name2] - }, true) ?? parseAnyDef(refs) - }), {}) : void 0; - const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name; - const main = parseDef(schema._def, name === void 0 ? refs : { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name] - }, false) ?? parseAnyDef(refs); - const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0; - if (title !== void 0) { - main.title = title; - } - if (refs.flags.hasReferencedOpenAiAnyType) { - if (!definitions) { - definitions = {}; - } - if (!definitions[refs.openAiAnyTypeName]) { - definitions[refs.openAiAnyTypeName] = { - // Skipping "object" as no properties can be defined and additionalProperties must be "false" - type: ["string", "number", "integer", "boolean", "array", "null"], - items: { - $ref: refs.$refStrategy === "relative" ? "1" : [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ].join("/") - } - }; - } - } - const combined = name === void 0 ? definitions ? { - ...main, - [refs.definitionPath]: definitions - } : main : { - $ref: [ - ...refs.$refStrategy === "relative" ? [] : refs.basePath, - refs.definitionPath, - name - ].join("/"), - [refs.definitionPath]: { - ...definitions, - [name]: main - } - }; - if (refs.target === "jsonSchema7") { - combined.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { - combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; - } - if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) { - console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); - } - return combined; - }; - - // node_modules/@walkeros/core/dist/index.mjs - var e = Object.defineProperty; - var t = (t12, n5) => { - for (var i4 in n5) - e(t12, i4, { get: n5[i4], enumerable: true }); - }; - var h = external_exports.string(); - var y = external_exports.number(); - var S = external_exports.boolean(); - var v = external_exports.string().min(1); - var j = external_exports.number().int().positive(); - var w = external_exports.number().int().nonnegative(); - var x = external_exports.number().describe("Tagging version number"); - var E = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]); - var C = E.optional(); - var P = {}; - t(P, { ErrorHandlerSchema: () => O, HandlerSchema: () => L, LogHandlerSchema: () => J, StorageSchema: () => I, StorageTypeSchema: () => $, errorHandlerJsonSchema: () => R, handlerJsonSchema: () => q, logHandlerJsonSchema: () => A, storageJsonSchema: () => M, storageTypeJsonSchema: () => T }); - var $ = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); - var I = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references"); - var O = external_exports.any().describe("Error handler function: (error, state?) => void"); - var J = external_exports.any().describe("Log handler function: (message, verbose?) => void"); - var L = external_exports.object({ Error: O.describe("Error handler function"), Log: J.describe("Log handler function") }).describe("Handler interface with error and log functions"); - var T = zodToJsonSchema($, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); - var M = zodToJsonSchema(I, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); - var R = zodToJsonSchema(O, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); - var A = zodToJsonSchema(J, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); - var q = zodToJsonSchema(L, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); - var U = external_exports.object({ onError: O.optional().describe("Error handler function: (error, state?) => void"), onLog: J.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); - var N = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); - var B = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); - var W = external_exports.object({}).partial(); - var V = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); - var H = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial(); - var _ = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); - var K = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(); - var F = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); - var Z = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.any().describe("Instance configuration") }).partial(); - var ee = external_exports.object({ collector: external_exports.any().describe("Collector instance (runtime object)"), config: external_exports.any().describe("Configuration"), env: external_exports.any().describe("Environment dependencies") }).partial(); - var te = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.any().optional().describe("Batch of events to be processed") }).partial(); - var ne = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(); - var ie = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.any()).describe("Map of source instances") }).partial(); - var oe = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.any()).describe("Map of destination instances") }).partial(); - var re = {}; - t(re, { ConsentSchema: () => me, DeepPartialEventSchema: () => je, EntitiesSchema: () => ye, EntitySchema: () => he, EventSchema: () => Se, OrderedPropertiesSchema: () => pe, PartialEventSchema: () => ve, PropertiesSchema: () => de, PropertySchema: () => le, PropertyTypeSchema: () => ce, SourceSchema: () => fe, SourceTypeSchema: () => ue, UserSchema: () => ge, VersionSchema: () => be, consentJsonSchema: () => De, entityJsonSchema: () => Pe, eventJsonSchema: () => we, orderedPropertiesJsonSchema: () => ke, partialEventJsonSchema: () => xe, propertiesJsonSchema: () => Ce, sourceTypeJsonSchema: () => ze, userJsonSchema: () => Ee }); - var ce = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), le)])); - var le = external_exports.lazy(() => external_exports.union([ce, external_exports.array(ce)])); - var de = external_exports.record(external_exports.string(), le.optional()).describe("Flexible property collection with optional values"); - var pe = external_exports.record(external_exports.string(), external_exports.tuple([le, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); - var ue = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom"); - var me = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); - var ge = de.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); - var be = de.and(external_exports.object({ source: h.describe('Walker implementation version (e.g., "2.0.0")'), tagging: x })).describe("Walker version information"); - var fe = de.and(external_exports.object({ type: ue.describe("Source type identifier"), id: h.describe("Source identifier (typically URL on web)"), previous_id: h.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); - var he = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: de.describe("Entity-specific properties"), nested: external_exports.array(he).describe("Nested child entities"), context: pe.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); - var ye = external_exports.array(he).describe("Array of nested entities"); - var Se = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: de.describe("Event-specific properties"), context: pe.describe("Ordered context properties with priorities"), globals: de.describe("Global properties shared across events"), custom: de.describe("Custom implementation-specific properties"), user: ge.describe("User identification and attributes"), nested: ye.describe("Related nested entities"), consent: me.describe("Consent states at event time"), id: v.describe("Unique event identifier (timestamp-based)"), trigger: h.describe("Event trigger identifier"), entity: h.describe("Parsed entity from event name"), action: h.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: y.describe("Event processing timing information"), group: h.describe("Event grouping identifier"), count: w.describe("Event count in session"), version: be.describe("Walker version information"), source: fe.describe("Event source information") }).describe("Complete walkerOS event structure"); - var ve = Se.partial().describe("Partial event structure with all fields optional"); - var je = external_exports.lazy(() => Se.deepPartial()).describe("Deep partial event structure with all nested fields optional"); - var we = zodToJsonSchema(Se, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); - var xe = zodToJsonSchema(ve, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); - var Ee = zodToJsonSchema(ge, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); - var Ce = zodToJsonSchema(de, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); - var ke = zodToJsonSchema(pe, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); - var Pe = zodToJsonSchema(he, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); - var ze = zodToJsonSchema(ue, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); - var De = zodToJsonSchema(me, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); - var $e = {}; - t($e, { ConfigSchema: () => Be, LoopSchema: () => Te, MapSchema: () => Re, PolicySchema: () => qe, ResultSchema: () => We, RuleSchema: () => Ue, RulesSchema: () => Ne, SetSchema: () => Me, ValueConfigSchema: () => Ae, ValueSchema: () => Je, ValuesSchema: () => Le, configJsonSchema: () => Ye, loopJsonSchema: () => _e, mapJsonSchema: () => Fe, policyJsonSchema: () => Ge, ruleJsonSchema: () => Qe, rulesJsonSchema: () => Xe, setJsonSchema: () => Ke, valueConfigJsonSchema: () => He, valueJsonSchema: () => Ve }); - var Je = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), Ae, external_exports.array(Je).describe("Array of values")])); - var Le = external_exports.array(Je).describe("Array of transformation values"); - var Te = external_exports.tuple([Je, Je]).describe("Loop transformation: [source, transform] tuple for array processing"); - var Me = external_exports.array(Je).describe("Set: Array of values for selection or combination"); - var Re = external_exports.record(external_exports.string(), Je).describe("Map: Object mapping keys to transformation values"); - var Ae = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: Re.optional().describe("Object mapping: transform event data to structured output"), loop: Te.optional().describe("Loop transformation: [source, transform] for array processing"), set: Me.optional().describe("Set of values: combine or select from multiple values"), consent: me.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e14) => Object.keys(e14).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); - var qe = external_exports.record(external_exports.string(), Je).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); - var Ue = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: me.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([Je, Le]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: qe.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); - var Ne = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Ue, external_exports.array(Ue)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); - var Be = external_exports.object({ consent: me.optional().describe("Required consent states to process any events"), data: external_exports.union([Je, Le]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: qe.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); - var We = external_exports.object({ eventMapping: Ue.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); - var Ve = zodToJsonSchema(Je, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); - var He = zodToJsonSchema(Ae, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); - var _e = zodToJsonSchema(Te, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); - var Ke = zodToJsonSchema(Me, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); - var Fe = zodToJsonSchema(Re, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); - var Ge = zodToJsonSchema(qe, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); - var Qe = zodToJsonSchema(Ue, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); - var Xe = zodToJsonSchema(Ne, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); - var Ye = zodToJsonSchema(Be, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); - var Ze = {}; - t(Ze, { BatchSchema: () => dt, ConfigSchema: () => nt, ContextSchema: () => rt, DLQSchema: () => St, DataSchema: () => pt, DestinationPolicySchema: () => ot, DestinationsSchema: () => bt, InitDestinationsSchema: () => gt, InitSchema: () => mt, InstanceSchema: () => ut, PartialConfigSchema: () => it, PushBatchContextSchema: () => st, PushContextSchema: () => at, PushEventSchema: () => ct, PushEventsSchema: () => lt, PushResultSchema: () => ht, RefSchema: () => ft, ResultSchema: () => yt, batchJsonSchema: () => Et, configJsonSchema: () => vt, contextJsonSchema: () => wt, instanceJsonSchema: () => Ct, partialConfigJsonSchema: () => jt, pushContextJsonSchema: () => xt, resultJsonSchema: () => kt }); - var nt = external_exports.object({ consent: me.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([Je, Le]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: v.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: qe.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: O.optional(), onLog: J.optional() }).describe("Destination configuration"); - var it = nt.deepPartial().describe("Partial destination configuration with all fields deeply optional"); - var ot = qe.describe("Destination policy rules for event pre-processing"); - var rt = external_exports.object({ collector: external_exports.any().describe("Collector instance (runtime object)"), config: nt.describe("Destination configuration"), data: external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))]).optional().describe("Transformed event data"), env: external_exports.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); - var at = rt.extend({ mapping: Ue.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); - var st = at.describe("Batch push context with event-specific mapping"); - var ct = external_exports.object({ event: Se.describe("The event to process"), mapping: Ue.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); - var lt = external_exports.array(ct).describe("Array of events with mappings"); - var dt = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(Se).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))])).describe("Transformed data for each event"), mapping: Ue.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); - var pt = external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); - var ut = external_exports.object({ config: nt.describe("Destination configuration"), queue: external_exports.array(Se).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([Se, external_exports.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.any().optional().describe("Environment dependencies"), init: external_exports.any().optional().describe("Initialization function"), push: external_exports.any().describe("Push function for single events"), pushBatch: external_exports.any().optional().describe("Batch push function"), on: external_exports.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); - var mt = external_exports.object({ code: ut.describe("Destination instance with implementation"), config: it.optional().describe("Partial configuration overrides"), env: external_exports.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); - var gt = external_exports.record(external_exports.string(), mt).describe("Map of destination IDs to initialization configurations"); - var bt = external_exports.record(external_exports.string(), ut).describe("Map of destination IDs to runtime instances"); - var ft = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: ut.describe("Destination instance") }).describe("Destination reference (ID + instance)"); - var ht = external_exports.object({ queue: external_exports.array(Se).optional().describe("Events queued (awaiting consent)"), error: external_exports.any().optional().describe("Error if push failed") }).describe("Push operation result"); - var yt = external_exports.object({ successful: external_exports.array(ft).describe("Destinations that processed successfully"), queued: external_exports.array(ft).describe("Destinations that queued events"), failed: external_exports.array(ft).describe("Destinations that failed to process") }).describe("Overall destination processing result"); - var St = external_exports.array(external_exports.tuple([Se, external_exports.any()])).describe("Dead letter queue: [(event, error), ...]"); - var vt = zodToJsonSchema(nt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); - var jt = zodToJsonSchema(it, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); - var wt = zodToJsonSchema(rt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); - var xt = zodToJsonSchema(at, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); - var Et = zodToJsonSchema(dt, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); - var Ct = zodToJsonSchema(ut, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); - var kt = zodToJsonSchema(yt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); - var Pt = {}; - t(Pt, { CommandTypeSchema: () => $t, ConfigSchema: () => It, DestinationsSchema: () => Mt, InitConfigSchema: () => Jt, InstanceSchema: () => Rt, PushContextSchema: () => Lt, SessionDataSchema: () => Ot, SourcesSchema: () => Tt, commandTypeJsonSchema: () => At, configJsonSchema: () => qt, initConfigJsonSchema: () => Nt, instanceJsonSchema: () => Wt, pushContextJsonSchema: () => Bt, sessionDataJsonSchema: () => Ut }); - var $t = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions"); - var It = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: x, globalsStatic: de.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.any()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: O.optional(), onLog: J.optional() }).describe("Core collector configuration"); - var Ot = de.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: v.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: v.describe("Device identifier").optional(), count: w.describe("Event count in session").optional(), runs: w.describe("Number of runs").optional() })).describe("Session state and tracking data"); - var Jt = It.partial().extend({ consent: me.optional().describe("Initial consent state"), user: ge.optional().describe("Initial user data"), globals: de.optional().describe("Initial global properties"), sources: external_exports.any().optional().describe("Source configurations"), destinations: external_exports.any().optional().describe("Destination configurations"), custom: de.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); - var Lt = external_exports.object({ mapping: Be.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); - var Tt = external_exports.record(external_exports.string(), external_exports.any()).describe("Map of source IDs to source instances"); - var Mt = external_exports.record(external_exports.string(), external_exports.any()).describe("Map of destination IDs to destination instances"); - var Rt = external_exports.object({ push: external_exports.any().describe("Push function for processing events"), command: external_exports.any().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: It.describe("Current collector configuration"), consent: me.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: de.describe("Custom implementation-specific properties"), sources: Tt.describe("Registered source instances"), destinations: Mt.describe("Registered destination instances"), globals: de.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.any().describe("Lifecycle hook functions"), on: external_exports.any().describe("Event lifecycle configuration"), queue: external_exports.array(Se).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([external_exports.undefined(), Ot]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: ge.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); - var At = zodToJsonSchema($t, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); - var qt = zodToJsonSchema(It, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); - var Ut = zodToJsonSchema(Ot, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); - var Nt = zodToJsonSchema(Jt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); - var Bt = zodToJsonSchema(Lt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); - var Wt = zodToJsonSchema(Rt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); - var Vt = {}; - t(Vt, { BaseEnvSchema: () => Kt, ConfigSchema: () => Ft, InitSchema: () => Xt, InitSourceSchema: () => Yt, InitSourcesSchema: () => Zt, InstanceSchema: () => Qt, PartialConfigSchema: () => Gt, baseEnvJsonSchema: () => en, configJsonSchema: () => tn, initSourceJsonSchema: () => rn, initSourcesJsonSchema: () => an, instanceJsonSchema: () => on, partialConfigJsonSchema: () => nn }); - var Kt = external_exports.object({ push: external_exports.any().describe("Collector push function"), command: external_exports.any().describe("Collector command function"), sources: external_exports.any().optional().describe("Map of registered source instances"), elb: external_exports.any().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); - var Ft = Be.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Kt.optional().describe("Environment dependencies (platform-specific)"), id: v.describe("Source identifier (defaults to source key)").optional(), onError: O.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); - var Gt = Ft.deepPartial().describe("Partial source configuration with all fields deeply optional"); - var Qt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ft.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); - var Xt = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise"); - var Yt = external_exports.object({ code: Xt.describe("Source initialization function"), config: Gt.optional().describe("Partial configuration overrides"), env: Kt.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); - var Zt = external_exports.record(external_exports.string(), Yt).describe("Map of source IDs to initialization configurations"); - var en = zodToJsonSchema(Kt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); - var tn = zodToJsonSchema(Ft, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); - var nn = zodToJsonSchema(Gt, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); - var on = zodToJsonSchema(Qt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); - var rn = zodToJsonSchema(Yt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); - var an = zodToJsonSchema(Zt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); - var hn = { merge: true, shallow: true, extend: true }; - function yn(e14, t12 = {}, n5 = {}) { - n5 = { ...hn, ...n5 }; - const i4 = Object.entries(t12).reduce((t13, [i5, o4]) => { - const r3 = e14[i5]; - return n5.merge && Array.isArray(r3) && Array.isArray(o4) ? t13[i5] = o4.reduce((e15, t14) => e15.includes(t14) ? e15 : [...e15, t14], [...r3]) : (n5.extend || i5 in e14) && (t13[i5] = o4), t13; - }, {}); - return n5.shallow ? { ...e14, ...i4 } : (Object.assign(e14, i4), e14); - } - function vn(e14) { - return Array.isArray(e14); - } - function jn(e14) { - return "boolean" == typeof e14; - } - function xn(e14) { - return void 0 !== e14; - } - function Cn(e14) { - return "function" == typeof e14; - } - function kn(e14) { - return "number" == typeof e14 && !Number.isNaN(e14); - } - function Pn(e14) { - return "object" == typeof e14 && null !== e14 && !vn(e14) && "[object Object]" === Object.prototype.toString.call(e14); - } - function Dn(e14) { - return "string" == typeof e14; - } - function $n(e14, t12 = /* @__PURE__ */ new WeakMap()) { - if ("object" != typeof e14 || null === e14) - return e14; - if (t12.has(e14)) - return t12.get(e14); - const n5 = Object.prototype.toString.call(e14); - if ("[object Object]" === n5) { - const n6 = {}; - t12.set(e14, n6); - for (const i4 in e14) - Object.prototype.hasOwnProperty.call(e14, i4) && (n6[i4] = $n(e14[i4], t12)); - return n6; - } - if ("[object Array]" === n5) { - const n6 = []; - return t12.set(e14, n6), e14.forEach((e15) => { - n6.push($n(e15, t12)); - }), n6; - } - if ("[object Date]" === n5) - return new Date(e14.getTime()); - if ("[object RegExp]" === n5) { - const t13 = e14; - return new RegExp(t13.source, t13.flags); - } - return e14; - } - function In(e14, t12 = "", n5) { - const i4 = t12.split("."); - let o4 = e14; - for (let e15 = 0; e15 < i4.length; e15++) { - const t13 = i4[e15]; - if ("*" === t13 && vn(o4)) { - const t14 = i4.slice(e15 + 1).join("."), r3 = []; - for (const e16 of o4) { - const i5 = In(e16, t14, n5); - r3.push(i5); - } - return r3; - } - if (o4 = o4 instanceof Object ? o4[t13] : void 0, !o4) - break; - } - return xn(o4) ? o4 : n5; - } - function On(e14, t12, n5) { - if (!Pn(e14)) - return e14; - const i4 = $n(e14), o4 = t12.split("."); - let r3 = i4; - for (let e15 = 0; e15 < o4.length; e15++) { - const t13 = o4[e15]; - e15 === o4.length - 1 ? r3[t13] = n5 : (t13 in r3 && "object" == typeof r3[t13] && null !== r3[t13] || (r3[t13] = {}), r3 = r3[t13]); - } - return i4; - } - function Ln(e14, t12 = {}, n5 = {}) { - const i4 = { ...t12, ...n5 }, o4 = {}; - let r3 = void 0 === e14; - return Object.keys(i4).forEach((t13) => { - i4[t13] && (o4[t13] = true, e14 && e14[t13] && (r3 = true)); - }), !!r3 && o4; - } - function An(e14 = 6) { - let t12 = ""; - for (let n5 = 36; t12.length < e14; ) - t12 += (Math.random() * n5 | 0).toString(n5); - return t12; - } - function Un(e14, t12 = 1e3, n5 = false) { - let i4, o4 = null, r3 = false; - return (...a5) => new Promise((s5) => { - const c3 = n5 && !r3; - o4 && clearTimeout(o4), o4 = setTimeout(() => { - o4 = null, n5 && !r3 || (i4 = e14(...a5), s5(i4)); - }, t12), c3 && (r3 = true, i4 = e14(...a5), s5(i4)); - }); - } - function Bn(e14) { - return jn(e14) || Dn(e14) || kn(e14) || !xn(e14) || vn(e14) && e14.every(Bn) || Pn(e14) && Object.values(e14).every(Bn); - } - function Vn(e14) { - return Bn(e14) ? e14 : void 0; - } - function Hn(e14, t12, n5) { - return function(...i4) { - try { - return e14(...i4); - } catch (e15) { - if (!t12) - return; - return t12(e15); - } finally { - n5?.(); - } - }; - } - function _n(e14, t12, n5) { - return async function(...i4) { - try { - return await e14(...i4); - } catch (e15) { - if (!t12) - return; - return await t12(e15); - } finally { - await n5?.(); - } - }; - } - async function Kn(e14, t12) { - const [n5, i4] = (e14.name || "").split(" "); - if (!t12 || !n5 || !i4) - return {}; - let o4, r3 = "", a5 = n5, s5 = i4; - const c3 = (t13) => { - if (t13) - return (t13 = vn(t13) ? t13 : [t13]).find((t14) => !t14.condition || t14.condition(e14)); - }; - t12[a5] || (a5 = "*"); - const l3 = t12[a5]; - return l3 && (l3[s5] || (s5 = "*"), o4 = c3(l3[s5])), o4 || (a5 = "*", s5 = "*", o4 = c3(t12[a5]?.[s5])), o4 && (r3 = `${a5} ${s5}`), { eventMapping: o4, mappingKey: r3 }; - } - async function Fn(e14, t12 = {}, n5 = {}) { - if (!xn(e14)) - return; - const i4 = Pn(e14) && e14.consent || n5.consent || n5.collector?.consent, o4 = vn(t12) ? t12 : [t12]; - for (const t13 of o4) { - const o5 = await _n(Gn)(e14, t13, { ...n5, consent: i4 }); - if (xn(o5)) - return o5; - } - } - async function Gn(e14, t12, n5 = {}) { - const { collector: i4, consent: o4 } = n5; - return (vn(t12) ? t12 : [t12]).reduce(async (t13, r3) => { - const a5 = await t13; - if (a5) - return a5; - const s5 = Dn(r3) ? { key: r3 } : r3; - if (!Object.keys(s5).length) - return; - const { condition: c3, consent: l3, fn: d2, key: p2, loop: u3, map: m2, set: g3, validate: b2, value: f2 } = s5; - if (c3 && !await _n(c3)(e14, r3, i4)) - return; - if (l3 && !Ln(l3, o4)) - return f2; - let h4 = xn(f2) ? f2 : e14; - if (d2 && (h4 = await _n(d2)(e14, r3, n5)), p2 && (h4 = In(e14, p2, f2)), u3) { - const [t14, i5] = u3, o5 = "this" === t14 ? [e14] : await Fn(e14, t14, n5); - vn(o5) && (h4 = (await Promise.all(o5.map((e15) => Fn(e15, i5, n5)))).filter(xn)); - } else - m2 ? h4 = await Object.entries(m2).reduce(async (t14, [i5, o5]) => { - const r4 = await t14, a6 = await Fn(e14, o5, n5); - return xn(a6) && (r4[i5] = a6), r4; - }, Promise.resolve({})) : g3 && (h4 = await Promise.all(g3.map((t14) => Gn(e14, t14, n5)))); - b2 && !await _n(b2)(h4) && (h4 = void 0); - const y4 = Vn(h4); - return xn(y4) ? y4 : Vn(f2); - }, Promise.resolve(void 0)); - } - async function Qn(e14, t12, n5) { - t12.policy && await Promise.all(Object.entries(t12.policy).map(async ([t13, i5]) => { - const o5 = await Fn(e14, i5, { collector: n5 }); - e14 = On(e14, t13, o5); - })); - const { eventMapping: i4, mappingKey: o4 } = await Kn(e14, t12.mapping); - i4?.policy && await Promise.all(Object.entries(i4.policy).map(async ([t13, i5]) => { - const o5 = await Fn(e14, i5, { collector: n5 }); - e14 = On(e14, t13, o5); - })); - let r3 = t12.data && await Fn(e14, t12.data, { collector: n5 }); - if (i4) { - if (i4.ignore) - return { event: e14, data: r3, mapping: i4, mappingKey: o4, ignore: true }; - if (i4.name && (e14.name = i4.name), i4.data) { - const t13 = i4.data && await Fn(e14, i4.data, { collector: n5 }); - r3 = Pn(r3) && Pn(t13) ? yn(r3, t13) : t13; - } - } - return { event: e14, data: r3, mapping: i4, mappingKey: o4, ignore: false }; - } - function Zn(e14, t12 = false) { - t12 && console.dir(e14, { depth: 4 }); - } - function ai(e14, t12, n5) { - return function(...i4) { - let o4; - const r3 = "post" + t12, a5 = n5["pre" + t12], s5 = n5[r3]; - return o4 = a5 ? a5({ fn: e14 }, ...i4) : e14(...i4), s5 && (o4 = s5({ fn: e14, result: o4 }, ...i4)), o4; - }; - } - - // node_modules/@walkeros/collector/dist/index.mjs - var e2 = Object.defineProperty; - var n = { Action: "action", Actions: "actions", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" }; - var o = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; - var t2 = {}; - ((n5, o4) => { - for (var t12 in o4) - e2(n5, t12, { get: o4[t12], enumerable: true }); - })(t2, { schemas: () => a, settingsSchema: () => s }); - var s = { type: "object", properties: { run: { type: "boolean", description: "Automatically start the collector pipeline on initialization" }, sources: { type: "object", description: "Configurations for sources providing events to the collector" }, destinations: { type: "object", description: "Configurations for destinations receiving processed events" }, consent: { type: "object", description: "Initial consent state to control routing of events" }, verbose: { type: "boolean", description: "Enable verbose logging for debugging" }, onError: { type: "string", description: "Error handler triggered when the collector encounters failures" }, onLog: { type: "string", description: "Custom log handler for collector messages" } } }; - var a = { settings: s }; - async function h2(e14, n5, o4) { - const { code: t12, config: s5 = {}, env: a5 = {} } = n5, i4 = o4 || s5 || { init: false }, c3 = { ...t12, config: i4, env: q2(t12.env, a5) }; - let r3 = c3.config.id; - if (!r3) - do { - r3 = An(4); - } while (e14.destinations[r3]); - return e14.destinations[r3] = c3, false !== c3.config.queue && (c3.queue = [...e14.queue]), y2(e14, void 0, { [r3]: c3 }); - } - async function y2(e14, n5, o4) { - const { allowed: t12, consent: s5, globals: a5, user: i4 } = e14; - if (!t12) - return w2({ ok: false }); - n5 && e14.queue.push(n5), o4 || (o4 = e14.destinations); - const u3 = await Promise.all(Object.entries(o4 || {}).map(async ([o5, t13]) => { - let u4 = (t13.queue || []).map((e15) => ({ ...e15, consent: s5 })); - if (t13.queue = [], n5) { - const e15 = $n(n5); - u4.push(e15); - } - if (!u4.length) - return { id: o5, destination: t13, skipped: true }; - const l4 = [], m3 = u4.filter((e15) => { - const n6 = Ln(t13.config.consent, s5, e15.consent); - return !n6 || (e15.consent = n6, l4.push(e15), false); - }); - if (t13.queue.concat(m3), !l4.length) - return { id: o5, destination: t13, queue: u4 }; - if (!await _n(v2)(e14, t13)) - return { id: o5, destination: t13, queue: u4 }; - let f3 = false; - return t13.dlq || (t13.dlq = []), await Promise.all(l4.map(async (n6) => (n6.globals = yn(a5, n6.globals), n6.user = yn(i4, n6.user), await _n(k, (o6) => (e14.config.onError && e14.config.onError(o6, e14), f3 = true, t13.dlq.push([n6, o6]), false))(e14, t13, n6), n6))), { id: o5, destination: t13, error: f3 }; - })), l3 = [], m2 = [], f2 = []; - for (const e15 of u3) { - if (e15.skipped) - continue; - const n6 = e15.destination, o5 = { id: e15.id, destination: n6 }; - e15.error ? f2.push(o5) : e15.queue && e15.queue.length ? (n6.queue = (n6.queue || []).concat(e15.queue), m2.push(o5)) : l3.push(o5); - } - return w2({ ok: !f2.length, event: n5, successful: l3, queued: m2, failed: f2 }); - } - async function v2(e14, n5) { - if (n5.init && !n5.config.init) { - const o4 = { collector: e14, config: n5.config, env: q2(n5.env, n5.config.env) }, t12 = await ai(n5.init, "DestinationInit", e14.hooks)(o4); - if (false === t12) - return t12; - n5.config = { ...t12 || n5.config, init: true }; - } - return true; - } - async function k(e14, n5, o4) { - const { config: t12 } = n5, s5 = await Qn(o4, t12, e14); - if (s5.ignore) - return false; - const a5 = { collector: e14, config: t12, data: s5.data, mapping: s5.mapping, env: q2(n5.env, t12.env) }, i4 = s5.mapping; - if (i4?.batch && n5.pushBatch) { - const o5 = i4.batched || { key: s5.mappingKey || "", events: [], data: [] }; - o5.events.push(s5.event), xn(s5.data) && o5.data.push(s5.data), i4.batchFn = i4.batchFn || Un((e15, n6) => { - const a6 = { collector: n6, config: t12, data: s5.data, mapping: i4, env: q2(e15.env, t12.env) }; - ai(e15.pushBatch, "DestinationPushBatch", n6.hooks)(o5, a6), o5.events = [], o5.data = []; - }, i4.batch), i4.batched = o5, i4.batchFn?.(n5, e14); - } else - await ai(n5.push, "DestinationPush", e14.hooks)(s5.event, a5); - return true; - } - function w2(e14) { - return yn({ ok: !e14?.failed?.length, successful: [], queued: [], failed: [] }, e14); - } - async function C2(e14, n5 = {}) { - const o4 = {}; - for (const [e15, t12] of Object.entries(n5)) { - const { code: n6, config: s5 = {}, env: a5 = {} } = t12, i4 = { ...n6.config, ...s5 }, c3 = q2(n6.env, a5); - o4[e15] = { ...n6, config: i4, env: c3 }; - } - return o4; - } - function q2(e14, n5) { - return e14 || n5 ? n5 ? e14 && Pn(e14) && Pn(n5) ? { ...e14, ...n5 } : n5 : e14 : {}; - } - function O2(e14, n5, o4) { - const t12 = e14.on, s5 = t12[n5] || [], a5 = vn(o4) ? o4 : [o4]; - a5.forEach((e15) => { - s5.push(e15); - }), t12[n5] = s5, A2(e14, n5, a5); - } - function A2(e14, n5, t12, s5) { - let a5, i4 = t12 || []; - switch (t12 || (i4 = e14.on[n5] || []), n5) { - case o.Commands.Consent: - a5 = s5 || e14.consent; - break; - case o.Commands.Session: - a5 = e14.session; - break; - case o.Commands.Ready: - case o.Commands.Run: - default: - a5 = void 0; - } - if (Object.values(e14.sources).forEach((e15) => { - e15.on && Hn(e15.on)(n5, a5); - }), Object.values(e14.destinations).forEach((e15) => { - if (e15.on) { - const o4 = e15.on; - Hn(o4)(n5, a5); - } - }), i4.length) - switch (n5) { - case o.Commands.Consent: - !function(e15, n6, o4) { - const t13 = o4 || e15.consent; - n6.forEach((n7) => { - Object.keys(t13).filter((e16) => e16 in n7).forEach((o5) => { - Hn(n7[o5])(e15, t13); - }); - }); - }(e14, i4, s5); - break; - case o.Commands.Ready: - case o.Commands.Run: - !function(e15, n6) { - e15.allowed && n6.forEach((n7) => { - Hn(n7)(e15); - }); - }(e14, i4); - break; - case o.Commands.Session: - !function(e15, n6) { - if (!e15.session) - return; - n6.forEach((n7) => { - Hn(n7)(e15, e15.session); - }); - }(e14, i4); - } - } - async function S2(e14, n5) { - const { consent: o4 } = e14; - let t12 = false; - const s5 = {}; - return Object.entries(n5).forEach(([e15, n6]) => { - const o5 = !!n6; - s5[e15] = o5, t12 = t12 || o5; - }), e14.consent = yn(o4, s5), A2(e14, "consent", void 0, s5), t12 ? y2(e14) : w2({ ok: true }); - } - async function B2(e14, n5, t12, s5) { - let a5; - switch (n5) { - case o.Commands.Config: - Pn(t12) && yn(e14.config, t12, { shallow: false }); - break; - case o.Commands.Consent: - Pn(t12) && (a5 = await S2(e14, t12)); - break; - case o.Commands.Custom: - Pn(t12) && (e14.custom = yn(e14.custom, t12)); - break; - case o.Commands.Destination: - Pn(t12) && Cn(t12.push) && (a5 = await h2(e14, { code: t12 }, s5)); - break; - case o.Commands.Globals: - Pn(t12) && (e14.globals = yn(e14.globals, t12)); - break; - case o.Commands.On: - Dn(t12) && O2(e14, t12, s5); - break; - case o.Commands.Ready: - A2(e14, "ready"); - break; - case o.Commands.Run: - a5 = await G(e14, t12); - break; - case o.Commands.Session: - A2(e14, "session"); - break; - case o.Commands.User: - Pn(t12) && yn(e14.user, t12, { shallow: false }); - } - return a5 || { ok: true, successful: [], queued: [], failed: [] }; - } - function F2(e14, n5) { - if (!n5.name) - throw new Error("Event name is required"); - const [o4, t12] = n5.name.split(" "); - if (!o4 || !t12) - throw new Error("Event name is invalid"); - ++e14.count; - const { timestamp: s5 = Date.now(), group: a5 = e14.group, count: i4 = e14.count } = n5, { name: c3 = `${o4} ${t12}`, data: r3 = {}, context: u3 = {}, globals: l3 = e14.globals, custom: d2 = {}, user: m2 = e14.user, nested: f2 = [], consent: g3 = e14.consent, id: p2 = `${s5}-${a5}-${i4}`, trigger: b2 = "", entity: h4 = o4, action: y4 = t12, timing: v4 = 0, version: k3 = { source: e14.version, tagging: e14.config.tagging || 0 }, source: w4 = { type: "collector", id: "", previous_id: "" } } = n5; - return { name: c3, data: r3, context: u3, globals: l3, custom: d2, user: m2, nested: f2, consent: g3, id: p2, trigger: b2, entity: h4, action: y4, timestamp: s5, timing: v4, group: a5, count: i4, version: k3, source: w4 }; - } - async function G(e14, n5) { - e14.allowed = true, e14.count = 0, e14.group = An(), e14.timing = Date.now(), n5 && (n5.consent && (e14.consent = yn(e14.consent, n5.consent)), n5.user && (e14.user = yn(e14.user, n5.user)), n5.globals && (e14.globals = yn(e14.config.globalsStatic || {}, n5.globals)), n5.custom && (e14.custom = yn(e14.custom, n5.custom))), Object.values(e14.destinations).forEach((e15) => { - e15.queue = []; - }), e14.queue = [], e14.round++; - const o4 = await y2(e14); - return A2(e14, "run"), o4; - } - function _2(e14, n5) { - return ai(async (o4, t12 = {}) => await _n(async () => { - let s5 = o4; - if (t12.mapping) { - const n6 = await Qn(s5, t12.mapping, e14); - if (n6.ignore) - return w2({ ok: true }); - if (t12.mapping.consent) { - if (!Ln(t12.mapping.consent, e14.consent, n6.event.consent)) - return w2({ ok: true }); - } - s5 = n6.event; - } - const a5 = n5(s5), i4 = F2(e14, a5); - return await y2(e14, i4); - }, () => w2({ ok: false }))(), "Push", e14.hooks); - } - async function J2(e14) { - const n5 = yn({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o4, run: true }, e14, { merge: false, extend: false }); - function o4(e15, o5) { - Zn({ message: e15 }, o5 || n5.verbose); - } - n5.onLog = o4; - const t12 = { ...n5.globalsStatic, ...e14.globals }, s5 = { allowed: false, config: n5, consent: e14.consent || {}, count: 0, custom: e14.custom || {}, destinations: {}, globals: t12, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e14.user || {}, version: "0.3.0", sources: {}, push: void 0, command: void 0 }; - return s5.push = _2(s5, (e15) => ({ timing: Math.round((Date.now() - s5.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e15 })), s5.command = function(e15, n6) { - return ai(async (o5, t13, s6) => await _n(async () => await n6(e15, o5, t13, s6), () => w2({ ok: false }))(), "Command", e15.hooks); - }(s5, B2), s5.destinations = await C2(0, e14.destinations || {}), s5; - } - async function Q(e14, n5 = {}) { - const o4 = {}; - for (const [t12, s5] of Object.entries(n5)) { - const { code: n6, config: a5 = {}, env: i4 = {}, primary: c3 } = s5, r3 = { push: (n7, o5 = {}) => e14.push(n7, { ...o5, mapping: a5 }), command: e14.command, sources: e14.sources, elb: e14.sources.elb.push, ...i4 }, u3 = await _n(n6)(a5, r3); - u3 && (c3 && (u3.config = { ...u3.config, primary: c3 }), o4[t12] = u3); - } - return o4; - } - async function T2(e14) { - e14 = e14 || {}; - const n5 = await J2(e14), o4 = (t12 = n5, { type: "elb", config: {}, push: async (e15, n6, o5, s6, a6, i5) => { - if ("string" == typeof e15 && e15.startsWith("walker ")) { - const s7 = e15.replace("walker ", ""); - return t12.command(s7, n6, o5); - } - let c4; - if ("string" == typeof e15) - c4 = { name: e15 }, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c4.data = n6); - else { - if (!e15 || "object" != typeof e15) - return { ok: false, successful: [], queued: [], failed: [] }; - c4 = e15, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c4.data = { ...c4.data || {}, ...n6 }); - } - return s6 && "object" == typeof s6 && (c4.context = s6), a6 && Array.isArray(a6) && (c4.nested = a6), i5 && "object" == typeof i5 && (c4.custom = i5), t12.push(c4); - } }); - var t12; - n5.sources.elb = o4; - const s5 = await Q(n5, e14.sources || {}); - Object.assign(n5.sources, s5); - const { consent: a5, user: i4, globals: c3, custom: r3 } = e14; - a5 && await n5.command("consent", a5), i4 && await n5.command("user", i4), c3 && Object.assign(n5.globals, c3), r3 && Object.assign(n5.custom, r3), n5.config.run && await n5.command("run"); - let u3 = o4.push; - const l3 = Object.values(n5.sources).filter((e15) => "elb" !== e15.type), d2 = l3.find((e15) => e15.config.primary); - return d2 ? u3 = d2.push : l3.length > 0 && (u3 = l3[0].push), { collector: n5, elb: u3 }; - } - - // node_modules/@walkeros/source-demo/dist/index.mjs - var e3 = Object.defineProperty; - var s2 = (s5, t12) => { - for (var a5 in t12) - e3(s5, a5, { get: t12[a5], enumerable: true }); - }; - var a2 = {}; - s2(a2, { env: () => n2 }); - var n2 = {}; - s2(n2, { init: () => i, push: () => r, simulation: () => u }); - var o2 = async () => ({ ok: true, successful: [], queued: [], failed: [] }); - var i = void 0; - var r = { push: o2, command: o2, elb: o2 }; - var u = ["call:elb"]; - var c = async (e14, s5) => { - const { elb: t12 } = s5, a5 = { ...e14, settings: e14?.settings || { events: [] } }; - return (a5.settings?.events || []).forEach((e15) => { - const { delay: s6, ...a6 } = e15; - setTimeout(() => t12(a6), s6 || 0); - }), { type: "demo", config: a5, push: t12 }; - }; - - // node_modules/@walkeros/destination-demo/dist/index.mjs - var e4 = Object.defineProperty; - var n3 = (n5, o4) => { - for (var i4 in o4) - e4(n5, i4, { get: o4[i4], enumerable: true }); - }; - var i2 = {}; - n3(i2, { env: () => t3 }); - var t3 = {}; - n3(t3, { init: () => s3, push: () => a3, simulation: () => l }); - var s3 = { log: void 0 }; - var a3 = { log: Object.assign(() => { - }, {}) }; - var l = ["call:log"]; - var g = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e14, env: n5 }) { - (n5?.log || console.log)(`[${{ name: "demo", ...e14?.settings }.name}] initialized`); - }, push(e14, { config: n5, env: o4 }) { - const i4 = o4?.log || console.log, t12 = { name: "demo", ...n5?.settings }, s5 = t12.values ? function(e15, n6) { - const o5 = {}; - for (const i5 of n6) { - const n7 = i5.split(".").reduce((e16, n8) => e16?.[n8], e15); - void 0 !== n7 && (o5[i5] = n7); - } - return o5; - }(e14, t12.values) : e14; - i4(`[${t12.name}] ${JSON.stringify(s5, null, 2)}`); - } }; - - // node_modules/@walkeros/web-destination-api/dist/index.mjs - var e5; - var t4; - var n4; - var a4 = Object.defineProperty; - var r2 = (e14, t12) => { - for (var n5 in t12) - a4(e14, n5, { get: t12[n5], enumerable: true }); - }; - var i3 = {}; - r2(i3, { BRAND: () => De2, DIRTY: () => k2, EMPTY_PATH: () => g2, INVALID: () => S3, NEVER: () => Nt2, OK: () => x2, ParseStatus: () => _3, Schema: () => E2, ZodAny: () => ue2, ZodArray: () => he2, ZodBigInt: () => re2, ZodBoolean: () => ie2, ZodBranded: () => Le2, ZodCatch: () => Me2, ZodDate: () => se, ZodDefault: () => Re2, ZodDiscriminatedUnion: () => be2, ZodEffects: () => Ne2, ZodEnum: () => Oe, ZodError: () => u2, ZodFirstPartyTypeKind: () => Be2, ZodFunction: () => je2, ZodIntersection: () => Se2, ZodIssueCode: () => c2, ZodLazy: () => Pe2, ZodLiteral: () => Te2, ZodMap: () => we2, ZodNaN: () => ze2, ZodNativeEnum: () => Ce2, ZodNever: () => pe2, ZodNull: () => de2, ZodNullable: () => Ie, ZodNumber: () => ae, ZodObject: () => ge2, ZodOptional: () => $e2, ZodParsedType: () => s4, ZodPipeline: () => Fe2, ZodPromise: () => Ee2, ZodReadonly: () => Ue2, ZodRecord: () => xe2, ZodSchema: () => E2, ZodSet: () => Ze2, ZodString: () => te2, ZodSymbol: () => oe2, ZodTransformer: () => Ne2, ZodTuple: () => ke2, ZodType: () => E2, ZodUndefined: () => ce2, ZodUnion: () => ye2, ZodUnknown: () => le2, ZodVoid: () => me2, addIssueToContext: () => y3, any: () => rt2, array: () => ct2, bigint: () => Qe2, boolean: () => Xe2, coerce: () => Et2, custom: () => Ve2, date: () => et, datetimeRegex: () => Y, defaultErrorMap: () => l2, discriminatedUnion: () => pt2, effect: () => wt2, enum: () => St2, function: () => vt2, getErrorMap: () => h3, getParsedType: () => o3, instanceof: () => Ke2, intersection: () => mt2, isAborted: () => w3, isAsync: () => P2, isDirty: () => Z2, isValid: () => j2, late: () => We2, lazy: () => bt2, literal: () => _t, makeIssue: () => f, map: () => gt2, nan: () => Ye2, nativeEnum: () => kt2, never: () => st2, null: () => at2, nullable: () => jt2, number: () => Ge2, object: () => dt2, objectUtil: () => n4, oboolean: () => Ct2, onumber: () => Ot2, optional: () => Zt2, ostring: () => At2, pipeline: () => Tt2, preprocess: () => Pt2, promise: () => xt2, quotelessJson: () => d, record: () => ft2, set: () => yt2, setErrorMap: () => m, strictObject: () => ut2, string: () => He2, symbol: () => tt, transformer: () => wt2, tuple: () => ht2, undefined: () => nt2, union: () => lt2, unknown: () => it2, util: () => e5, void: () => ot2 }), (t4 = e5 || (e5 = {})).assertEqual = (e14) => { - }, t4.assertIs = function(e14) { - }, t4.assertNever = function(e14) { - throw new Error(); - }, t4.arrayToEnum = (e14) => { - const t12 = {}; - for (const n5 of e14) - t12[n5] = n5; - return t12; - }, t4.getValidEnumValues = (e14) => { - const n5 = t4.objectKeys(e14).filter((t12) => "number" != typeof e14[e14[t12]]), a5 = {}; - for (const t12 of n5) - a5[t12] = e14[t12]; - return t4.objectValues(a5); - }, t4.objectValues = (e14) => t4.objectKeys(e14).map(function(t12) { - return e14[t12]; - }), t4.objectKeys = "function" == typeof Object.keys ? (e14) => Object.keys(e14) : (e14) => { - const t12 = []; - for (const n5 in e14) - Object.prototype.hasOwnProperty.call(e14, n5) && t12.push(n5); - return t12; - }, t4.find = (e14, t12) => { - for (const n5 of e14) - if (t12(n5)) - return n5; - }, t4.isInteger = "function" == typeof Number.isInteger ? (e14) => Number.isInteger(e14) : (e14) => "number" == typeof e14 && Number.isFinite(e14) && Math.floor(e14) === e14, t4.joinValues = function(e14, t12 = " | ") { - return e14.map((e15) => "string" == typeof e15 ? `'${e15}'` : e15).join(t12); - }, t4.jsonStringifyReplacer = (e14, t12) => "bigint" == typeof t12 ? t12.toString() : t12, (n4 || (n4 = {})).mergeShapes = (e14, t12) => ({ ...e14, ...t12 }); - var s4 = e5.arrayToEnum(["string", "nan", "number", "integer", "float", "boolean", "date", "bigint", "symbol", "function", "undefined", "null", "array", "object", "unknown", "promise", "void", "never", "map", "set"]); - var o3 = (e14) => { - switch (typeof e14) { - case "undefined": - return s4.undefined; - case "string": - return s4.string; - case "number": - return Number.isNaN(e14) ? s4.nan : s4.number; - case "boolean": - return s4.boolean; - case "function": - return s4.function; - case "bigint": - return s4.bigint; - case "symbol": - return s4.symbol; - case "object": - return Array.isArray(e14) ? s4.array : null === e14 ? s4.null : e14.then && "function" == typeof e14.then && e14.catch && "function" == typeof e14.catch ? s4.promise : "undefined" != typeof Map && e14 instanceof Map ? s4.map : "undefined" != typeof Set && e14 instanceof Set ? s4.set : "undefined" != typeof Date && e14 instanceof Date ? s4.date : s4.object; - default: - return s4.unknown; - } - }; - var c2 = e5.arrayToEnum(["invalid_type", "invalid_literal", "custom", "invalid_union", "invalid_union_discriminator", "invalid_enum_value", "unrecognized_keys", "invalid_arguments", "invalid_return_type", "invalid_date", "invalid_string", "too_small", "too_big", "invalid_intersection_types", "not_multiple_of", "not_finite"]); - var d = (e14) => JSON.stringify(e14, null, 2).replace(/"([^"]+)":/g, "$1:"); - var u2 = class t5 extends Error { - get errors() { - return this.issues; - } - constructor(e14) { - super(), this.issues = [], this.addIssue = (e15) => { - this.issues = [...this.issues, e15]; - }, this.addIssues = (e15 = []) => { - this.issues = [...this.issues, ...e15]; - }; - const t12 = new.target.prototype; - Object.setPrototypeOf ? Object.setPrototypeOf(this, t12) : this.__proto__ = t12, this.name = "ZodError", this.issues = e14; - } - format(e14) { - const t12 = e14 || function(e15) { - return e15.message; - }, n5 = { _errors: [] }, a5 = (e15) => { - for (const r3 of e15.issues) - if ("invalid_union" === r3.code) - r3.unionErrors.map(a5); - else if ("invalid_return_type" === r3.code) - a5(r3.returnTypeError); - else if ("invalid_arguments" === r3.code) - a5(r3.argumentsError); - else if (0 === r3.path.length) - n5._errors.push(t12(r3)); - else { - let e16 = n5, a6 = 0; - for (; a6 < r3.path.length; ) { - const n6 = r3.path[a6]; - a6 === r3.path.length - 1 ? (e16[n6] = e16[n6] || { _errors: [] }, e16[n6]._errors.push(t12(r3))) : e16[n6] = e16[n6] || { _errors: [] }, e16 = e16[n6], a6++; - } - } - }; - return a5(this), n5; - } - static assert(e14) { - if (!(e14 instanceof t5)) - throw new Error(`Not a ZodError: ${e14}`); - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, e5.jsonStringifyReplacer, 2); - } - get isEmpty() { - return 0 === this.issues.length; - } - flatten(e14 = (e15) => e15.message) { - const t12 = {}, n5 = []; - for (const a5 of this.issues) - if (a5.path.length > 0) { - const n6 = a5.path[0]; - t12[n6] = t12[n6] || [], t12[n6].push(e14(a5)); - } else - n5.push(e14(a5)); - return { formErrors: n5, fieldErrors: t12 }; - } - get formErrors() { - return this.flatten(); - } - }; - u2.create = (e14) => new u2(e14); - var l2 = (t12, n5) => { - let a5; - switch (t12.code) { - case c2.invalid_type: - a5 = t12.received === s4.undefined ? "Required" : `Expected ${t12.expected}, received ${t12.received}`; - break; - case c2.invalid_literal: - a5 = `Invalid literal value, expected ${JSON.stringify(t12.expected, e5.jsonStringifyReplacer)}`; - break; - case c2.unrecognized_keys: - a5 = `Unrecognized key(s) in object: ${e5.joinValues(t12.keys, ", ")}`; - break; - case c2.invalid_union: - a5 = "Invalid input"; - break; - case c2.invalid_union_discriminator: - a5 = `Invalid discriminator value. Expected ${e5.joinValues(t12.options)}`; - break; - case c2.invalid_enum_value: - a5 = `Invalid enum value. Expected ${e5.joinValues(t12.options)}, received '${t12.received}'`; - break; - case c2.invalid_arguments: - a5 = "Invalid function arguments"; - break; - case c2.invalid_return_type: - a5 = "Invalid function return type"; - break; - case c2.invalid_date: - a5 = "Invalid date"; - break; - case c2.invalid_string: - "object" == typeof t12.validation ? "includes" in t12.validation ? (a5 = `Invalid input: must include "${t12.validation.includes}"`, "number" == typeof t12.validation.position && (a5 = `${a5} at one or more positions greater than or equal to ${t12.validation.position}`)) : "startsWith" in t12.validation ? a5 = `Invalid input: must start with "${t12.validation.startsWith}"` : "endsWith" in t12.validation ? a5 = `Invalid input: must end with "${t12.validation.endsWith}"` : e5.assertNever(t12.validation) : a5 = "regex" !== t12.validation ? `Invalid ${t12.validation}` : "Invalid"; - break; - case c2.too_small: - a5 = "array" === t12.type ? `Array must contain ${t12.exact ? "exactly" : t12.inclusive ? "at least" : "more than"} ${t12.minimum} element(s)` : "string" === t12.type ? `String must contain ${t12.exact ? "exactly" : t12.inclusive ? "at least" : "over"} ${t12.minimum} character(s)` : "number" === t12.type || "bigint" === t12.type ? `Number must be ${t12.exact ? "exactly equal to " : t12.inclusive ? "greater than or equal to " : "greater than "}${t12.minimum}` : "date" === t12.type ? `Date must be ${t12.exact ? "exactly equal to " : t12.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t12.minimum))}` : "Invalid input"; - break; - case c2.too_big: - a5 = "array" === t12.type ? `Array must contain ${t12.exact ? "exactly" : t12.inclusive ? "at most" : "less than"} ${t12.maximum} element(s)` : "string" === t12.type ? `String must contain ${t12.exact ? "exactly" : t12.inclusive ? "at most" : "under"} ${t12.maximum} character(s)` : "number" === t12.type ? `Number must be ${t12.exact ? "exactly" : t12.inclusive ? "less than or equal to" : "less than"} ${t12.maximum}` : "bigint" === t12.type ? `BigInt must be ${t12.exact ? "exactly" : t12.inclusive ? "less than or equal to" : "less than"} ${t12.maximum}` : "date" === t12.type ? `Date must be ${t12.exact ? "exactly" : t12.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t12.maximum))}` : "Invalid input"; - break; - case c2.custom: - a5 = "Invalid input"; - break; - case c2.invalid_intersection_types: - a5 = "Intersection results could not be merged"; - break; - case c2.not_multiple_of: - a5 = `Number must be a multiple of ${t12.multipleOf}`; - break; - case c2.not_finite: - a5 = "Number must be finite"; - break; - default: - a5 = n5.defaultError, e5.assertNever(t12); - } - return { message: a5 }; - }; - var p = l2; - function m(e14) { - p = e14; - } - function h3() { - return p; - } - var f = (e14) => { - const { data: t12, path: n5, errorMaps: a5, issueData: r3 } = e14, i4 = [...n5, ...r3.path || []], s5 = { ...r3, path: i4 }; - if (void 0 !== r3.message) - return { ...r3, path: i4, message: r3.message }; - let o4 = ""; - const c3 = a5.filter((e15) => !!e15).slice().reverse(); - for (const e15 of c3) - o4 = e15(s5, { data: t12, defaultError: o4 }).message; - return { ...r3, path: i4, message: o4 }; - }; - var g2 = []; - function y3(e14, t12) { - const n5 = h3(), a5 = f({ issueData: t12, data: e14.data, path: e14.path, errorMaps: [e14.common.contextualErrorMap, e14.schemaErrorMap, n5, n5 === l2 ? void 0 : l2].filter((e15) => !!e15) }); - e14.common.issues.push(a5); - } - var v3; - var b; - var _3 = class e6 { - constructor() { - this.value = "valid"; - } - dirty() { - "valid" === this.value && (this.value = "dirty"); - } - abort() { - "aborted" !== this.value && (this.value = "aborted"); - } - static mergeArray(e14, t12) { - const n5 = []; - for (const a5 of t12) { - if ("aborted" === a5.status) - return S3; - "dirty" === a5.status && e14.dirty(), n5.push(a5.value); - } - return { status: e14.value, value: n5 }; - } - static async mergeObjectAsync(t12, n5) { - const a5 = []; - for (const e14 of n5) { - const t13 = await e14.key, n6 = await e14.value; - a5.push({ key: t13, value: n6 }); - } - return e6.mergeObjectSync(t12, a5); - } - static mergeObjectSync(e14, t12) { - const n5 = {}; - for (const a5 of t12) { - const { key: t13, value: r3 } = a5; - if ("aborted" === t13.status) - return S3; - if ("aborted" === r3.status) - return S3; - "dirty" === t13.status && e14.dirty(), "dirty" === r3.status && e14.dirty(), "__proto__" === t13.value || void 0 === r3.value && !a5.alwaysSet || (n5[t13.value] = r3.value); - } - return { status: e14.value, value: n5 }; - } - }; - var S3 = Object.freeze({ status: "aborted" }); - var k2 = (e14) => ({ status: "dirty", value: e14 }); - var x2 = (e14) => ({ status: "valid", value: e14 }); - var w3 = (e14) => "aborted" === e14.status; - var Z2 = (e14) => "dirty" === e14.status; - var j2 = (e14) => "valid" === e14.status; - var P2 = (e14) => "undefined" != typeof Promise && e14 instanceof Promise; - (b = v3 || (v3 = {})).errToObj = (e14) => "string" == typeof e14 ? { message: e14 } : e14 || {}, b.toString = (e14) => "string" == typeof e14 ? e14 : null == e14 ? void 0 : e14.message; - var T3 = class { - constructor(e14, t12, n5, a5) { - this._cachedPath = [], this.parent = e14, this.data = t12, this._path = n5, this._key = a5; - } - get path() { - return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; - } - }; - var A3 = (e14, t12) => { - if (j2(t12)) - return { success: true, data: t12.value }; - if (!e14.common.issues.length) - throw new Error("Validation failed but no issues detected."); - return { success: false, get error() { - if (this._error) - return this._error; - const t13 = new u2(e14.common.issues); - return this._error = t13, this._error; - } }; - }; - function O3(e14) { - if (!e14) - return {}; - const { errorMap: t12, invalid_type_error: n5, required_error: a5, description: r3 } = e14; - if (t12 && (n5 || a5)) - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - if (t12) - return { errorMap: t12, description: r3 }; - return { errorMap: (t13, r4) => { - var i4, s5; - const { message: o4 } = e14; - return "invalid_enum_value" === t13.code ? { message: null != o4 ? o4 : r4.defaultError } : void 0 === r4.data ? { message: null != (i4 = null != o4 ? o4 : a5) ? i4 : r4.defaultError } : "invalid_type" !== t13.code ? { message: r4.defaultError } : { message: null != (s5 = null != o4 ? o4 : n5) ? s5 : r4.defaultError }; - }, description: r3 }; - } - var C3; - var E2 = class { - get description() { - return this._def.description; - } - _getType(e14) { - return o3(e14.data); - } - _getOrReturnCtx(e14, t12) { - return t12 || { common: e14.parent.common, data: e14.data, parsedType: o3(e14.data), schemaErrorMap: this._def.errorMap, path: e14.path, parent: e14.parent }; - } - _processInputParams(e14) { - return { status: new _3(), ctx: { common: e14.parent.common, data: e14.data, parsedType: o3(e14.data), schemaErrorMap: this._def.errorMap, path: e14.path, parent: e14.parent } }; - } - _parseSync(e14) { - const t12 = this._parse(e14); - if (P2(t12)) - throw new Error("Synchronous parse encountered promise."); - return t12; - } - _parseAsync(e14) { - const t12 = this._parse(e14); - return Promise.resolve(t12); - } - parse(e14, t12) { - const n5 = this.safeParse(e14, t12); - if (n5.success) - return n5.data; - throw n5.error; - } - safeParse(e14, t12) { - var n5; - const a5 = { common: { issues: [], async: null != (n5 = null == t12 ? void 0 : t12.async) && n5, contextualErrorMap: null == t12 ? void 0 : t12.errorMap }, path: (null == t12 ? void 0 : t12.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }, r3 = this._parseSync({ data: e14, path: a5.path, parent: a5 }); - return A3(a5, r3); - } - "~validate"(e14) { - var t12, n5; - const a5 = { common: { issues: [], async: !!this["~standard"].async }, path: [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }; - if (!this["~standard"].async) - try { - const t13 = this._parseSync({ data: e14, path: [], parent: a5 }); - return j2(t13) ? { value: t13.value } : { issues: a5.common.issues }; - } catch (e15) { - (null == (n5 = null == (t12 = null == e15 ? void 0 : e15.message) ? void 0 : t12.toLowerCase()) ? void 0 : n5.includes("encountered")) && (this["~standard"].async = true), a5.common = { issues: [], async: true }; - } - return this._parseAsync({ data: e14, path: [], parent: a5 }).then((e15) => j2(e15) ? { value: e15.value } : { issues: a5.common.issues }); - } - async parseAsync(e14, t12) { - const n5 = await this.safeParseAsync(e14, t12); - if (n5.success) - return n5.data; - throw n5.error; - } - async safeParseAsync(e14, t12) { - const n5 = { common: { issues: [], contextualErrorMap: null == t12 ? void 0 : t12.errorMap, async: true }, path: (null == t12 ? void 0 : t12.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }, a5 = this._parse({ data: e14, path: n5.path, parent: n5 }), r3 = await (P2(a5) ? a5 : Promise.resolve(a5)); - return A3(n5, r3); - } - refine(e14, t12) { - const n5 = (e15) => "string" == typeof t12 || void 0 === t12 ? { message: t12 } : "function" == typeof t12 ? t12(e15) : t12; - return this._refinement((t13, a5) => { - const r3 = e14(t13), i4 = () => a5.addIssue({ code: c2.custom, ...n5(t13) }); - return "undefined" != typeof Promise && r3 instanceof Promise ? r3.then((e15) => !!e15 || (i4(), false)) : !!r3 || (i4(), false); - }); - } - refinement(e14, t12) { - return this._refinement((n5, a5) => !!e14(n5) || (a5.addIssue("function" == typeof t12 ? t12(n5, a5) : t12), false)); - } - _refinement(e14) { - return new Ne2({ schema: this, typeName: Be2.ZodEffects, effect: { type: "refinement", refinement: e14 } }); - } - superRefine(e14) { - return this._refinement(e14); - } - constructor(e14) { - this.spa = this.safeParseAsync, this._def = e14, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = { version: 1, vendor: "zod", validate: (e15) => this["~validate"](e15) }; - } - optional() { - return $e2.create(this, this._def); - } - nullable() { - return Ie.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return he2.create(this); - } - promise() { - return Ee2.create(this, this._def); - } - or(e14) { - return ye2.create([this, e14], this._def); - } - and(e14) { - return Se2.create(this, e14, this._def); - } - transform(e14) { - return new Ne2({ ...O3(this._def), schema: this, typeName: Be2.ZodEffects, effect: { type: "transform", transform: e14 } }); - } - default(e14) { - const t12 = "function" == typeof e14 ? e14 : () => e14; - return new Re2({ ...O3(this._def), innerType: this, defaultValue: t12, typeName: Be2.ZodDefault }); - } - brand() { - return new Le2({ typeName: Be2.ZodBranded, type: this, ...O3(this._def) }); - } - catch(e14) { - const t12 = "function" == typeof e14 ? e14 : () => e14; - return new Me2({ ...O3(this._def), innerType: this, catchValue: t12, typeName: Be2.ZodCatch }); - } - describe(e14) { - return new (0, this.constructor)({ ...this._def, description: e14 }); - } - pipe(e14) { - return Fe2.create(this, e14); - } - readonly() { - return Ue2.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - var N2 = /^c[^\s-]{8,}$/i; - var $2 = /^[0-9a-z]+$/; - var I2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - var R2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; - var M2 = /^[a-z0-9_-]{21}$/i; - var z = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - var D = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; - var L2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - var F3 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - var U2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var J3 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; - var V2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var B3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var q3 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var W2 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))"; - var K2 = new RegExp(`^${W2}$`); - function H2(e14) { - let t12 = "[0-5]\\d"; - e14.precision ? t12 = `${t12}\\.\\d{${e14.precision}}` : null == e14.precision && (t12 = `${t12}(\\.\\d+)?`); - return `([01]\\d|2[0-3]):[0-5]\\d(:${t12})${e14.precision ? "+" : "?"}`; - } - function G2(e14) { - return new RegExp(`^${H2(e14)}$`); - } - function Y(e14) { - let t12 = `${W2}T${H2(e14)}`; - const n5 = []; - return n5.push(e14.local ? "Z?" : "Z"), e14.offset && n5.push("([+-]\\d{2}:?\\d{2})"), t12 = `${t12}(${n5.join("|")})`, new RegExp(`^${t12}$`); - } - function Q2(e14, t12) { - return !("v4" !== t12 && t12 || !F3.test(e14)) || !("v6" !== t12 && t12 || !J3.test(e14)); - } - function X(e14, t12) { - if (!z.test(e14)) - return false; - try { - const [n5] = e14.split("."); - if (!n5) - return false; - const a5 = n5.replace(/-/g, "+").replace(/_/g, "/").padEnd(n5.length + (4 - n5.length % 4) % 4, "="), r3 = JSON.parse(atob(a5)); - return "object" == typeof r3 && null !== r3 && ((!("typ" in r3) || "JWT" === (null == r3 ? void 0 : r3.typ)) && (!!r3.alg && (!t12 || r3.alg === t12))); - } catch (e15) { - return false; - } - } - function ee2(e14, t12) { - return !("v4" !== t12 && t12 || !U2.test(e14)) || !("v6" !== t12 && t12 || !V2.test(e14)); - } - var te2 = class t6 extends E2 { - _parse(t12) { - this._def.coerce && (t12.data = String(t12.data)); - if (this._getType(t12) !== s4.string) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.string, received: e14.parsedType }), S3; - } - const n5 = new _3(); - let a5; - for (const r3 of this._def.checks) - if ("min" === r3.kind) - t12.data.length < r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_small, minimum: r3.value, type: "string", inclusive: true, exact: false, message: r3.message }), n5.dirty()); - else if ("max" === r3.kind) - t12.data.length > r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_big, maximum: r3.value, type: "string", inclusive: true, exact: false, message: r3.message }), n5.dirty()); - else if ("length" === r3.kind) { - const e14 = t12.data.length > r3.value, i4 = t12.data.length < r3.value; - (e14 || i4) && (a5 = this._getOrReturnCtx(t12, a5), e14 ? y3(a5, { code: c2.too_big, maximum: r3.value, type: "string", inclusive: true, exact: true, message: r3.message }) : i4 && y3(a5, { code: c2.too_small, minimum: r3.value, type: "string", inclusive: true, exact: true, message: r3.message }), n5.dirty()); - } else if ("email" === r3.kind) - L2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "email", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("emoji" === r3.kind) - C3 || (C3 = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), C3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "emoji", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("uuid" === r3.kind) - R2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "uuid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("nanoid" === r3.kind) - M2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "nanoid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("cuid" === r3.kind) - N2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cuid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("cuid2" === r3.kind) - $2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cuid2", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("ulid" === r3.kind) - I2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "ulid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("url" === r3.kind) - try { - new URL(t12.data); - } catch (e14) { - a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "url", code: c2.invalid_string, message: r3.message }), n5.dirty(); - } - else if ("regex" === r3.kind) { - r3.regex.lastIndex = 0; - r3.regex.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "regex", code: c2.invalid_string, message: r3.message }), n5.dirty()); - } else if ("trim" === r3.kind) - t12.data = t12.data.trim(); - else if ("includes" === r3.kind) - t12.data.includes(r3.value, r3.position) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { includes: r3.value, position: r3.position }, message: r3.message }), n5.dirty()); - else if ("toLowerCase" === r3.kind) - t12.data = t12.data.toLowerCase(); - else if ("toUpperCase" === r3.kind) - t12.data = t12.data.toUpperCase(); - else if ("startsWith" === r3.kind) - t12.data.startsWith(r3.value) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { startsWith: r3.value }, message: r3.message }), n5.dirty()); - else if ("endsWith" === r3.kind) - t12.data.endsWith(r3.value) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { endsWith: r3.value }, message: r3.message }), n5.dirty()); - else if ("datetime" === r3.kind) { - Y(r3).test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "datetime", message: r3.message }), n5.dirty()); - } else if ("date" === r3.kind) { - K2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "date", message: r3.message }), n5.dirty()); - } else if ("time" === r3.kind) { - G2(r3).test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "time", message: r3.message }), n5.dirty()); - } else - "duration" === r3.kind ? D.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "duration", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "ip" === r3.kind ? Q2(t12.data, r3.version) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "ip", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "jwt" === r3.kind ? X(t12.data, r3.alg) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "jwt", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "cidr" === r3.kind ? ee2(t12.data, r3.version) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cidr", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "base64" === r3.kind ? B3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "base64", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "base64url" === r3.kind ? q3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "base64url", code: c2.invalid_string, message: r3.message }), n5.dirty()) : e5.assertNever(r3); - return { status: n5.value, value: t12.data }; - } - _regex(e14, t12, n5) { - return this.refinement((t13) => e14.test(t13), { validation: t12, code: c2.invalid_string, ...v3.errToObj(n5) }); - } - _addCheck(e14) { - return new t6({ ...this._def, checks: [...this._def.checks, e14] }); - } - email(e14) { - return this._addCheck({ kind: "email", ...v3.errToObj(e14) }); - } - url(e14) { - return this._addCheck({ kind: "url", ...v3.errToObj(e14) }); - } - emoji(e14) { - return this._addCheck({ kind: "emoji", ...v3.errToObj(e14) }); - } - uuid(e14) { - return this._addCheck({ kind: "uuid", ...v3.errToObj(e14) }); - } - nanoid(e14) { - return this._addCheck({ kind: "nanoid", ...v3.errToObj(e14) }); - } - cuid(e14) { - return this._addCheck({ kind: "cuid", ...v3.errToObj(e14) }); - } - cuid2(e14) { - return this._addCheck({ kind: "cuid2", ...v3.errToObj(e14) }); - } - ulid(e14) { - return this._addCheck({ kind: "ulid", ...v3.errToObj(e14) }); - } - base64(e14) { - return this._addCheck({ kind: "base64", ...v3.errToObj(e14) }); - } - base64url(e14) { - return this._addCheck({ kind: "base64url", ...v3.errToObj(e14) }); - } - jwt(e14) { - return this._addCheck({ kind: "jwt", ...v3.errToObj(e14) }); - } - ip(e14) { - return this._addCheck({ kind: "ip", ...v3.errToObj(e14) }); - } - cidr(e14) { - return this._addCheck({ kind: "cidr", ...v3.errToObj(e14) }); - } - datetime(e14) { - var t12, n5; - return "string" == typeof e14 ? this._addCheck({ kind: "datetime", precision: null, offset: false, local: false, message: e14 }) : this._addCheck({ kind: "datetime", precision: void 0 === (null == e14 ? void 0 : e14.precision) ? null : null == e14 ? void 0 : e14.precision, offset: null != (t12 = null == e14 ? void 0 : e14.offset) && t12, local: null != (n5 = null == e14 ? void 0 : e14.local) && n5, ...v3.errToObj(null == e14 ? void 0 : e14.message) }); - } - date(e14) { - return this._addCheck({ kind: "date", message: e14 }); - } - time(e14) { - return "string" == typeof e14 ? this._addCheck({ kind: "time", precision: null, message: e14 }) : this._addCheck({ kind: "time", precision: void 0 === (null == e14 ? void 0 : e14.precision) ? null : null == e14 ? void 0 : e14.precision, ...v3.errToObj(null == e14 ? void 0 : e14.message) }); - } - duration(e14) { - return this._addCheck({ kind: "duration", ...v3.errToObj(e14) }); - } - regex(e14, t12) { - return this._addCheck({ kind: "regex", regex: e14, ...v3.errToObj(t12) }); - } - includes(e14, t12) { - return this._addCheck({ kind: "includes", value: e14, position: null == t12 ? void 0 : t12.position, ...v3.errToObj(null == t12 ? void 0 : t12.message) }); - } - startsWith(e14, t12) { - return this._addCheck({ kind: "startsWith", value: e14, ...v3.errToObj(t12) }); - } - endsWith(e14, t12) { - return this._addCheck({ kind: "endsWith", value: e14, ...v3.errToObj(t12) }); - } - min(e14, t12) { - return this._addCheck({ kind: "min", value: e14, ...v3.errToObj(t12) }); - } - max(e14, t12) { - return this._addCheck({ kind: "max", value: e14, ...v3.errToObj(t12) }); - } - length(e14, t12) { - return this._addCheck({ kind: "length", value: e14, ...v3.errToObj(t12) }); - } - nonempty(e14) { - return this.min(1, v3.errToObj(e14)); - } - trim() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "trim" }] }); - } - toLowerCase() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "toLowerCase" }] }); - } - toUpperCase() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "toUpperCase" }] }); - } - get isDatetime() { - return !!this._def.checks.find((e14) => "datetime" === e14.kind); - } - get isDate() { - return !!this._def.checks.find((e14) => "date" === e14.kind); - } - get isTime() { - return !!this._def.checks.find((e14) => "time" === e14.kind); - } - get isDuration() { - return !!this._def.checks.find((e14) => "duration" === e14.kind); - } - get isEmail() { - return !!this._def.checks.find((e14) => "email" === e14.kind); - } - get isURL() { - return !!this._def.checks.find((e14) => "url" === e14.kind); - } - get isEmoji() { - return !!this._def.checks.find((e14) => "emoji" === e14.kind); - } - get isUUID() { - return !!this._def.checks.find((e14) => "uuid" === e14.kind); - } - get isNANOID() { - return !!this._def.checks.find((e14) => "nanoid" === e14.kind); - } - get isCUID() { - return !!this._def.checks.find((e14) => "cuid" === e14.kind); - } - get isCUID2() { - return !!this._def.checks.find((e14) => "cuid2" === e14.kind); - } - get isULID() { - return !!this._def.checks.find((e14) => "ulid" === e14.kind); - } - get isIP() { - return !!this._def.checks.find((e14) => "ip" === e14.kind); - } - get isCIDR() { - return !!this._def.checks.find((e14) => "cidr" === e14.kind); - } - get isBase64() { - return !!this._def.checks.find((e14) => "base64" === e14.kind); - } - get isBase64url() { - return !!this._def.checks.find((e14) => "base64url" === e14.kind); - } - get minLength() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxLength() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - }; - function ne2(e14, t12) { - const n5 = (e14.toString().split(".")[1] || "").length, a5 = (t12.toString().split(".")[1] || "").length, r3 = n5 > a5 ? n5 : a5; - return Number.parseInt(e14.toFixed(r3).replace(".", "")) % Number.parseInt(t12.toFixed(r3).replace(".", "")) / 10 ** r3; - } - te2.create = (e14) => { - var t12; - return new te2({ checks: [], typeName: Be2.ZodString, coerce: null != (t12 = null == e14 ? void 0 : e14.coerce) && t12, ...O3(e14) }); - }; - var ae = class t7 extends E2 { - constructor() { - super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; - } - _parse(t12) { - this._def.coerce && (t12.data = Number(t12.data)); - if (this._getType(t12) !== s4.number) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.number, received: e14.parsedType }), S3; - } - let n5; - const a5 = new _3(); - for (const r3 of this._def.checks) - if ("int" === r3.kind) - e5.isInteger(t12.data) || (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.invalid_type, expected: "integer", received: "float", message: r3.message }), a5.dirty()); - else if ("min" === r3.kind) { - (r3.inclusive ? t12.data < r3.value : t12.data <= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_small, minimum: r3.value, type: "number", inclusive: r3.inclusive, exact: false, message: r3.message }), a5.dirty()); - } else if ("max" === r3.kind) { - (r3.inclusive ? t12.data > r3.value : t12.data >= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_big, maximum: r3.value, type: "number", inclusive: r3.inclusive, exact: false, message: r3.message }), a5.dirty()); - } else - "multipleOf" === r3.kind ? 0 !== ne2(t12.data, r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_multiple_of, multipleOf: r3.value, message: r3.message }), a5.dirty()) : "finite" === r3.kind ? Number.isFinite(t12.data) || (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_finite, message: r3.message }), a5.dirty()) : e5.assertNever(r3); - return { status: a5.value, value: t12.data }; - } - gte(e14, t12) { - return this.setLimit("min", e14, true, v3.toString(t12)); - } - gt(e14, t12) { - return this.setLimit("min", e14, false, v3.toString(t12)); - } - lte(e14, t12) { - return this.setLimit("max", e14, true, v3.toString(t12)); - } - lt(e14, t12) { - return this.setLimit("max", e14, false, v3.toString(t12)); - } - setLimit(e14, n5, a5, r3) { - return new t7({ ...this._def, checks: [...this._def.checks, { kind: e14, value: n5, inclusive: a5, message: v3.toString(r3) }] }); - } - _addCheck(e14) { - return new t7({ ...this._def, checks: [...this._def.checks, e14] }); - } - int(e14) { - return this._addCheck({ kind: "int", message: v3.toString(e14) }); - } - positive(e14) { - return this._addCheck({ kind: "min", value: 0, inclusive: false, message: v3.toString(e14) }); - } - negative(e14) { - return this._addCheck({ kind: "max", value: 0, inclusive: false, message: v3.toString(e14) }); - } - nonpositive(e14) { - return this._addCheck({ kind: "max", value: 0, inclusive: true, message: v3.toString(e14) }); - } - nonnegative(e14) { - return this._addCheck({ kind: "min", value: 0, inclusive: true, message: v3.toString(e14) }); - } - multipleOf(e14, t12) { - return this._addCheck({ kind: "multipleOf", value: e14, message: v3.toString(t12) }); - } - finite(e14) { - return this._addCheck({ kind: "finite", message: v3.toString(e14) }); - } - safe(e14) { - return this._addCheck({ kind: "min", inclusive: true, value: Number.MIN_SAFE_INTEGER, message: v3.toString(e14) })._addCheck({ kind: "max", inclusive: true, value: Number.MAX_SAFE_INTEGER, message: v3.toString(e14) }); - } - get minValue() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxValue() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - get isInt() { - return !!this._def.checks.find((t12) => "int" === t12.kind || "multipleOf" === t12.kind && e5.isInteger(t12.value)); - } - get isFinite() { - let e14 = null, t12 = null; - for (const n5 of this._def.checks) { - if ("finite" === n5.kind || "int" === n5.kind || "multipleOf" === n5.kind) - return true; - "min" === n5.kind ? (null === t12 || n5.value > t12) && (t12 = n5.value) : "max" === n5.kind && (null === e14 || n5.value < e14) && (e14 = n5.value); - } - return Number.isFinite(t12) && Number.isFinite(e14); - } - }; - ae.create = (e14) => new ae({ checks: [], typeName: Be2.ZodNumber, coerce: (null == e14 ? void 0 : e14.coerce) || false, ...O3(e14) }); - var re2 = class t8 extends E2 { - constructor() { - super(...arguments), this.min = this.gte, this.max = this.lte; - } - _parse(t12) { - if (this._def.coerce) - try { - t12.data = BigInt(t12.data); - } catch (e14) { - return this._getInvalidInput(t12); - } - if (this._getType(t12) !== s4.bigint) - return this._getInvalidInput(t12); - let n5; - const a5 = new _3(); - for (const r3 of this._def.checks) - if ("min" === r3.kind) { - (r3.inclusive ? t12.data < r3.value : t12.data <= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_small, type: "bigint", minimum: r3.value, inclusive: r3.inclusive, message: r3.message }), a5.dirty()); - } else if ("max" === r3.kind) { - (r3.inclusive ? t12.data > r3.value : t12.data >= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_big, type: "bigint", maximum: r3.value, inclusive: r3.inclusive, message: r3.message }), a5.dirty()); - } else - "multipleOf" === r3.kind ? t12.data % r3.value !== BigInt(0) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_multiple_of, multipleOf: r3.value, message: r3.message }), a5.dirty()) : e5.assertNever(r3); - return { status: a5.value, value: t12.data }; - } - _getInvalidInput(e14) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.bigint, received: t12.parsedType }), S3; - } - gte(e14, t12) { - return this.setLimit("min", e14, true, v3.toString(t12)); - } - gt(e14, t12) { - return this.setLimit("min", e14, false, v3.toString(t12)); - } - lte(e14, t12) { - return this.setLimit("max", e14, true, v3.toString(t12)); - } - lt(e14, t12) { - return this.setLimit("max", e14, false, v3.toString(t12)); - } - setLimit(e14, n5, a5, r3) { - return new t8({ ...this._def, checks: [...this._def.checks, { kind: e14, value: n5, inclusive: a5, message: v3.toString(r3) }] }); - } - _addCheck(e14) { - return new t8({ ...this._def, checks: [...this._def.checks, e14] }); - } - positive(e14) { - return this._addCheck({ kind: "min", value: BigInt(0), inclusive: false, message: v3.toString(e14) }); - } - negative(e14) { - return this._addCheck({ kind: "max", value: BigInt(0), inclusive: false, message: v3.toString(e14) }); - } - nonpositive(e14) { - return this._addCheck({ kind: "max", value: BigInt(0), inclusive: true, message: v3.toString(e14) }); - } - nonnegative(e14) { - return this._addCheck({ kind: "min", value: BigInt(0), inclusive: true, message: v3.toString(e14) }); - } - multipleOf(e14, t12) { - return this._addCheck({ kind: "multipleOf", value: e14, message: v3.toString(t12) }); - } - get minValue() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxValue() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - }; - re2.create = (e14) => { - var t12; - return new re2({ checks: [], typeName: Be2.ZodBigInt, coerce: null != (t12 = null == e14 ? void 0 : e14.coerce) && t12, ...O3(e14) }); - }; - var ie2 = class extends E2 { - _parse(e14) { - this._def.coerce && (e14.data = Boolean(e14.data)); - if (this._getType(e14) !== s4.boolean) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.boolean, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - ie2.create = (e14) => new ie2({ typeName: Be2.ZodBoolean, coerce: (null == e14 ? void 0 : e14.coerce) || false, ...O3(e14) }); - var se = class t9 extends E2 { - _parse(t12) { - this._def.coerce && (t12.data = new Date(t12.data)); - if (this._getType(t12) !== s4.date) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.date, received: e14.parsedType }), S3; - } - if (Number.isNaN(t12.data.getTime())) { - return y3(this._getOrReturnCtx(t12), { code: c2.invalid_date }), S3; - } - const n5 = new _3(); - let a5; - for (const r3 of this._def.checks) - "min" === r3.kind ? t12.data.getTime() < r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_small, message: r3.message, inclusive: true, exact: false, minimum: r3.value, type: "date" }), n5.dirty()) : "max" === r3.kind ? t12.data.getTime() > r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_big, message: r3.message, inclusive: true, exact: false, maximum: r3.value, type: "date" }), n5.dirty()) : e5.assertNever(r3); - return { status: n5.value, value: new Date(t12.data.getTime()) }; - } - _addCheck(e14) { - return new t9({ ...this._def, checks: [...this._def.checks, e14] }); - } - min(e14, t12) { - return this._addCheck({ kind: "min", value: e14.getTime(), message: v3.toString(t12) }); - } - max(e14, t12) { - return this._addCheck({ kind: "max", value: e14.getTime(), message: v3.toString(t12) }); - } - get minDate() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return null != e14 ? new Date(e14) : null; - } - get maxDate() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return null != e14 ? new Date(e14) : null; - } - }; - se.create = (e14) => new se({ checks: [], coerce: (null == e14 ? void 0 : e14.coerce) || false, typeName: Be2.ZodDate, ...O3(e14) }); - var oe2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.symbol) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.symbol, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - oe2.create = (e14) => new oe2({ typeName: Be2.ZodSymbol, ...O3(e14) }); - var ce2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.undefined) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.undefined, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - ce2.create = (e14) => new ce2({ typeName: Be2.ZodUndefined, ...O3(e14) }); - var de2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.null) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.null, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - de2.create = (e14) => new de2({ typeName: Be2.ZodNull, ...O3(e14) }); - var ue2 = class extends E2 { - constructor() { - super(...arguments), this._any = true; - } - _parse(e14) { - return x2(e14.data); - } - }; - ue2.create = (e14) => new ue2({ typeName: Be2.ZodAny, ...O3(e14) }); - var le2 = class extends E2 { - constructor() { - super(...arguments), this._unknown = true; - } - _parse(e14) { - return x2(e14.data); - } - }; - le2.create = (e14) => new le2({ typeName: Be2.ZodUnknown, ...O3(e14) }); - var pe2 = class extends E2 { - _parse(e14) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.never, received: t12.parsedType }), S3; - } - }; - pe2.create = (e14) => new pe2({ typeName: Be2.ZodNever, ...O3(e14) }); - var me2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.undefined) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.void, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - me2.create = (e14) => new me2({ typeName: Be2.ZodVoid, ...O3(e14) }); - var he2 = class e7 extends E2 { - _parse(e14) { - const { ctx: t12, status: n5 } = this._processInputParams(e14), a5 = this._def; - if (t12.parsedType !== s4.array) - return y3(t12, { code: c2.invalid_type, expected: s4.array, received: t12.parsedType }), S3; - if (null !== a5.exactLength) { - const e15 = t12.data.length > a5.exactLength.value, r4 = t12.data.length < a5.exactLength.value; - (e15 || r4) && (y3(t12, { code: e15 ? c2.too_big : c2.too_small, minimum: r4 ? a5.exactLength.value : void 0, maximum: e15 ? a5.exactLength.value : void 0, type: "array", inclusive: true, exact: true, message: a5.exactLength.message }), n5.dirty()); - } - if (null !== a5.minLength && t12.data.length < a5.minLength.value && (y3(t12, { code: c2.too_small, minimum: a5.minLength.value, type: "array", inclusive: true, exact: false, message: a5.minLength.message }), n5.dirty()), null !== a5.maxLength && t12.data.length > a5.maxLength.value && (y3(t12, { code: c2.too_big, maximum: a5.maxLength.value, type: "array", inclusive: true, exact: false, message: a5.maxLength.message }), n5.dirty()), t12.common.async) - return Promise.all([...t12.data].map((e15, n6) => a5.type._parseAsync(new T3(t12, e15, t12.path, n6)))).then((e15) => _3.mergeArray(n5, e15)); - const r3 = [...t12.data].map((e15, n6) => a5.type._parseSync(new T3(t12, e15, t12.path, n6))); - return _3.mergeArray(n5, r3); - } - get element() { - return this._def.type; - } - min(t12, n5) { - return new e7({ ...this._def, minLength: { value: t12, message: v3.toString(n5) } }); - } - max(t12, n5) { - return new e7({ ...this._def, maxLength: { value: t12, message: v3.toString(n5) } }); - } - length(t12, n5) { - return new e7({ ...this._def, exactLength: { value: t12, message: v3.toString(n5) } }); - } - nonempty(e14) { - return this.min(1, e14); - } - }; - function fe2(e14) { - if (e14 instanceof ge2) { - const t12 = {}; - for (const n5 in e14.shape) { - const a5 = e14.shape[n5]; - t12[n5] = $e2.create(fe2(a5)); - } - return new ge2({ ...e14._def, shape: () => t12 }); - } - return e14 instanceof he2 ? new he2({ ...e14._def, type: fe2(e14.element) }) : e14 instanceof $e2 ? $e2.create(fe2(e14.unwrap())) : e14 instanceof Ie ? Ie.create(fe2(e14.unwrap())) : e14 instanceof ke2 ? ke2.create(e14.items.map((e15) => fe2(e15))) : e14; - } - he2.create = (e14, t12) => new he2({ type: e14, minLength: null, maxLength: null, exactLength: null, typeName: Be2.ZodArray, ...O3(t12) }); - var ge2 = class t10 extends E2 { - constructor() { - super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; - } - _getCached() { - if (null !== this._cached) - return this._cached; - const t12 = this._def.shape(), n5 = e5.objectKeys(t12); - return this._cached = { shape: t12, keys: n5 }, this._cached; - } - _parse(e14) { - if (this._getType(e14) !== s4.object) { - const t13 = this._getOrReturnCtx(e14); - return y3(t13, { code: c2.invalid_type, expected: s4.object, received: t13.parsedType }), S3; - } - const { status: t12, ctx: n5 } = this._processInputParams(e14), { shape: a5, keys: r3 } = this._getCached(), i4 = []; - if (!(this._def.catchall instanceof pe2 && "strip" === this._def.unknownKeys)) - for (const e15 in n5.data) - r3.includes(e15) || i4.push(e15); - const o4 = []; - for (const e15 of r3) { - const t13 = a5[e15], r4 = n5.data[e15]; - o4.push({ key: { status: "valid", value: e15 }, value: t13._parse(new T3(n5, r4, n5.path, e15)), alwaysSet: e15 in n5.data }); - } - if (this._def.catchall instanceof pe2) { - const e15 = this._def.unknownKeys; - if ("passthrough" === e15) - for (const e16 of i4) - o4.push({ key: { status: "valid", value: e16 }, value: { status: "valid", value: n5.data[e16] } }); - else if ("strict" === e15) - i4.length > 0 && (y3(n5, { code: c2.unrecognized_keys, keys: i4 }), t12.dirty()); - else if ("strip" !== e15) - throw new Error("Internal ZodObject error: invalid unknownKeys value."); - } else { - const e15 = this._def.catchall; - for (const t13 of i4) { - const a6 = n5.data[t13]; - o4.push({ key: { status: "valid", value: t13 }, value: e15._parse(new T3(n5, a6, n5.path, t13)), alwaysSet: t13 in n5.data }); - } - } - return n5.common.async ? Promise.resolve().then(async () => { - const e15 = []; - for (const t13 of o4) { - const n6 = await t13.key, a6 = await t13.value; - e15.push({ key: n6, value: a6, alwaysSet: t13.alwaysSet }); - } - return e15; - }).then((e15) => _3.mergeObjectSync(t12, e15)) : _3.mergeObjectSync(t12, o4); - } - get shape() { - return this._def.shape(); - } - strict(e14) { - return v3.errToObj, new t10({ ...this._def, unknownKeys: "strict", ...void 0 !== e14 ? { errorMap: (t12, n5) => { - var a5, r3, i4, s5; - const o4 = null != (i4 = null == (r3 = (a5 = this._def).errorMap) ? void 0 : r3.call(a5, t12, n5).message) ? i4 : n5.defaultError; - return "unrecognized_keys" === t12.code ? { message: null != (s5 = v3.errToObj(e14).message) ? s5 : o4 } : { message: o4 }; - } } : {} }); - } - strip() { - return new t10({ ...this._def, unknownKeys: "strip" }); - } - passthrough() { - return new t10({ ...this._def, unknownKeys: "passthrough" }); - } - extend(e14) { - return new t10({ ...this._def, shape: () => ({ ...this._def.shape(), ...e14 }) }); - } - merge(e14) { - return new t10({ unknownKeys: e14._def.unknownKeys, catchall: e14._def.catchall, shape: () => ({ ...this._def.shape(), ...e14._def.shape() }), typeName: Be2.ZodObject }); - } - setKey(e14, t12) { - return this.augment({ [e14]: t12 }); - } - catchall(e14) { - return new t10({ ...this._def, catchall: e14 }); - } - pick(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(n5)) - n5[t12] && this.shape[t12] && (a5[t12] = this.shape[t12]); - return new t10({ ...this._def, shape: () => a5 }); - } - omit(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) - n5[t12] || (a5[t12] = this.shape[t12]); - return new t10({ ...this._def, shape: () => a5 }); - } - deepPartial() { - return fe2(this); - } - partial(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) { - const e14 = this.shape[t12]; - n5 && !n5[t12] ? a5[t12] = e14 : a5[t12] = e14.optional(); - } - return new t10({ ...this._def, shape: () => a5 }); - } - required(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) - if (n5 && !n5[t12]) - a5[t12] = this.shape[t12]; - else { - let e14 = this.shape[t12]; - for (; e14 instanceof $e2; ) - e14 = e14._def.innerType; - a5[t12] = e14; - } - return new t10({ ...this._def, shape: () => a5 }); - } - keyof() { - return Ae2(e5.objectKeys(this.shape)); - } - }; - ge2.create = (e14, t12) => new ge2({ shape: () => e14, unknownKeys: "strip", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }), ge2.strictCreate = (e14, t12) => new ge2({ shape: () => e14, unknownKeys: "strict", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }), ge2.lazycreate = (e14, t12) => new ge2({ shape: e14, unknownKeys: "strip", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }); - var ye2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = this._def.options; - if (t12.common.async) - return Promise.all(n5.map(async (e15) => { - const n6 = { ...t12, common: { ...t12.common, issues: [] }, parent: null }; - return { result: await e15._parseAsync({ data: t12.data, path: t12.path, parent: n6 }), ctx: n6 }; - })).then(function(e15) { - for (const t13 of e15) - if ("valid" === t13.result.status) - return t13.result; - for (const n7 of e15) - if ("dirty" === n7.result.status) - return t12.common.issues.push(...n7.ctx.common.issues), n7.result; - const n6 = e15.map((e16) => new u2(e16.ctx.common.issues)); - return y3(t12, { code: c2.invalid_union, unionErrors: n6 }), S3; - }); - { - let e15; - const a5 = []; - for (const r4 of n5) { - const n6 = { ...t12, common: { ...t12.common, issues: [] }, parent: null }, i4 = r4._parseSync({ data: t12.data, path: t12.path, parent: n6 }); - if ("valid" === i4.status) - return i4; - "dirty" !== i4.status || e15 || (e15 = { result: i4, ctx: n6 }), n6.common.issues.length && a5.push(n6.common.issues); - } - if (e15) - return t12.common.issues.push(...e15.ctx.common.issues), e15.result; - const r3 = a5.map((e16) => new u2(e16)); - return y3(t12, { code: c2.invalid_union, unionErrors: r3 }), S3; - } - } - get options() { - return this._def.options; - } - }; - ye2.create = (e14, t12) => new ye2({ options: e14, typeName: Be2.ZodUnion, ...O3(t12) }); - var ve2 = (t12) => t12 instanceof Pe2 ? ve2(t12.schema) : t12 instanceof Ne2 ? ve2(t12.innerType()) : t12 instanceof Te2 ? [t12.value] : t12 instanceof Oe ? t12.options : t12 instanceof Ce2 ? e5.objectValues(t12.enum) : t12 instanceof Re2 ? ve2(t12._def.innerType) : t12 instanceof ce2 ? [void 0] : t12 instanceof de2 ? [null] : t12 instanceof $e2 ? [void 0, ...ve2(t12.unwrap())] : t12 instanceof Ie ? [null, ...ve2(t12.unwrap())] : t12 instanceof Le2 || t12 instanceof Ue2 ? ve2(t12.unwrap()) : t12 instanceof Me2 ? ve2(t12._def.innerType) : []; - var be2 = class e8 extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.object) - return y3(t12, { code: c2.invalid_type, expected: s4.object, received: t12.parsedType }), S3; - const n5 = this.discriminator, a5 = t12.data[n5], r3 = this.optionsMap.get(a5); - return r3 ? t12.common.async ? r3._parseAsync({ data: t12.data, path: t12.path, parent: t12 }) : r3._parseSync({ data: t12.data, path: t12.path, parent: t12 }) : (y3(t12, { code: c2.invalid_union_discriminator, options: Array.from(this.optionsMap.keys()), path: [n5] }), S3); - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - static create(t12, n5, a5) { - const r3 = /* @__PURE__ */ new Map(); - for (const e14 of n5) { - const n6 = ve2(e14.shape[t12]); - if (!n6.length) - throw new Error(`A discriminator value for key \`${t12}\` could not be extracted from all schema options`); - for (const a6 of n6) { - if (r3.has(a6)) - throw new Error(`Discriminator property ${String(t12)} has duplicate value ${String(a6)}`); - r3.set(a6, e14); - } - } - return new e8({ typeName: Be2.ZodDiscriminatedUnion, discriminator: t12, options: n5, optionsMap: r3, ...O3(a5) }); - } - }; - function _e2(t12, n5) { - const a5 = o3(t12), r3 = o3(n5); - if (t12 === n5) - return { valid: true, data: t12 }; - if (a5 === s4.object && r3 === s4.object) { - const a6 = e5.objectKeys(n5), r4 = e5.objectKeys(t12).filter((e14) => -1 !== a6.indexOf(e14)), i4 = { ...t12, ...n5 }; - for (const e14 of r4) { - const a7 = _e2(t12[e14], n5[e14]); - if (!a7.valid) - return { valid: false }; - i4[e14] = a7.data; - } - return { valid: true, data: i4 }; - } - if (a5 === s4.array && r3 === s4.array) { - if (t12.length !== n5.length) - return { valid: false }; - const e14 = []; - for (let a6 = 0; a6 < t12.length; a6++) { - const r4 = _e2(t12[a6], n5[a6]); - if (!r4.valid) - return { valid: false }; - e14.push(r4.data); - } - return { valid: true, data: e14 }; - } - return a5 === s4.date && r3 === s4.date && +t12 === +n5 ? { valid: true, data: t12 } : { valid: false }; - } - var Se2 = class extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14), a5 = (e15, a6) => { - if (w3(e15) || w3(a6)) - return S3; - const r3 = _e2(e15.value, a6.value); - return r3.valid ? ((Z2(e15) || Z2(a6)) && t12.dirty(), { status: t12.value, value: r3.data }) : (y3(n5, { code: c2.invalid_intersection_types }), S3); - }; - return n5.common.async ? Promise.all([this._def.left._parseAsync({ data: n5.data, path: n5.path, parent: n5 }), this._def.right._parseAsync({ data: n5.data, path: n5.path, parent: n5 })]).then(([e15, t13]) => a5(e15, t13)) : a5(this._def.left._parseSync({ data: n5.data, path: n5.path, parent: n5 }), this._def.right._parseSync({ data: n5.data, path: n5.path, parent: n5 })); - } - }; - Se2.create = (e14, t12, n5) => new Se2({ left: e14, right: t12, typeName: Be2.ZodIntersection, ...O3(n5) }); - var ke2 = class e9 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.array) - return y3(n5, { code: c2.invalid_type, expected: s4.array, received: n5.parsedType }), S3; - if (n5.data.length < this._def.items.length) - return y3(n5, { code: c2.too_small, minimum: this._def.items.length, inclusive: true, exact: false, type: "array" }), S3; - !this._def.rest && n5.data.length > this._def.items.length && (y3(n5, { code: c2.too_big, maximum: this._def.items.length, inclusive: true, exact: false, type: "array" }), t12.dirty()); - const a5 = [...n5.data].map((e15, t13) => { - const a6 = this._def.items[t13] || this._def.rest; - return a6 ? a6._parse(new T3(n5, e15, n5.path, t13)) : null; - }).filter((e15) => !!e15); - return n5.common.async ? Promise.all(a5).then((e15) => _3.mergeArray(t12, e15)) : _3.mergeArray(t12, a5); - } - get items() { - return this._def.items; - } - rest(t12) { - return new e9({ ...this._def, rest: t12 }); - } - }; - ke2.create = (e14, t12) => { - if (!Array.isArray(e14)) - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - return new ke2({ items: e14, typeName: Be2.ZodTuple, rest: null, ...O3(t12) }); - }; - var xe2 = class e10 extends E2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.object) - return y3(n5, { code: c2.invalid_type, expected: s4.object, received: n5.parsedType }), S3; - const a5 = [], r3 = this._def.keyType, i4 = this._def.valueType; - for (const e15 in n5.data) - a5.push({ key: r3._parse(new T3(n5, e15, n5.path, e15)), value: i4._parse(new T3(n5, n5.data[e15], n5.path, e15)), alwaysSet: e15 in n5.data }); - return n5.common.async ? _3.mergeObjectAsync(t12, a5) : _3.mergeObjectSync(t12, a5); - } - get element() { - return this._def.valueType; - } - static create(t12, n5, a5) { - return new e10(n5 instanceof E2 ? { keyType: t12, valueType: n5, typeName: Be2.ZodRecord, ...O3(a5) } : { keyType: te2.create(), valueType: t12, typeName: Be2.ZodRecord, ...O3(n5) }); - } - }; - var we2 = class extends E2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.map) - return y3(n5, { code: c2.invalid_type, expected: s4.map, received: n5.parsedType }), S3; - const a5 = this._def.keyType, r3 = this._def.valueType, i4 = [...n5.data.entries()].map(([e15, t13], i5) => ({ key: a5._parse(new T3(n5, e15, n5.path, [i5, "key"])), value: r3._parse(new T3(n5, t13, n5.path, [i5, "value"])) })); - if (n5.common.async) { - const e15 = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const n6 of i4) { - const a6 = await n6.key, r4 = await n6.value; - if ("aborted" === a6.status || "aborted" === r4.status) - return S3; - "dirty" !== a6.status && "dirty" !== r4.status || t12.dirty(), e15.set(a6.value, r4.value); - } - return { status: t12.value, value: e15 }; - }); - } - { - const e15 = /* @__PURE__ */ new Map(); - for (const n6 of i4) { - const a6 = n6.key, r4 = n6.value; - if ("aborted" === a6.status || "aborted" === r4.status) - return S3; - "dirty" !== a6.status && "dirty" !== r4.status || t12.dirty(), e15.set(a6.value, r4.value); - } - return { status: t12.value, value: e15 }; - } - } - }; - we2.create = (e14, t12, n5) => new we2({ valueType: t12, keyType: e14, typeName: Be2.ZodMap, ...O3(n5) }); - var Ze2 = class e11 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.set) - return y3(n5, { code: c2.invalid_type, expected: s4.set, received: n5.parsedType }), S3; - const a5 = this._def; - null !== a5.minSize && n5.data.size < a5.minSize.value && (y3(n5, { code: c2.too_small, minimum: a5.minSize.value, type: "set", inclusive: true, exact: false, message: a5.minSize.message }), t12.dirty()), null !== a5.maxSize && n5.data.size > a5.maxSize.value && (y3(n5, { code: c2.too_big, maximum: a5.maxSize.value, type: "set", inclusive: true, exact: false, message: a5.maxSize.message }), t12.dirty()); - const r3 = this._def.valueType; - function i4(e15) { - const n6 = /* @__PURE__ */ new Set(); - for (const a6 of e15) { - if ("aborted" === a6.status) - return S3; - "dirty" === a6.status && t12.dirty(), n6.add(a6.value); - } - return { status: t12.value, value: n6 }; - } - const o4 = [...n5.data.values()].map((e15, t13) => r3._parse(new T3(n5, e15, n5.path, t13))); - return n5.common.async ? Promise.all(o4).then((e15) => i4(e15)) : i4(o4); - } - min(t12, n5) { - return new e11({ ...this._def, minSize: { value: t12, message: v3.toString(n5) } }); - } - max(t12, n5) { - return new e11({ ...this._def, maxSize: { value: t12, message: v3.toString(n5) } }); - } - size(e14, t12) { - return this.min(e14, t12).max(e14, t12); - } - nonempty(e14) { - return this.min(1, e14); - } - }; - Ze2.create = (e14, t12) => new Ze2({ valueType: e14, minSize: null, maxSize: null, typeName: Be2.ZodSet, ...O3(t12) }); - var je2 = class e12 extends E2 { - constructor() { - super(...arguments), this.validate = this.implement; - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.function) - return y3(t12, { code: c2.invalid_type, expected: s4.function, received: t12.parsedType }), S3; - function n5(e15, n6) { - return f({ data: e15, path: t12.path, errorMaps: [t12.common.contextualErrorMap, t12.schemaErrorMap, h3(), l2].filter((e16) => !!e16), issueData: { code: c2.invalid_arguments, argumentsError: n6 } }); - } - function a5(e15, n6) { - return f({ data: e15, path: t12.path, errorMaps: [t12.common.contextualErrorMap, t12.schemaErrorMap, h3(), l2].filter((e16) => !!e16), issueData: { code: c2.invalid_return_type, returnTypeError: n6 } }); - } - const r3 = { errorMap: t12.common.contextualErrorMap }, i4 = t12.data; - if (this._def.returns instanceof Ee2) { - const e15 = this; - return x2(async function(...t13) { - const s5 = new u2([]), o4 = await e15._def.args.parseAsync(t13, r3).catch((e16) => { - throw s5.addIssue(n5(t13, e16)), s5; - }), c3 = await Reflect.apply(i4, this, o4); - return await e15._def.returns._def.type.parseAsync(c3, r3).catch((e16) => { - throw s5.addIssue(a5(c3, e16)), s5; - }); - }); - } - { - const e15 = this; - return x2(function(...t13) { - const s5 = e15._def.args.safeParse(t13, r3); - if (!s5.success) - throw new u2([n5(t13, s5.error)]); - const o4 = Reflect.apply(i4, this, s5.data), c3 = e15._def.returns.safeParse(o4, r3); - if (!c3.success) - throw new u2([a5(o4, c3.error)]); - return c3.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...t12) { - return new e12({ ...this._def, args: ke2.create(t12).rest(le2.create()) }); - } - returns(t12) { - return new e12({ ...this._def, returns: t12 }); - } - implement(e14) { - return this.parse(e14); - } - strictImplement(e14) { - return this.parse(e14); - } - static create(t12, n5, a5) { - return new e12({ args: t12 || ke2.create([]).rest(le2.create()), returns: n5 || le2.create(), typeName: Be2.ZodFunction, ...O3(a5) }); - } - }; - var Pe2 = class extends E2 { - get schema() { - return this._def.getter(); - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - return this._def.getter()._parse({ data: t12.data, path: t12.path, parent: t12 }); - } - }; - Pe2.create = (e14, t12) => new Pe2({ getter: e14, typeName: Be2.ZodLazy, ...O3(t12) }); - var Te2 = class extends E2 { - _parse(e14) { - if (e14.data !== this._def.value) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { received: t12.data, code: c2.invalid_literal, expected: this._def.value }), S3; - } - return { status: "valid", value: e14.data }; - } - get value() { - return this._def.value; - } - }; - function Ae2(e14, t12) { - return new Oe({ values: e14, typeName: Be2.ZodEnum, ...O3(t12) }); - } - Te2.create = (e14, t12) => new Te2({ value: e14, typeName: Be2.ZodLiteral, ...O3(t12) }); - var Oe = class t11 extends E2 { - _parse(t12) { - if ("string" != typeof t12.data) { - const n5 = this._getOrReturnCtx(t12), a5 = this._def.values; - return y3(n5, { expected: e5.joinValues(a5), received: n5.parsedType, code: c2.invalid_type }), S3; - } - if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(t12.data)) { - const e14 = this._getOrReturnCtx(t12), n5 = this._def.values; - return y3(e14, { received: e14.data, code: c2.invalid_enum_value, options: n5 }), S3; - } - return x2(t12.data); - } - get options() { - return this._def.values; - } - get enum() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - get Values() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - get Enum() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - extract(e14, n5 = this._def) { - return t11.create(e14, { ...this._def, ...n5 }); - } - exclude(e14, n5 = this._def) { - return t11.create(this.options.filter((t12) => !e14.includes(t12)), { ...this._def, ...n5 }); - } - }; - Oe.create = Ae2; - var Ce2 = class extends E2 { - _parse(t12) { - const n5 = e5.getValidEnumValues(this._def.values), a5 = this._getOrReturnCtx(t12); - if (a5.parsedType !== s4.string && a5.parsedType !== s4.number) { - const t13 = e5.objectValues(n5); - return y3(a5, { expected: e5.joinValues(t13), received: a5.parsedType, code: c2.invalid_type }), S3; - } - if (this._cache || (this._cache = new Set(e5.getValidEnumValues(this._def.values))), !this._cache.has(t12.data)) { - const t13 = e5.objectValues(n5); - return y3(a5, { received: a5.data, code: c2.invalid_enum_value, options: t13 }), S3; - } - return x2(t12.data); - } - get enum() { - return this._def.values; - } - }; - Ce2.create = (e14, t12) => new Ce2({ values: e14, typeName: Be2.ZodNativeEnum, ...O3(t12) }); - var Ee2 = class extends E2 { - unwrap() { - return this._def.type; - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.promise && false === t12.common.async) - return y3(t12, { code: c2.invalid_type, expected: s4.promise, received: t12.parsedType }), S3; - const n5 = t12.parsedType === s4.promise ? t12.data : Promise.resolve(t12.data); - return x2(n5.then((e15) => this._def.type.parseAsync(e15, { path: t12.path, errorMap: t12.common.contextualErrorMap }))); - } - }; - Ee2.create = (e14, t12) => new Ee2({ type: e14, typeName: Be2.ZodPromise, ...O3(t12) }); - var Ne2 = class extends E2 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === Be2.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(t12) { - const { status: n5, ctx: a5 } = this._processInputParams(t12), r3 = this._def.effect || null, i4 = { addIssue: (e14) => { - y3(a5, e14), e14.fatal ? n5.abort() : n5.dirty(); - }, get path() { - return a5.path; - } }; - if (i4.addIssue = i4.addIssue.bind(i4), "preprocess" === r3.type) { - const e14 = r3.transform(a5.data, i4); - if (a5.common.async) - return Promise.resolve(e14).then(async (e15) => { - if ("aborted" === n5.value) - return S3; - const t13 = await this._def.schema._parseAsync({ data: e15, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : "dirty" === t13.status || "dirty" === n5.value ? k2(t13.value) : t13; - }); - { - if ("aborted" === n5.value) - return S3; - const t13 = this._def.schema._parseSync({ data: e14, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : "dirty" === t13.status || "dirty" === n5.value ? k2(t13.value) : t13; - } - } - if ("refinement" === r3.type) { - const e14 = (e15) => { - const t13 = r3.refinement(e15, i4); - if (a5.common.async) - return Promise.resolve(t13); - if (t13 instanceof Promise) - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - return e15; - }; - if (false === a5.common.async) { - const t13 = this._def.schema._parseSync({ data: a5.data, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : ("dirty" === t13.status && n5.dirty(), e14(t13.value), { status: n5.value, value: t13.value }); - } - return this._def.schema._parseAsync({ data: a5.data, path: a5.path, parent: a5 }).then((t13) => "aborted" === t13.status ? S3 : ("dirty" === t13.status && n5.dirty(), e14(t13.value).then(() => ({ status: n5.value, value: t13.value })))); - } - if ("transform" === r3.type) { - if (false === a5.common.async) { - const e14 = this._def.schema._parseSync({ data: a5.data, path: a5.path, parent: a5 }); - if (!j2(e14)) - return S3; - const t13 = r3.transform(e14.value, i4); - if (t13 instanceof Promise) - throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); - return { status: n5.value, value: t13 }; - } - return this._def.schema._parseAsync({ data: a5.data, path: a5.path, parent: a5 }).then((e14) => j2(e14) ? Promise.resolve(r3.transform(e14.value, i4)).then((e15) => ({ status: n5.value, value: e15 })) : S3); - } - e5.assertNever(r3); - } - }; - Ne2.create = (e14, t12, n5) => new Ne2({ schema: e14, typeName: Be2.ZodEffects, effect: t12, ...O3(n5) }), Ne2.createWithPreprocess = (e14, t12, n5) => new Ne2({ schema: t12, effect: { type: "preprocess", transform: e14 }, typeName: Be2.ZodEffects, ...O3(n5) }); - var $e2 = class extends E2 { - _parse(e14) { - return this._getType(e14) === s4.undefined ? x2(void 0) : this._def.innerType._parse(e14); - } - unwrap() { - return this._def.innerType; - } - }; - $e2.create = (e14, t12) => new $e2({ innerType: e14, typeName: Be2.ZodOptional, ...O3(t12) }); - var Ie = class extends E2 { - _parse(e14) { - return this._getType(e14) === s4.null ? x2(null) : this._def.innerType._parse(e14); - } - unwrap() { - return this._def.innerType; - } - }; - Ie.create = (e14, t12) => new Ie({ innerType: e14, typeName: Be2.ZodNullable, ...O3(t12) }); - var Re2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - let n5 = t12.data; - return t12.parsedType === s4.undefined && (n5 = this._def.defaultValue()), this._def.innerType._parse({ data: n5, path: t12.path, parent: t12 }); - } - removeDefault() { - return this._def.innerType; - } - }; - Re2.create = (e14, t12) => new Re2({ innerType: e14, typeName: Be2.ZodDefault, defaultValue: "function" == typeof t12.default ? t12.default : () => t12.default, ...O3(t12) }); - var Me2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = { ...t12, common: { ...t12.common, issues: [] } }, a5 = this._def.innerType._parse({ data: n5.data, path: n5.path, parent: { ...n5 } }); - return P2(a5) ? a5.then((e15) => ({ status: "valid", value: "valid" === e15.status ? e15.value : this._def.catchValue({ get error() { - return new u2(n5.common.issues); - }, input: n5.data }) })) : { status: "valid", value: "valid" === a5.status ? a5.value : this._def.catchValue({ get error() { - return new u2(n5.common.issues); - }, input: n5.data }) }; - } - removeCatch() { - return this._def.innerType; - } - }; - Me2.create = (e14, t12) => new Me2({ innerType: e14, typeName: Be2.ZodCatch, catchValue: "function" == typeof t12.catch ? t12.catch : () => t12.catch, ...O3(t12) }); - var ze2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.nan) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.nan, received: t12.parsedType }), S3; - } - return { status: "valid", value: e14.data }; - } - }; - ze2.create = (e14) => new ze2({ typeName: Be2.ZodNaN, ...O3(e14) }); - var De2 = Symbol("zod_brand"); - var Le2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = t12.data; - return this._def.type._parse({ data: n5, path: t12.path, parent: t12 }); - } - unwrap() { - return this._def.type; - } - }; - var Fe2 = class e13 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.common.async) { - return (async () => { - const e15 = await this._def.in._parseAsync({ data: n5.data, path: n5.path, parent: n5 }); - return "aborted" === e15.status ? S3 : "dirty" === e15.status ? (t12.dirty(), k2(e15.value)) : this._def.out._parseAsync({ data: e15.value, path: n5.path, parent: n5 }); - })(); - } - { - const e15 = this._def.in._parseSync({ data: n5.data, path: n5.path, parent: n5 }); - return "aborted" === e15.status ? S3 : "dirty" === e15.status ? (t12.dirty(), { status: "dirty", value: e15.value }) : this._def.out._parseSync({ data: e15.value, path: n5.path, parent: n5 }); - } - } - static create(t12, n5) { - return new e13({ in: t12, out: n5, typeName: Be2.ZodPipeline }); - } - }; - var Ue2 = class extends E2 { - _parse(e14) { - const t12 = this._def.innerType._parse(e14), n5 = (e15) => (j2(e15) && (e15.value = Object.freeze(e15.value)), e15); - return P2(t12) ? t12.then((e15) => n5(e15)) : n5(t12); - } - unwrap() { - return this._def.innerType; - } - }; - function Je2(e14, t12) { - const n5 = "function" == typeof e14 ? e14(t12) : "string" == typeof e14 ? { message: e14 } : e14; - return "string" == typeof n5 ? { message: n5 } : n5; - } - function Ve2(e14, t12 = {}, n5) { - return e14 ? ue2.create().superRefine((a5, r3) => { - var i4, s5; - const o4 = e14(a5); - if (o4 instanceof Promise) - return o4.then((e15) => { - var i5, s6; - if (!e15) { - const e16 = Je2(t12, a5), o5 = null == (s6 = null != (i5 = e16.fatal) ? i5 : n5) || s6; - r3.addIssue({ code: "custom", ...e16, fatal: o5 }); - } - }); - if (!o4) { - const e15 = Je2(t12, a5), o5 = null == (s5 = null != (i4 = e15.fatal) ? i4 : n5) || s5; - r3.addIssue({ code: "custom", ...e15, fatal: o5 }); - } - }) : ue2.create(); - } - Ue2.create = (e14, t12) => new Ue2({ innerType: e14, typeName: Be2.ZodReadonly, ...O3(t12) }); - var Be2; - var qe2; - var We2 = { object: ge2.lazycreate }; - (qe2 = Be2 || (Be2 = {})).ZodString = "ZodString", qe2.ZodNumber = "ZodNumber", qe2.ZodNaN = "ZodNaN", qe2.ZodBigInt = "ZodBigInt", qe2.ZodBoolean = "ZodBoolean", qe2.ZodDate = "ZodDate", qe2.ZodSymbol = "ZodSymbol", qe2.ZodUndefined = "ZodUndefined", qe2.ZodNull = "ZodNull", qe2.ZodAny = "ZodAny", qe2.ZodUnknown = "ZodUnknown", qe2.ZodNever = "ZodNever", qe2.ZodVoid = "ZodVoid", qe2.ZodArray = "ZodArray", qe2.ZodObject = "ZodObject", qe2.ZodUnion = "ZodUnion", qe2.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", qe2.ZodIntersection = "ZodIntersection", qe2.ZodTuple = "ZodTuple", qe2.ZodRecord = "ZodRecord", qe2.ZodMap = "ZodMap", qe2.ZodSet = "ZodSet", qe2.ZodFunction = "ZodFunction", qe2.ZodLazy = "ZodLazy", qe2.ZodLiteral = "ZodLiteral", qe2.ZodEnum = "ZodEnum", qe2.ZodEffects = "ZodEffects", qe2.ZodNativeEnum = "ZodNativeEnum", qe2.ZodOptional = "ZodOptional", qe2.ZodNullable = "ZodNullable", qe2.ZodDefault = "ZodDefault", qe2.ZodCatch = "ZodCatch", qe2.ZodPromise = "ZodPromise", qe2.ZodBranded = "ZodBranded", qe2.ZodPipeline = "ZodPipeline", qe2.ZodReadonly = "ZodReadonly"; - var Ke2 = (e14, t12 = { message: `Input not instance of ${e14.name}` }) => Ve2((t13) => t13 instanceof e14, t12); - var He2 = te2.create; - var Ge2 = ae.create; - var Ye2 = ze2.create; - var Qe2 = re2.create; - var Xe2 = ie2.create; - var et = se.create; - var tt = oe2.create; - var nt2 = ce2.create; - var at2 = de2.create; - var rt2 = ue2.create; - var it2 = le2.create; - var st2 = pe2.create; - var ot2 = me2.create; - var ct2 = he2.create; - var dt2 = ge2.create; - var ut2 = ge2.strictCreate; - var lt2 = ye2.create; - var pt2 = be2.create; - var mt2 = Se2.create; - var ht2 = ke2.create; - var ft2 = xe2.create; - var gt2 = we2.create; - var yt2 = Ze2.create; - var vt2 = je2.create; - var bt2 = Pe2.create; - var _t = Te2.create; - var St2 = Oe.create; - var kt2 = Ce2.create; - var xt2 = Ee2.create; - var wt2 = Ne2.create; - var Zt2 = $e2.create; - var jt2 = Ie.create; - var Pt2 = Ne2.createWithPreprocess; - var Tt2 = Fe2.create; - var At2 = () => He2().optional(); - var Ot2 = () => Ge2().optional(); - var Ct2 = () => Xe2().optional(); - var Et2 = { string: (e14) => te2.create({ ...e14, coerce: true }), number: (e14) => ae.create({ ...e14, coerce: true }), boolean: (e14) => ie2.create({ ...e14, coerce: true }), bigint: (e14) => re2.create({ ...e14, coerce: true }), date: (e14) => se.create({ ...e14, coerce: true }) }; - var Nt2 = S3; - var $t2 = Symbol("Let zodToJsonSchema decide on which parser to use"); - var It2 = { name: void 0, $refStrategy: "root", basePath: ["#"], effectStrategy: "input", pipeStrategy: "all", dateStrategy: "format:date-time", mapStrategy: "entries", removeAdditionalStrategy: "passthrough", allowedAdditionalProperties: true, rejectedAdditionalProperties: false, definitionPath: "definitions", target: "jsonSchema7", strictUnions: false, definitions: {}, errorMessages: false, markdownDescription: false, patternStrategy: "escape", applyRegexFlags: false, emailStrategy: "format:email", base64Strategy: "contentEncoding:base64", nameStrategy: "ref", openAiAnyTypeName: "OpenAiAnyType" }; - var Rt2 = (e14) => { - const t12 = ((e15) => "string" == typeof e15 ? { ...It2, name: e15 } : { ...It2, ...e15 })(e14), n5 = void 0 !== t12.name ? [...t12.basePath, t12.definitionPath, t12.name] : t12.basePath; - return { ...t12, flags: { hasReferencedOpenAiAnyType: false }, currentPath: n5, propertyPath: void 0, seen: new Map(Object.entries(t12.definitions).map(([e15, n6]) => [n6._def, { def: n6._def, path: [...t12.basePath, t12.definitionPath, e15], jsonSchema: void 0 }])) }; - }; - function Mt2(e14, t12, n5, a5) { - (null == a5 ? void 0 : a5.errorMessages) && n5 && (e14.errorMessage = { ...e14.errorMessage, [t12]: n5 }); - } - function zt(e14, t12, n5, a5, r3) { - e14[t12] = n5, Mt2(e14, t12, a5, r3); - } - var Dt = (e14, t12) => { - let n5 = 0; - for (; n5 < e14.length && n5 < t12.length && e14[n5] === t12[n5]; n5++) - ; - return [(e14.length - n5).toString(), ...t12.slice(n5)].join("/"); - }; - function Lt2(e14) { - if ("openAi" !== e14.target) - return {}; - const t12 = [...e14.basePath, e14.definitionPath, e14.openAiAnyTypeName]; - return e14.flags.hasReferencedOpenAiAnyType = true, { $ref: "relative" === e14.$refStrategy ? Dt(t12, e14.currentPath) : t12.join("/") }; - } - function Ft2(e14, t12) { - return fn(e14.type._def, t12); - } - function Ut2(e14, t12, n5) { - const a5 = null != n5 ? n5 : t12.dateStrategy; - if (Array.isArray(a5)) - return { anyOf: a5.map((n6, a6) => Ut2(e14, t12, n6)) }; - switch (a5) { - case "string": - case "format:date-time": - return { type: "string", format: "date-time" }; - case "format:date": - return { type: "string", format: "date" }; - case "integer": - return Jt2(e14, t12); - } - } - var Jt2 = (e14, t12) => { - const n5 = { type: "integer", format: "unix-time" }; - if ("openApi3" === t12.target) - return n5; - for (const a5 of e14.checks) - switch (a5.kind) { - case "min": - zt(n5, "minimum", a5.value, a5.message, t12); - break; - case "max": - zt(n5, "maximum", a5.value, a5.message, t12); - } - return n5; - }; - var Vt2 = void 0; - var Bt2 = /^[cC][^\s-]{8,}$/; - var qt2 = /^[0-9a-z]+$/; - var Wt2 = /^[0-9A-HJKMNP-TV-Z]{26}$/; - var Kt2 = /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/; - var Ht = () => (void 0 === Vt2 && (Vt2 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Vt2); - var Gt2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var Yt2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var Qt2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var Xt2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var en2 = /^[a-zA-Z0-9_-]{21}$/; - var tn2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - function nn2(e14, t12) { - const n5 = { type: "string" }; - if (e14.checks) - for (const a5 of e14.checks) - switch (a5.kind) { - case "min": - zt(n5, "minLength", "number" == typeof n5.minLength ? Math.max(n5.minLength, a5.value) : a5.value, a5.message, t12); - break; - case "max": - zt(n5, "maxLength", "number" == typeof n5.maxLength ? Math.min(n5.maxLength, a5.value) : a5.value, a5.message, t12); - break; - case "email": - switch (t12.emailStrategy) { - case "format:email": - sn(n5, "email", a5.message, t12); - break; - case "format:idn-email": - sn(n5, "idn-email", a5.message, t12); - break; - case "pattern:zod": - on2(n5, Kt2, a5.message, t12); - } - break; - case "url": - sn(n5, "uri", a5.message, t12); - break; - case "uuid": - sn(n5, "uuid", a5.message, t12); - break; - case "regex": - on2(n5, a5.regex, a5.message, t12); - break; - case "cuid": - on2(n5, Bt2, a5.message, t12); - break; - case "cuid2": - on2(n5, qt2, a5.message, t12); - break; - case "startsWith": - on2(n5, RegExp(`^${an2(a5.value, t12)}`), a5.message, t12); - break; - case "endsWith": - on2(n5, RegExp(`${an2(a5.value, t12)}$`), a5.message, t12); - break; - case "datetime": - sn(n5, "date-time", a5.message, t12); - break; - case "date": - sn(n5, "date", a5.message, t12); - break; - case "time": - sn(n5, "time", a5.message, t12); - break; - case "duration": - sn(n5, "duration", a5.message, t12); - break; - case "length": - zt(n5, "minLength", "number" == typeof n5.minLength ? Math.max(n5.minLength, a5.value) : a5.value, a5.message, t12), zt(n5, "maxLength", "number" == typeof n5.maxLength ? Math.min(n5.maxLength, a5.value) : a5.value, a5.message, t12); - break; - case "includes": - on2(n5, RegExp(an2(a5.value, t12)), a5.message, t12); - break; - case "ip": - "v6" !== a5.version && sn(n5, "ipv4", a5.message, t12), "v4" !== a5.version && sn(n5, "ipv6", a5.message, t12); - break; - case "base64url": - on2(n5, Xt2, a5.message, t12); - break; - case "jwt": - on2(n5, tn2, a5.message, t12); - break; - case "cidr": - "v6" !== a5.version && on2(n5, Gt2, a5.message, t12), "v4" !== a5.version && on2(n5, Yt2, a5.message, t12); - break; - case "emoji": - on2(n5, Ht(), a5.message, t12); - break; - case "ulid": - on2(n5, Wt2, a5.message, t12); - break; - case "base64": - switch (t12.base64Strategy) { - case "format:binary": - sn(n5, "binary", a5.message, t12); - break; - case "contentEncoding:base64": - zt(n5, "contentEncoding", "base64", a5.message, t12); - break; - case "pattern:zod": - on2(n5, Qt2, a5.message, t12); - } - break; - case "nanoid": - on2(n5, en2, a5.message, t12); - } - return n5; - } - function an2(e14, t12) { - return "escape" === t12.patternStrategy ? function(e15) { - let t13 = ""; - for (let n5 = 0; n5 < e15.length; n5++) - rn2.has(e15[n5]) || (t13 += "\\"), t13 += e15[n5]; - return t13; - }(e14) : e14; - } - var rn2 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); - function sn(e14, t12, n5, a5) { - var r3; - e14.format || (null == (r3 = e14.anyOf) ? void 0 : r3.some((e15) => e15.format)) ? (e14.anyOf || (e14.anyOf = []), e14.format && (e14.anyOf.push({ format: e14.format, ...e14.errorMessage && a5.errorMessages && { errorMessage: { format: e14.errorMessage.format } } }), delete e14.format, e14.errorMessage && (delete e14.errorMessage.format, 0 === Object.keys(e14.errorMessage).length && delete e14.errorMessage)), e14.anyOf.push({ format: t12, ...n5 && a5.errorMessages && { errorMessage: { format: n5 } } })) : zt(e14, "format", t12, n5, a5); - } - function on2(e14, t12, n5, a5) { - var r3; - e14.pattern || (null == (r3 = e14.allOf) ? void 0 : r3.some((e15) => e15.pattern)) ? (e14.allOf || (e14.allOf = []), e14.pattern && (e14.allOf.push({ pattern: e14.pattern, ...e14.errorMessage && a5.errorMessages && { errorMessage: { pattern: e14.errorMessage.pattern } } }), delete e14.pattern, e14.errorMessage && (delete e14.errorMessage.pattern, 0 === Object.keys(e14.errorMessage).length && delete e14.errorMessage)), e14.allOf.push({ pattern: cn(t12, a5), ...n5 && a5.errorMessages && { errorMessage: { pattern: n5 } } })) : zt(e14, "pattern", cn(t12, a5), n5, a5); - } - function cn(e14, t12) { - var n5; - if (!t12.applyRegexFlags || !e14.flags) - return e14.source; - const a5 = e14.flags.includes("i"), r3 = e14.flags.includes("m"), i4 = e14.flags.includes("s"), s5 = a5 ? e14.source.toLowerCase() : e14.source; - let o4 = "", c3 = false, d2 = false, u3 = false; - for (let e15 = 0; e15 < s5.length; e15++) - if (c3) - o4 += s5[e15], c3 = false; - else { - if (a5) { - if (d2) { - if (s5[e15].match(/[a-z]/)) { - u3 ? (o4 += s5[e15], o4 += `${s5[e15 - 2]}-${s5[e15]}`.toUpperCase(), u3 = false) : "-" === s5[e15 + 1] && (null == (n5 = s5[e15 + 2]) ? void 0 : n5.match(/[a-z]/)) ? (o4 += s5[e15], u3 = true) : o4 += `${s5[e15]}${s5[e15].toUpperCase()}`; - continue; - } - } else if (s5[e15].match(/[a-z]/)) { - o4 += `[${s5[e15]}${s5[e15].toUpperCase()}]`; - continue; - } - } - if (r3) { - if ("^" === s5[e15]) { - o4 += "(^|(?<=[\r\n]))"; - continue; - } - if ("$" === s5[e15]) { - o4 += "($|(?=[\r\n]))"; - continue; - } - } - i4 && "." === s5[e15] ? o4 += d2 ? `${s5[e15]}\r -` : `[${s5[e15]}\r -]` : (o4 += s5[e15], "\\" === s5[e15] ? c3 = true : d2 && "]" === s5[e15] ? d2 = false : d2 || "[" !== s5[e15] || (d2 = true)); - } - try { - new RegExp(o4); - } catch (n6) { - return console.warn(`Could not convert regex pattern at ${t12.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`), e14.source; - } - return o4; - } - function dn(e14, t12) { - var n5, a5, r3, i4, s5, o4, c3; - if ("openAi" === t12.target && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), "openApi3" === t12.target && (null == (n5 = e14.keyType) ? void 0 : n5._def.typeName) === Be2.ZodEnum) - return { type: "object", required: e14.keyType._def.values, properties: e14.keyType._def.values.reduce((n6, a6) => { - var r4; - return { ...n6, [a6]: null != (r4 = fn(e14.valueType._def, { ...t12, currentPath: [...t12.currentPath, "properties", a6] })) ? r4 : Lt2(t12) }; - }, {}), additionalProperties: t12.rejectedAdditionalProperties }; - const d2 = { type: "object", additionalProperties: null != (a5 = fn(e14.valueType._def, { ...t12, currentPath: [...t12.currentPath, "additionalProperties"] })) ? a5 : t12.allowedAdditionalProperties }; - if ("openApi3" === t12.target) - return d2; - if ((null == (r3 = e14.keyType) ? void 0 : r3._def.typeName) === Be2.ZodString && (null == (i4 = e14.keyType._def.checks) ? void 0 : i4.length)) { - const { type: n6, ...a6 } = nn2(e14.keyType._def, t12); - return { ...d2, propertyNames: a6 }; - } - if ((null == (s5 = e14.keyType) ? void 0 : s5._def.typeName) === Be2.ZodEnum) - return { ...d2, propertyNames: { enum: e14.keyType._def.values } }; - if ((null == (o4 = e14.keyType) ? void 0 : o4._def.typeName) === Be2.ZodBranded && e14.keyType._def.type._def.typeName === Be2.ZodString && (null == (c3 = e14.keyType._def.type._def.checks) ? void 0 : c3.length)) { - const { type: n6, ...a6 } = Ft2(e14.keyType._def, t12); - return { ...d2, propertyNames: a6 }; - } - return d2; - } - var un = { ZodString: "string", ZodNumber: "number", ZodBigInt: "integer", ZodBoolean: "boolean", ZodNull: "null" }; - var ln = (e14, t12) => { - const n5 = (e14.options instanceof Map ? Array.from(e14.options.values()) : e14.options).map((e15, n6) => fn(e15._def, { ...t12, currentPath: [...t12.currentPath, "anyOf", `${n6}`] })).filter((e15) => !!e15 && (!t12.strictUnions || "object" == typeof e15 && Object.keys(e15).length > 0)); - return n5.length ? { anyOf: n5 } : void 0; - }; - function pn(e14, t12) { - const n5 = "openAi" === t12.target, a5 = { type: "object", properties: {} }, r3 = [], i4 = e14.shape(); - for (const e15 in i4) { - let s6 = i4[e15]; - if (void 0 === s6 || void 0 === s6._def) - continue; - let o4 = mn(s6); - o4 && n5 && ("ZodOptional" === s6._def.typeName && (s6 = s6._def.innerType), s6.isNullable() || (s6 = s6.nullable()), o4 = false); - const c3 = fn(s6._def, { ...t12, currentPath: [...t12.currentPath, "properties", e15], propertyPath: [...t12.currentPath, "properties", e15] }); - void 0 !== c3 && (a5.properties[e15] = c3, o4 || r3.push(e15)); - } - r3.length && (a5.required = r3); - const s5 = function(e15, t13) { - if ("ZodNever" !== e15.catchall._def.typeName) - return fn(e15.catchall._def, { ...t13, currentPath: [...t13.currentPath, "additionalProperties"] }); - switch (e15.unknownKeys) { - case "passthrough": - return t13.allowedAdditionalProperties; - case "strict": - return t13.rejectedAdditionalProperties; - case "strip": - return "strict" === t13.removeAdditionalStrategy ? t13.allowedAdditionalProperties : t13.rejectedAdditionalProperties; - } - }(e14, t12); - return void 0 !== s5 && (a5.additionalProperties = s5), a5; - } - function mn(e14) { - try { - return e14.isOptional(); - } catch (e15) { - return true; - } - } - var hn2 = (e14, t12, n5) => { - switch (t12) { - case Be2.ZodString: - return nn2(e14, n5); - case Be2.ZodNumber: - return function(e15, t13) { - const n6 = { type: "number" }; - if (!e15.checks) - return n6; - for (const a5 of e15.checks) - switch (a5.kind) { - case "int": - n6.type = "integer", Mt2(n6, "type", a5.message, t13); - break; - case "min": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "minimum", a5.value, a5.message, t13) : zt(n6, "exclusiveMinimum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMinimum = true), zt(n6, "minimum", a5.value, a5.message, t13)); - break; - case "max": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "maximum", a5.value, a5.message, t13) : zt(n6, "exclusiveMaximum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMaximum = true), zt(n6, "maximum", a5.value, a5.message, t13)); - break; - case "multipleOf": - zt(n6, "multipleOf", a5.value, a5.message, t13); - } - return n6; - }(e14, n5); - case Be2.ZodObject: - return pn(e14, n5); - case Be2.ZodBigInt: - return function(e15, t13) { - const n6 = { type: "integer", format: "int64" }; - if (!e15.checks) - return n6; - for (const a5 of e15.checks) - switch (a5.kind) { - case "min": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "minimum", a5.value, a5.message, t13) : zt(n6, "exclusiveMinimum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMinimum = true), zt(n6, "minimum", a5.value, a5.message, t13)); - break; - case "max": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "maximum", a5.value, a5.message, t13) : zt(n6, "exclusiveMaximum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMaximum = true), zt(n6, "maximum", a5.value, a5.message, t13)); - break; - case "multipleOf": - zt(n6, "multipleOf", a5.value, a5.message, t13); - } - return n6; - }(e14, n5); - case Be2.ZodBoolean: - return { type: "boolean" }; - case Be2.ZodDate: - return Ut2(e14, n5); - case Be2.ZodUndefined: - return function(e15) { - return { not: Lt2(e15) }; - }(n5); - case Be2.ZodNull: - return function(e15) { - return "openApi3" === e15.target ? { enum: ["null"], nullable: true } : { type: "null" }; - }(n5); - case Be2.ZodArray: - return function(e15, t13) { - var n6, a5, r3; - const i4 = { type: "array" }; - return (null == (n6 = e15.type) ? void 0 : n6._def) && (null == (r3 = null == (a5 = e15.type) ? void 0 : a5._def) ? void 0 : r3.typeName) !== Be2.ZodAny && (i4.items = fn(e15.type._def, { ...t13, currentPath: [...t13.currentPath, "items"] })), e15.minLength && zt(i4, "minItems", e15.minLength.value, e15.minLength.message, t13), e15.maxLength && zt(i4, "maxItems", e15.maxLength.value, e15.maxLength.message, t13), e15.exactLength && (zt(i4, "minItems", e15.exactLength.value, e15.exactLength.message, t13), zt(i4, "maxItems", e15.exactLength.value, e15.exactLength.message, t13)), i4; - }(e14, n5); - case Be2.ZodUnion: - case Be2.ZodDiscriminatedUnion: - return function(e15, t13) { - if ("openApi3" === t13.target) - return ln(e15, t13); - const n6 = e15.options instanceof Map ? Array.from(e15.options.values()) : e15.options; - if (n6.every((e16) => e16._def.typeName in un && (!e16._def.checks || !e16._def.checks.length))) { - const e16 = n6.reduce((e17, t14) => { - const n7 = un[t14._def.typeName]; - return n7 && !e17.includes(n7) ? [...e17, n7] : e17; - }, []); - return { type: e16.length > 1 ? e16 : e16[0] }; - } - if (n6.every((e16) => "ZodLiteral" === e16._def.typeName && !e16.description)) { - const e16 = n6.reduce((e17, t14) => { - const n7 = typeof t14._def.value; - switch (n7) { - case "string": - case "number": - case "boolean": - return [...e17, n7]; - case "bigint": - return [...e17, "integer"]; - case "object": - if (null === t14._def.value) - return [...e17, "null"]; - default: - return e17; - } - }, []); - if (e16.length === n6.length) { - const t14 = e16.filter((e17, t15, n7) => n7.indexOf(e17) === t15); - return { type: t14.length > 1 ? t14 : t14[0], enum: n6.reduce((e17, t15) => e17.includes(t15._def.value) ? e17 : [...e17, t15._def.value], []) }; - } - } else if (n6.every((e16) => "ZodEnum" === e16._def.typeName)) - return { type: "string", enum: n6.reduce((e16, t14) => [...e16, ...t14._def.values.filter((t15) => !e16.includes(t15))], []) }; - return ln(e15, t13); - }(e14, n5); - case Be2.ZodIntersection: - return function(e15, t13) { - const n6 = [fn(e15.left._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "0"] }), fn(e15.right._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "1"] })].filter((e16) => !!e16); - let a5 = "jsonSchema2019-09" === t13.target ? { unevaluatedProperties: false } : void 0; - const r3 = []; - return n6.forEach((e16) => { - if ("type" in (t14 = e16) && "string" === t14.type || !("allOf" in t14)) { - let t15 = e16; - if ("additionalProperties" in e16 && false === e16.additionalProperties) { - const { additionalProperties: n7, ...a6 } = e16; - t15 = a6; - } else - a5 = void 0; - r3.push(t15); - } else - r3.push(...e16.allOf), void 0 === e16.unevaluatedProperties && (a5 = void 0); - var t14; - }), r3.length ? { allOf: r3, ...a5 } : void 0; - }(e14, n5); - case Be2.ZodTuple: - return function(e15, t13) { - return e15.rest ? { type: "array", minItems: e15.items.length, items: e15.items.map((e16, n6) => fn(e16._def, { ...t13, currentPath: [...t13.currentPath, "items", `${n6}`] })).reduce((e16, t14) => void 0 === t14 ? e16 : [...e16, t14], []), additionalItems: fn(e15.rest._def, { ...t13, currentPath: [...t13.currentPath, "additionalItems"] }) } : { type: "array", minItems: e15.items.length, maxItems: e15.items.length, items: e15.items.map((e16, n6) => fn(e16._def, { ...t13, currentPath: [...t13.currentPath, "items", `${n6}`] })).reduce((e16, t14) => void 0 === t14 ? e16 : [...e16, t14], []) }; - }(e14, n5); - case Be2.ZodRecord: - return dn(e14, n5); - case Be2.ZodLiteral: - return function(e15, t13) { - const n6 = typeof e15.value; - return "bigint" !== n6 && "number" !== n6 && "boolean" !== n6 && "string" !== n6 ? { type: Array.isArray(e15.value) ? "array" : "object" } : "openApi3" === t13.target ? { type: "bigint" === n6 ? "integer" : n6, enum: [e15.value] } : { type: "bigint" === n6 ? "integer" : n6, const: e15.value }; - }(e14, n5); - case Be2.ZodEnum: - return function(e15) { - return { type: "string", enum: Array.from(e15.values) }; - }(e14); - case Be2.ZodNativeEnum: - return function(e15) { - const t13 = e15.values, n6 = Object.keys(e15.values).filter((e16) => "number" != typeof t13[t13[e16]]).map((e16) => t13[e16]), a5 = Array.from(new Set(n6.map((e16) => typeof e16))); - return { type: 1 === a5.length ? "string" === a5[0] ? "string" : "number" : ["string", "number"], enum: n6 }; - }(e14); - case Be2.ZodNullable: - return function(e15, t13) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(e15.innerType._def.typeName) && (!e15.innerType._def.checks || !e15.innerType._def.checks.length)) - return "openApi3" === t13.target ? { type: un[e15.innerType._def.typeName], nullable: true } : { type: [un[e15.innerType._def.typeName], "null"] }; - if ("openApi3" === t13.target) { - const n7 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath] }); - return n7 && "$ref" in n7 ? { allOf: [n7], nullable: true } : n7 && { ...n7, nullable: true }; - } - const n6 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath, "anyOf", "0"] }); - return n6 && { anyOf: [n6, { type: "null" }] }; - }(e14, n5); - case Be2.ZodOptional: - return ((e15, t13) => { - var n6; - if (t13.currentPath.toString() === (null == (n6 = t13.propertyPath) ? void 0 : n6.toString())) - return fn(e15.innerType._def, t13); - const a5 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath, "anyOf", "1"] }); - return a5 ? { anyOf: [{ not: Lt2(t13) }, a5] } : Lt2(t13); - })(e14, n5); - case Be2.ZodMap: - return function(e15, t13) { - return "record" === t13.mapStrategy ? dn(e15, t13) : { type: "array", maxItems: 125, items: { type: "array", items: [fn(e15.keyType._def, { ...t13, currentPath: [...t13.currentPath, "items", "items", "0"] }) || Lt2(t13), fn(e15.valueType._def, { ...t13, currentPath: [...t13.currentPath, "items", "items", "1"] }) || Lt2(t13)], minItems: 2, maxItems: 2 } }; - }(e14, n5); - case Be2.ZodSet: - return function(e15, t13) { - const n6 = { type: "array", uniqueItems: true, items: fn(e15.valueType._def, { ...t13, currentPath: [...t13.currentPath, "items"] }) }; - return e15.minSize && zt(n6, "minItems", e15.minSize.value, e15.minSize.message, t13), e15.maxSize && zt(n6, "maxItems", e15.maxSize.value, e15.maxSize.message, t13), n6; - }(e14, n5); - case Be2.ZodLazy: - return () => e14.getter()._def; - case Be2.ZodPromise: - return function(e15, t13) { - return fn(e15.type._def, t13); - }(e14, n5); - case Be2.ZodNaN: - case Be2.ZodNever: - return function(e15) { - return "openAi" === e15.target ? void 0 : { not: Lt2({ ...e15, currentPath: [...e15.currentPath, "not"] }) }; - }(n5); - case Be2.ZodEffects: - return function(e15, t13) { - return "input" === t13.effectStrategy ? fn(e15.schema._def, t13) : Lt2(t13); - }(e14, n5); - case Be2.ZodAny: - return Lt2(n5); - case Be2.ZodUnknown: - return function(e15) { - return Lt2(e15); - }(n5); - case Be2.ZodDefault: - return function(e15, t13) { - return { ...fn(e15.innerType._def, t13), default: e15.defaultValue() }; - }(e14, n5); - case Be2.ZodBranded: - return Ft2(e14, n5); - case Be2.ZodReadonly: - case Be2.ZodCatch: - return ((e15, t13) => fn(e15.innerType._def, t13))(e14, n5); - case Be2.ZodPipeline: - return ((e15, t13) => { - if ("input" === t13.pipeStrategy) - return fn(e15.in._def, t13); - if ("output" === t13.pipeStrategy) - return fn(e15.out._def, t13); - const n6 = fn(e15.in._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "0"] }); - return { allOf: [n6, fn(e15.out._def, { ...t13, currentPath: [...t13.currentPath, "allOf", n6 ? "1" : "0"] })].filter((e16) => void 0 !== e16) }; - })(e14, n5); - case Be2.ZodFunction: - case Be2.ZodVoid: - case Be2.ZodSymbol: - default: - return; - } - }; - function fn(e14, t12, n5 = false) { - var a5; - const r3 = t12.seen.get(e14); - if (t12.override) { - const i5 = null == (a5 = t12.override) ? void 0 : a5.call(t12, e14, t12, r3, n5); - if (i5 !== $t2) - return i5; - } - if (r3 && !n5) { - const e15 = gn(r3, t12); - if (void 0 !== e15) - return e15; - } - const i4 = { def: e14, path: t12.currentPath, jsonSchema: void 0 }; - t12.seen.set(e14, i4); - const s5 = hn2(e14, e14.typeName, t12), o4 = "function" == typeof s5 ? fn(s5(), t12) : s5; - if (o4 && yn2(e14, t12, o4), t12.postProcess) { - const n6 = t12.postProcess(o4, e14, t12); - return i4.jsonSchema = o4, n6; - } - return i4.jsonSchema = o4, o4; - } - var gn = (e14, t12) => { - switch (t12.$refStrategy) { - case "root": - return { $ref: e14.path.join("/") }; - case "relative": - return { $ref: Dt(t12.currentPath, e14.path) }; - case "none": - case "seen": - return e14.path.length < t12.currentPath.length && e14.path.every((e15, n5) => t12.currentPath[n5] === e15) ? (console.warn(`Recursive reference detected at ${t12.currentPath.join("/")}! Defaulting to any`), Lt2(t12)) : "seen" === t12.$refStrategy ? Lt2(t12) : void 0; - } - }; - var yn2 = (e14, t12, n5) => (e14.description && (n5.description = e14.description, t12.markdownDescription && (n5.markdownDescription = e14.description)), n5); - var vn2 = (e14, t12) => { - var n5; - const a5 = Rt2(t12); - let r3 = "object" == typeof t12 && t12.definitions ? Object.entries(t12.definitions).reduce((e15, [t13, n6]) => { - var r4; - return { ...e15, [t13]: null != (r4 = fn(n6._def, { ...a5, currentPath: [...a5.basePath, a5.definitionPath, t13] }, true)) ? r4 : Lt2(a5) }; - }, {}) : void 0; - const i4 = "string" == typeof t12 ? t12 : "title" === (null == t12 ? void 0 : t12.nameStrategy) || null == t12 ? void 0 : t12.name, s5 = null != (n5 = fn(e14._def, void 0 === i4 ? a5 : { ...a5, currentPath: [...a5.basePath, a5.definitionPath, i4] }, false)) ? n5 : Lt2(a5), o4 = "object" == typeof t12 && void 0 !== t12.name && "title" === t12.nameStrategy ? t12.name : void 0; - void 0 !== o4 && (s5.title = o4), a5.flags.hasReferencedOpenAiAnyType && (r3 || (r3 = {}), r3[a5.openAiAnyTypeName] || (r3[a5.openAiAnyTypeName] = { type: ["string", "number", "integer", "boolean", "array", "null"], items: { $ref: "relative" === a5.$refStrategy ? "1" : [...a5.basePath, a5.definitionPath, a5.openAiAnyTypeName].join("/") } })); - const c3 = void 0 === i4 ? r3 ? { ...s5, [a5.definitionPath]: r3 } : s5 : { $ref: [..."relative" === a5.$refStrategy ? [] : a5.basePath, a5.definitionPath, i4].join("/"), [a5.definitionPath]: { ...r3, [i4]: s5 } }; - return "jsonSchema7" === a5.target ? c3.$schema = "http://json-schema.org/draft-07/schema#" : "jsonSchema2019-09" !== a5.target && "openAi" !== a5.target || (c3.$schema = "https://json-schema.org/draft/2019-09/schema#"), "openAi" === a5.target && ("anyOf" in c3 || "oneOf" in c3 || "allOf" in c3 || "type" in c3 && Array.isArray(c3.type)) && console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."), c3; - }; - var bn = Object.defineProperty; - var _n2 = (e14, t12) => { - for (var n5 in t12) - bn(e14, n5, { get: t12[n5], enumerable: true }); - }; - var Sn = i3.string(); - var kn2 = i3.number(); - var xn2 = (i3.boolean(), i3.string().min(1)); - var wn = i3.number().int().positive(); - var Zn2 = i3.number().int().nonnegative(); - var jn2 = i3.number().describe("Tagging version number"); - i3.union([i3.string(), i3.number(), i3.boolean()]).optional(); - _n2({}, { ErrorHandlerSchema: () => An2, HandlerSchema: () => Cn2, LogHandlerSchema: () => On2, StorageSchema: () => Tn, StorageTypeSchema: () => Pn2, errorHandlerJsonSchema: () => $n2, handlerJsonSchema: () => Rn, logHandlerJsonSchema: () => In2, storageJsonSchema: () => Nn, storageTypeJsonSchema: () => En }); - var Pn2 = i3.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); - var Tn = i3.object({ Local: i3.literal("local"), Session: i3.literal("session"), Cookie: i3.literal("cookie") }).describe("Storage type constants for type-safe references"); - var An2 = i3.any().describe("Error handler function: (error, state?) => void"); - var On2 = i3.any().describe("Log handler function: (message, verbose?) => void"); - var Cn2 = i3.object({ Error: An2.describe("Error handler function"), Log: On2.describe("Log handler function") }).describe("Handler interface with error and log functions"); - var En = vn2(Pn2, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); - var Nn = vn2(Tn, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); - var $n2 = vn2(An2, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); - var In2 = vn2(On2, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); - var Rn = vn2(Cn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); - i3.object({ onError: An2.optional().describe("Error handler function: (error, state?) => void"), onLog: On2.optional().describe("Log handler function: (message, verbose?) => void") }).partial(), i3.object({ verbose: i3.boolean().describe("Enable verbose logging for debugging").optional() }).partial(), i3.object({ queue: i3.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(), i3.object({}).partial(), i3.object({ init: i3.boolean().describe("Whether to initialize immediately").optional(), loadScript: i3.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(), i3.object({ disabled: i3.boolean().describe("Set to true to disable").optional() }).partial(), i3.object({ primary: i3.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(), i3.object({ settings: i3.any().optional().describe("Implementation-specific configuration") }).partial(), i3.object({ env: i3.any().optional().describe("Environment dependencies (platform-specific)") }).partial(), i3.object({ type: i3.string().optional().describe("Instance type identifier"), config: i3.any().describe("Instance configuration") }).partial(), i3.object({ collector: i3.any().describe("Collector instance (runtime object)"), config: i3.any().describe("Configuration"), env: i3.any().describe("Environment dependencies") }).partial(), i3.object({ batch: i3.number().optional().describe("Batch size: bundle N events for batch processing"), batched: i3.any().optional().describe("Batch of events to be processed") }).partial(), i3.object({ ignore: i3.boolean().describe("Set to true to skip processing").optional(), condition: i3.string().optional().describe("Condition function: return true to process") }).partial(), i3.object({ sources: i3.record(i3.string(), i3.any()).describe("Map of source instances") }).partial(), i3.object({ destinations: i3.record(i3.string(), i3.any()).describe("Map of destination instances") }).partial(); - _n2({}, { ConsentSchema: () => Un2, DeepPartialEventSchema: () => Gn2, EntitiesSchema: () => Wn, EntitySchema: () => qn, EventSchema: () => Kn2, OrderedPropertiesSchema: () => Ln2, PartialEventSchema: () => Hn2, PropertiesSchema: () => Dn2, PropertySchema: () => zn, PropertyTypeSchema: () => Mn, SourceSchema: () => Bn2, SourceTypeSchema: () => Fn2, UserSchema: () => Jn, VersionSchema: () => Vn2, consentJsonSchema: () => ra, entityJsonSchema: () => na, eventJsonSchema: () => Yn, orderedPropertiesJsonSchema: () => ta, partialEventJsonSchema: () => Qn2, propertiesJsonSchema: () => ea, sourceTypeJsonSchema: () => aa, userJsonSchema: () => Xn }); - var Mn = i3.lazy(() => i3.union([i3.boolean(), i3.string(), i3.number(), i3.record(i3.string(), zn)])); - var zn = i3.lazy(() => i3.union([Mn, i3.array(Mn)])); - var Dn2 = i3.record(i3.string(), zn.optional()).describe("Flexible property collection with optional values"); - var Ln2 = i3.record(i3.string(), i3.tuple([zn, i3.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); - var Fn2 = i3.union([i3.enum(["web", "server", "app", "other"]), i3.string()]).describe("Source type: web, server, app, other, or custom"); - var Un2 = i3.record(i3.string(), i3.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); - var Jn = Dn2.and(i3.object({ id: i3.string().optional().describe("User identifier"), device: i3.string().optional().describe("Device identifier"), session: i3.string().optional().describe("Session identifier"), hash: i3.string().optional().describe("Hashed identifier"), address: i3.string().optional().describe("User address"), email: i3.string().email().optional().describe("User email address"), phone: i3.string().optional().describe("User phone number"), userAgent: i3.string().optional().describe("Browser user agent string"), browser: i3.string().optional().describe("Browser name"), browserVersion: i3.string().optional().describe("Browser version"), deviceType: i3.string().optional().describe("Device type (mobile, desktop, tablet)"), os: i3.string().optional().describe("Operating system"), osVersion: i3.string().optional().describe("Operating system version"), screenSize: i3.string().optional().describe("Screen dimensions"), language: i3.string().optional().describe("User language"), country: i3.string().optional().describe("User country"), region: i3.string().optional().describe("User region/state"), city: i3.string().optional().describe("User city"), zip: i3.string().optional().describe("User postal code"), timezone: i3.string().optional().describe("User timezone"), ip: i3.string().optional().describe("User IP address"), internal: i3.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); - var Vn2 = Dn2.and(i3.object({ source: Sn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: jn2 })).describe("Walker version information"); - var Bn2 = Dn2.and(i3.object({ type: Fn2.describe("Source type identifier"), id: Sn.describe("Source identifier (typically URL on web)"), previous_id: Sn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); - var qn = i3.lazy(() => i3.object({ entity: i3.string().describe("Entity name"), data: Dn2.describe("Entity-specific properties"), nested: i3.array(qn).describe("Nested child entities"), context: Ln2.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); - var Wn = i3.array(qn).describe("Array of nested entities"); - var Kn2 = i3.object({ name: i3.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: Dn2.describe("Event-specific properties"), context: Ln2.describe("Ordered context properties with priorities"), globals: Dn2.describe("Global properties shared across events"), custom: Dn2.describe("Custom implementation-specific properties"), user: Jn.describe("User identification and attributes"), nested: Wn.describe("Related nested entities"), consent: Un2.describe("Consent states at event time"), id: xn2.describe("Unique event identifier (timestamp-based)"), trigger: Sn.describe("Event trigger identifier"), entity: Sn.describe("Parsed entity from event name"), action: Sn.describe("Parsed action from event name"), timestamp: wn.describe("Unix timestamp in milliseconds since epoch"), timing: kn2.describe("Event processing timing information"), group: Sn.describe("Event grouping identifier"), count: Zn2.describe("Event count in session"), version: Vn2.describe("Walker version information"), source: Bn2.describe("Event source information") }).describe("Complete walkerOS event structure"); - var Hn2 = Kn2.partial().describe("Partial event structure with all fields optional"); - var Gn2 = i3.lazy(() => Kn2.deepPartial()).describe("Deep partial event structure with all nested fields optional"); - var Yn = vn2(Kn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); - var Qn2 = vn2(Hn2, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); - var Xn = vn2(Jn, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); - var ea = vn2(Dn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); - var ta = vn2(Ln2, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); - var na = vn2(qn, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); - var aa = vn2(Fn2, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); - var ra = vn2(Un2, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); - _n2({}, { ConfigSchema: () => ha, LoopSchema: () => oa, MapSchema: () => da, PolicySchema: () => la, ResultSchema: () => fa, RuleSchema: () => pa, RulesSchema: () => ma, SetSchema: () => ca, ValueConfigSchema: () => ua, ValueSchema: () => ia, ValuesSchema: () => sa, configJsonSchema: () => wa, loopJsonSchema: () => va, mapJsonSchema: () => _a, policyJsonSchema: () => Sa, ruleJsonSchema: () => ka, rulesJsonSchema: () => xa, setJsonSchema: () => ba, valueConfigJsonSchema: () => ya, valueJsonSchema: () => ga }); - var ia = i3.lazy(() => i3.union([i3.string().describe('String value or property path (e.g., "data.id")'), i3.number().describe("Numeric value"), i3.boolean().describe("Boolean value"), ua, i3.array(ia).describe("Array of values")])); - var sa = i3.array(ia).describe("Array of transformation values"); - var oa = i3.tuple([ia, ia]).describe("Loop transformation: [source, transform] tuple for array processing"); - var ca = i3.array(ia).describe("Set: Array of values for selection or combination"); - var da = i3.record(i3.string(), ia).describe("Map: Object mapping keys to transformation values"); - var ua = i3.object({ key: i3.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: i3.union([i3.string(), i3.number(), i3.boolean()]).optional().describe("Static primitive value"), fn: i3.string().optional().describe("Custom transformation function as string (serialized)"), map: da.optional().describe("Object mapping: transform event data to structured output"), loop: oa.optional().describe("Loop transformation: [source, transform] for array processing"), set: ca.optional().describe("Set of values: combine or select from multiple values"), consent: Un2.optional().describe("Required consent states to include this value"), condition: i3.string().optional().describe("Condition function as string: return true to include value"), validate: i3.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e14) => Object.keys(e14).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); - var la = i3.record(i3.string(), ia).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); - var pa = i3.object({ batch: i3.number().optional().describe("Batch size: bundle N events for batch processing"), condition: i3.string().optional().describe("Condition function as string: return true to process event"), consent: Un2.optional().describe("Required consent states to process this event"), settings: i3.any().optional().describe("Destination-specific settings for this event mapping"), data: i3.union([ia, sa]).optional().describe("Data transformation rules for event"), ignore: i3.boolean().optional().describe("Set to true to skip processing this event"), name: i3.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: la.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); - var ma = i3.record(i3.string(), i3.record(i3.string(), i3.union([pa, i3.array(pa)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); - var ha = i3.object({ consent: Un2.optional().describe("Required consent states to process any events"), data: i3.union([ia, sa]).optional().describe("Global data transformation applied to all events"), mapping: ma.optional().describe("Entity-action specific mapping rules"), policy: la.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); - var fa = i3.object({ eventMapping: pa.optional().describe("Resolved mapping rule for event"), mappingKey: i3.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); - var ga = vn2(ia, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); - var ya = vn2(ua, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); - var va = vn2(oa, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); - var ba = vn2(ca, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); - var _a = vn2(da, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); - var Sa = vn2(la, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); - var ka = vn2(pa, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); - var xa = vn2(ma, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); - var wa = vn2(ha, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); - _n2({}, { BatchSchema: () => Na, ConfigSchema: () => Za, ContextSchema: () => Ta, DLQSchema: () => Ua, DataSchema: () => $a, DestinationPolicySchema: () => Pa, DestinationsSchema: () => za, InitDestinationsSchema: () => Ma, InitSchema: () => Ra, InstanceSchema: () => Ia, PartialConfigSchema: () => ja, PushBatchContextSchema: () => Oa, PushContextSchema: () => Aa, PushEventSchema: () => Ca, PushEventsSchema: () => Ea, PushResultSchema: () => La, RefSchema: () => Da, ResultSchema: () => Fa, batchJsonSchema: () => Wa, configJsonSchema: () => Ja, contextJsonSchema: () => Ba, instanceJsonSchema: () => Ka, partialConfigJsonSchema: () => Va, pushContextJsonSchema: () => qa, resultJsonSchema: () => Ha }); - var Za = i3.object({ consent: Un2.optional().describe("Required consent states to send events to this destination"), settings: i3.any().describe("Implementation-specific configuration").optional(), data: i3.union([ia, sa]).optional().describe("Global data transformation applied to all events for this destination"), env: i3.any().describe("Environment dependencies (platform-specific)").optional(), id: xn2.describe("Destination instance identifier (defaults to destination key)").optional(), init: i3.boolean().describe("Whether to initialize immediately").optional(), loadScript: i3.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: ma.optional().describe("Entity-action specific mapping rules for this destination"), policy: la.optional().describe("Pre-processing policy rules applied before event mapping"), queue: i3.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: i3.boolean().describe("Enable verbose logging for debugging").optional(), onError: An2.optional(), onLog: On2.optional() }).describe("Destination configuration"); - var ja = Za.deepPartial().describe("Partial destination configuration with all fields deeply optional"); - var Pa = la.describe("Destination policy rules for event pre-processing"); - var Ta = i3.object({ collector: i3.any().describe("Collector instance (runtime object)"), config: Za.describe("Destination configuration"), data: i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))]).optional().describe("Transformed event data"), env: i3.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); - var Aa = Ta.extend({ mapping: pa.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); - var Oa = Aa.describe("Batch push context with event-specific mapping"); - var Ca = i3.object({ event: Kn2.describe("The event to process"), mapping: pa.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); - var Ea = i3.array(Ca).describe("Array of events with mappings"); - var Na = i3.object({ key: i3.string().describe('Batch key (usually mapping key like "product.view")'), events: i3.array(Kn2).describe("Array of events in batch"), data: i3.array(i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))])).describe("Transformed data for each event"), mapping: pa.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); - var $a = i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); - var Ia = i3.object({ config: Za.describe("Destination configuration"), queue: i3.array(Kn2).optional().describe("Queued events awaiting consent"), dlq: i3.array(i3.tuple([Kn2, i3.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: i3.string().optional().describe("Destination type identifier"), env: i3.any().optional().describe("Environment dependencies"), init: i3.any().optional().describe("Initialization function"), push: i3.any().describe("Push function for single events"), pushBatch: i3.any().optional().describe("Batch push function"), on: i3.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); - var Ra = i3.object({ code: Ia.describe("Destination instance with implementation"), config: ja.optional().describe("Partial configuration overrides"), env: i3.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); - var Ma = i3.record(i3.string(), Ra).describe("Map of destination IDs to initialization configurations"); - var za = i3.record(i3.string(), Ia).describe("Map of destination IDs to runtime instances"); - var Da = i3.object({ id: i3.string().describe("Destination ID"), destination: Ia.describe("Destination instance") }).describe("Destination reference (ID + instance)"); - var La = i3.object({ queue: i3.array(Kn2).optional().describe("Events queued (awaiting consent)"), error: i3.any().optional().describe("Error if push failed") }).describe("Push operation result"); - var Fa = i3.object({ successful: i3.array(Da).describe("Destinations that processed successfully"), queued: i3.array(Da).describe("Destinations that queued events"), failed: i3.array(Da).describe("Destinations that failed to process") }).describe("Overall destination processing result"); - var Ua = i3.array(i3.tuple([Kn2, i3.any()])).describe("Dead letter queue: [(event, error), ...]"); - var Ja = vn2(Za, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); - var Va = vn2(ja, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); - var Ba = vn2(Ta, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); - var qa = vn2(Aa, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); - var Wa = vn2(Na, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); - var Ka = vn2(Ia, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); - var Ha = vn2(Fa, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); - _n2({}, { CommandTypeSchema: () => Ga, ConfigSchema: () => Ya, DestinationsSchema: () => nr, InitConfigSchema: () => Xa, InstanceSchema: () => ar, PushContextSchema: () => er, SessionDataSchema: () => Qa, SourcesSchema: () => tr, commandTypeJsonSchema: () => rr, configJsonSchema: () => ir, initConfigJsonSchema: () => or, instanceJsonSchema: () => dr, pushContextJsonSchema: () => cr, sessionDataJsonSchema: () => sr }); - var Ga = i3.union([i3.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), i3.string()]).describe("Collector command type: standard commands or custom string for extensions"); - var Ya = i3.object({ run: i3.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: jn2, globalsStatic: Dn2.describe("Static global properties that persist across collector runs"), sessionStatic: i3.record(i3.any()).describe("Static session data that persists across collector runs"), verbose: i3.boolean().describe("Enable verbose logging for debugging"), onError: An2.optional(), onLog: On2.optional() }).describe("Core collector configuration"); - var Qa = Dn2.and(i3.object({ isStart: i3.boolean().describe("Whether this is a new session start"), storage: i3.boolean().describe("Whether storage is available"), id: xn2.describe("Session identifier").optional(), start: wn.describe("Session start timestamp").optional(), marketing: i3.literal(true).optional().describe("Marketing attribution flag"), updated: wn.describe("Last update timestamp").optional(), isNew: i3.boolean().describe("Whether this is a new session").optional(), device: xn2.describe("Device identifier").optional(), count: Zn2.describe("Event count in session").optional(), runs: Zn2.describe("Number of runs").optional() })).describe("Session state and tracking data"); - var Xa = Ya.partial().extend({ consent: Un2.optional().describe("Initial consent state"), user: Jn.optional().describe("Initial user data"), globals: Dn2.optional().describe("Initial global properties"), sources: i3.any().optional().describe("Source configurations"), destinations: i3.any().optional().describe("Destination configurations"), custom: Dn2.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); - var er = i3.object({ mapping: ha.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); - var tr = i3.record(i3.string(), i3.any()).describe("Map of source IDs to source instances"); - var nr = i3.record(i3.string(), i3.any()).describe("Map of destination IDs to destination instances"); - var ar = i3.object({ push: i3.any().describe("Push function for processing events"), command: i3.any().describe("Command function for walker commands"), allowed: i3.boolean().describe("Whether event processing is allowed"), config: Ya.describe("Current collector configuration"), consent: Un2.describe("Current consent state"), count: i3.number().describe("Event count (increments with each event)"), custom: Dn2.describe("Custom implementation-specific properties"), sources: tr.describe("Registered source instances"), destinations: nr.describe("Registered destination instances"), globals: Dn2.describe("Current global properties"), group: i3.string().describe("Event grouping identifier"), hooks: i3.any().describe("Lifecycle hook functions"), on: i3.any().describe("Event lifecycle configuration"), queue: i3.array(Kn2).describe("Queued events awaiting processing"), round: i3.number().describe("Collector run count (increments with each run)"), session: i3.union([i3.undefined(), Qa]).describe("Current session state"), timing: i3.number().describe("Event processing timing information"), user: Jn.describe("Current user data"), version: i3.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); - var rr = vn2(Ga, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); - var ir = vn2(Ya, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); - var sr = vn2(Qa, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); - var or = vn2(Xa, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); - var cr = vn2(er, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); - var dr = vn2(ar, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); - _n2({}, { BaseEnvSchema: () => ur, ConfigSchema: () => lr, InitSchema: () => hr, InitSourceSchema: () => fr, InitSourcesSchema: () => gr, InstanceSchema: () => mr, PartialConfigSchema: () => pr, baseEnvJsonSchema: () => yr, configJsonSchema: () => vr, initSourceJsonSchema: () => Sr, initSourcesJsonSchema: () => kr, instanceJsonSchema: () => _r, partialConfigJsonSchema: () => br }); - var ur = i3.object({ push: i3.any().describe("Collector push function"), command: i3.any().describe("Collector command function"), sources: i3.any().optional().describe("Map of registered source instances"), elb: i3.any().describe("Public API function (alias for collector.push)") }).catchall(i3.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); - var lr = ha.extend({ settings: i3.any().describe("Implementation-specific configuration").optional(), env: ur.optional().describe("Environment dependencies (platform-specific)"), id: xn2.describe("Source identifier (defaults to source key)").optional(), onError: An2.optional(), disabled: i3.boolean().describe("Set to true to disable").optional(), primary: i3.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); - var pr = lr.deepPartial().describe("Partial source configuration with all fields deeply optional"); - var mr = i3.object({ type: i3.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: lr.describe("Current source configuration"), push: i3.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: i3.any().optional().describe("Cleanup function called when source is removed"), on: i3.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); - var hr = i3.any().describe("Source initialization function: (config, env) => Instance | Promise"); - var fr = i3.object({ code: hr.describe("Source initialization function"), config: pr.optional().describe("Partial configuration overrides"), env: ur.partial().optional().describe("Partial environment overrides"), primary: i3.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); - var gr = i3.record(i3.string(), fr).describe("Map of source IDs to initialization configurations"); - var yr = vn2(ur, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); - var vr = vn2(lr, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); - var br = vn2(pr, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); - var _r = vn2(mr, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); - var Sr = vn2(fr, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); - var kr = vn2(gr, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); - function xr(e14) { - return vn2(e14, { target: "jsonSchema7", $refStrategy: "none" }); - } - var wr = { merge: true, shallow: true, extend: true }; - function Zr(e14, t12 = {}, n5 = {}) { - n5 = { ...wr, ...n5 }; - const a5 = Object.entries(t12).reduce((t13, [a6, r3]) => { - const i4 = e14[a6]; - return n5.merge && Array.isArray(i4) && Array.isArray(r3) ? t13[a6] = r3.reduce((e15, t14) => e15.includes(t14) ? e15 : [...e15, t14], [...i4]) : (n5.extend || a6 in e14) && (t13[a6] = r3), t13; - }, {}); - return n5.shallow ? { ...e14, ...a5 } : (Object.assign(e14, a5), e14); - } - function jr(e14 = "entity action", t12 = {}) { - const n5 = t12.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), a5 = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, r3 = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } }; - return function(e15 = {}) { - var t13; - const n6 = e15.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), a6 = e15.group || "gr0up", r4 = e15.count || 1, i4 = Zr({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${n6}-${a6}-${r4}`, trigger: "test", entity: "entity", action: "action", timestamp: n6, timing: 3.14, group: a6, count: r4, version: { source: "0.3.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e15, { merge: false }); - if (e15.name) { - const [n7, a7] = null != (t13 = e15.name.split(" ")) ? t13 : []; - n7 && a7 && (i4.entity = n7, i4.action = a7); - } - return i4; - }({ ...{ "cart view": { data: { currency: "EUR", value: 2 * a5.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...a5.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: a5.data.price + r3.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...a5, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...r3, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...a5, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...r3, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.elbwalker.com/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...a5, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...a5, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...a5.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n5, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e14], ...t12, name: e14 }); - } - function Pr(e14, t12, n5) { - return function(...a5) { - try { - return e14(...a5); - } catch (e15) { - if (!t12) - return; - return t12(e15); - } finally { - null == n5 || n5(); - } - }; - } - function Tr(e14) { - return void 0 === e14 || /* @__PURE__ */ function(e15, t12) { - return typeof e15 == typeof t12; - }(e14, "") ? e14 : JSON.stringify(e14); - } - function Ar(e14 = {}) { - return Zr({ "Content-Type": "application/json; charset=utf-8" }, e14); - } - function Or(e14, t12, n5 = { transport: "fetch" }) { - switch (n5.transport || "fetch") { - case "beacon": - return function(e15, t13) { - const n6 = Tr(t13), a5 = navigator.sendBeacon(e15, n6); - return { ok: a5, error: a5 ? void 0 : "Failed to send beacon" }; - }(e14, t12); - case "xhr": - return function(e15, t13, n6 = {}) { - const a5 = Ar(n6.headers), r3 = n6.method || "POST", i4 = Tr(t13); - return Pr(() => { - const t14 = new XMLHttpRequest(); - t14.open(r3, e15, false); - for (const e16 in a5) - t14.setRequestHeader(e16, a5[e16]); - t14.send(i4); - const n7 = t14.status >= 200 && t14.status < 300; - return { ok: n7, data: Pr(JSON.parse, () => t14.response)(t14.response), error: n7 ? void 0 : `${t14.status} ${t14.statusText}` }; - }, (e16) => ({ ok: false, error: e16.message }))(); - }(e14, t12, n5); - default: - return async function(e15, t13, n6 = {}) { - const a5 = Ar(n6.headers), r3 = Tr(t13); - return (/* @__PURE__ */ function(e16, t14, n7) { - return async function(...a6) { - try { - return await e16(...a6); - } catch (e17) { - if (!t14) - return; - return await t14(e17); - } finally { - await (null == n7 ? void 0 : n7()); - } - }; - }(async () => { - const t14 = await fetch(e15, { method: n6.method || "POST", headers: a5, keepalive: true, credentials: n6.credentials || "same-origin", mode: n6.noCors ? "no-cors" : "cors", body: r3 }), i4 = n6.noCors ? "" : await t14.text(); - return { ok: t14.ok, data: i4, error: t14.ok ? void 0 : t14.statusText }; - }, (e16) => ({ ok: false, error: e16.message })))(); - }(e14, t12, n5); - } - } - var Er = {}; - r2(Er, { env: () => Nr, events: () => Rr, mapping: () => zr }); - var Nr = {}; - r2(Nr, { init: () => $r, push: () => Ir }); - var $r = { sendWeb: void 0 }; - var Ir = { sendWeb: Object.assign(() => { - }, {}) }; - var Rr = {}; - function Mr() { - const e14 = jr("entity action"); - return JSON.stringify(e14.data); - } - r2(Rr, { entity_action: () => Mr }); - var zr = {}; - r2(zr, { config: () => Lr, entity_action: () => Dr }); - var Dr = { data: "data" }; - var Lr = { entity: { action: Dr } }; - var Fr = {}; - r2(Fr, { MappingSchema: () => Jr, SettingsSchema: () => Ur, mapping: () => Br, settings: () => Vr }); - var Ur = i3.object({ url: i3.string().url().describe("The HTTP endpoint URL to send events to (like https://api.example.com/events)"), headers: i3.record(i3.string()).describe("Additional HTTP headers to include with requests (like { 'Authorization': 'Bearer token', 'Content-Type': 'application/json' })").optional(), method: i3.string().default("POST").describe("HTTP method for the request"), transform: i3.any().describe("Function to transform event data before sending (like (data, config, mapping) => JSON.stringify(data))").optional(), transport: i3.enum(["fetch", "xhr", "beacon"]).default("fetch").describe("Transport method for sending requests") }); - var Jr = i3.object({}); - var Vr = xr(Ur); - var Br = xr(Jr); - var qr = { type: "api", config: {}, push(e14, { config: t12, mapping: n5, data: a5, env: r3 }) { - const { settings: i4 } = t12, { url: s5, headers: o4, method: c3, transform: d2, transport: u3 = "fetch" } = i4 || {}; - if (!s5) - return; - const l3 = void 0 !== a5 ? a5 : e14; - const p2 = d2 ? d2(l3, t12, n5) : JSON.stringify(l3); - ((null == r3 ? void 0 : r3.sendWeb) || Or)(s5, p2, { headers: o4, method: c3, transport: u3 }); - } }; - - // entry.js - async function entry_default(context = {}) { - const { tracker } = context; - const __simulationTracker = tracker; - const window = typeof globalThis.window !== "undefined" ? globalThis.window : void 0; - const document2 = typeof globalThis.document !== "undefined" ? globalThis.document : void 0; - const config = { - sources: { - demo: { - code: c, - config: { - settings: { - events: [ - { - name: "page view", - data: { - title: "Home", - path: "/" - }, - delay: 0 - }, - { - name: "product view", - data: { - id: "P123", - name: "Test Product", - price: 99.99 - }, - delay: 100 - } - ] - } - } - } - }, - destinations: { - demo: { - code: g, - config: { - settings: { - name: "demo" - } - } - }, - api: { - code: qr, - config: { - settings: { - url: "http://localhost:8080/collect" - } - } - } - }, - ...{ - run: true, - globals: { - language: "en" - } - } - }; - const result = await T2(config); - return result; - } - return __toCommonJS(entry_exports); -})(); -//# sourceMappingURL=web-serve.mjs.map diff --git a/packages/cli/examples/web-tracking.json b/packages/cli/examples/web-tracking.json deleted file mode 100644 index 2fb61bd40..000000000 --- a/packages/cli/examples/web-tracking.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "flow": { - "platform": "web", - "sources": { - "browser": { - "code": "sourceBrowser", - "config": { - "settings": { - "pageview": true, - "session": true - } - } - } - }, - "destinations": { - "api": { - "code": "destinationAPI", - "config": { - "settings": { - "url": "http://localhost:8080/collect", - "method": "POST", - "transport": "fetch" - } - } - }, - "gtag": { - "code": "destinationGtag", - "config": { - "settings": { - "ga4": { - "measurementId": "${GA4_MEASUREMENT_ID:G-XXXXXXXXXX}" - } - }, - "mapping": { - "page": { - "view": { - "name": "page_view", - "data": { - "map": { - "page_title": "data.title", - "page_location": "data.url", - "page_path": "data.path" - } - } - } - }, - "product": { - "view": { - "name": "view_item", - "data": { - "map": { - "currency": { "value": "USD" }, - "value": "data.price", - "items": { - "loop": [ - "data", - { - "map": { - "item_id": "id", - "item_name": "name", - "price": "price" - } - } - ] - } - } - } - }, - "add": { - "name": "add_to_cart", - "data": { - "map": { - "currency": { "value": "USD" }, - "value": "data.price", - "items": { - "loop": [ - "data", - { - "map": { - "item_id": "id", - "item_name": "name", - "price": "price", - "quantity": "quantity" - } - } - ] - } - } - } - } - }, - "order": { - "complete": { - "name": "purchase", - "data": { - "map": { - "transaction_id": "data.id", - "currency": { "value": "USD" }, - "value": "data.total", - "items": { - "loop": [ - "nested.product", - { - "map": { - "item_id": "data.id", - "item_name": "data.name", - "price": "data.price", - "quantity": "data.quantity" - } - } - ] - } - } - } - } - } - } - } - }, - "meta": { - "code": "destinationMeta", - "config": { - "settings": { - "pixelId": "${META_PIXEL_ID:123456789}", - "testEventCode": "${META_TEST_CODE}" - }, - "mapping": { - "page": { - "view": { - "name": "PageView" - } - }, - "product": { - "view": { - "name": "ViewContent", - "data": { - "map": { - "content_ids": { - "loop": ["data.id"] - }, - "content_type": { "value": "product" }, - "value": "data.price", - "currency": { "value": "USD" } - } - } - }, - "add": { - "name": "AddToCart", - "data": { - "map": { - "content_ids": { - "loop": ["data.id"] - }, - "content_type": { "value": "product" }, - "value": "data.price", - "currency": { "value": "USD" } - } - } - } - }, - "order": { - "complete": { - "name": "Purchase", - "data": { - "map": { - "content_ids": { - "loop": [ - "nested.product", - { - "map": { - "id": "data.id" - } - } - ] - }, - "content_type": { "value": "product" }, - "value": "data.total", - "currency": { "value": "USD" } - } - } - } - } - } - } - }, - "demo": { - "code": "destinationDemo", - "config": { - "settings": { - "name": "Browser Tracking Demo", - "values": ["name", "data", "user", "globals"] - } - } - } - }, - "collector": { - "run": true, - "globals": { - "language": "en", - "currency": "USD" - } - } - }, - "build": { - "packages": { - "@walkeros/collector": { - "version": "latest", - "imports": ["startFlow"] - }, - "@walkeros/web-source-browser": { - "version": "latest", - "imports": ["sourceBrowser"] - }, - "@walkeros/web-destination-api": { - "version": "latest", - "imports": ["destinationAPI"] - }, - "@walkeros/web-destination-gtag": { - "version": "latest", - "imports": ["destinationGtag"] - }, - "@walkeros/web-destination-meta": { - "version": "latest", - "imports": ["destinationMeta"] - }, - "@walkeros/destination-demo": { - "version": "latest", - "imports": ["destinationDemo"] - } - }, - "code": "// Web tracking with browser source and multiple destinations\n", - "minify": false, - "globalName": "walkerOS", - "output": "./dist/web-tracking.js", - "template": "templates/base.hbs" - } -} diff --git a/packages/cli/jest.config.mjs b/packages/cli/jest.config.mjs index 2b6afee94..43cbc481a 100644 --- a/packages/cli/jest.config.mjs +++ b/packages/cli/jest.config.mjs @@ -12,6 +12,8 @@ const config = { // requires spdx-license-ids and spdx-exceptions JSON modules, which Jest cannot resolve by default moduleNameMapper: { ...baseConfig.moduleNameMapper, + // ESM: Map .js imports to .ts files for Jest (TypeScript source files use .js extensions for Node.js ESM) + '^(\\.{1,2}/.*)\\.js$': '$1', '^spdx-license-ids$': '/../../node_modules/spdx-license-ids/index.json', '^spdx-license-ids/deprecated$': diff --git a/packages/cli/package.json b/packages/cli/package.json index a869e1a68..38d95bf2e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@walkeros/cli", - "version": "0.3.1", + "version": "0.4.1", "description": "walkerOS CLI - Bundle and deploy walkerOS components", "license": "MIT", "type": "module", @@ -18,6 +18,7 @@ "files": [ "dist/**", "templates/**", + "examples/**", "README.md", "CHANGELOG.md" ], @@ -27,21 +28,22 @@ "start": "node dist/index.js", "test": "jest --colors", "lint": "tsc && eslint \"src/**/*.ts*\"", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf coverage && rm -rf .temp", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf coverage && rm -rf .temp && rm -rf .tmp", "docker:build": "bash scripts/build-docker.sh", - "docker:test": "docker run --rm walkeros/cli:latest --version" + "docker:test": "bash scripts/test-docker.sh", + "docker:publish": "bash scripts/publish-docker.sh" }, "dependencies": { - "@walkeros/core": "^0.3.1", + "@walkeros/core": "^0.4.1", "@walkeros/docker": "*", + "@walkeros/server-core": "*", "chalk": "^5.3.0", "commander": "^11.0.0", "esbuild": "^0.19.0", "fs-extra": "^11.0.0", "handlebars": "^4.7.8", "jsdom": "^22.1.0", - "pacote": "^17.0.0", - "zod": "^3.23.8" + "pacote": "^17.0.0" }, "devDependencies": { "@types/fs-extra": "^11.0.0", diff --git a/packages/cli/scripts/publish-docker.sh b/packages/cli/scripts/publish-docker.sh new file mode 100755 index 000000000..f155e0a04 --- /dev/null +++ b/packages/cli/scripts/publish-docker.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# Publish WalkerOS CLI Docker image to Docker Hub +set -e + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${BLUE}=== Publishing WalkerOS CLI Docker Image ===${NC}\n" + +# Get version from package.json +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CLI_DIR="$(dirname "$SCRIPT_DIR")" +VERSION=$(node -p "require('${CLI_DIR}/package.json').version") + +echo -e "${BLUE}CLI Version: ${VERSION}${NC}" +echo -e "${BLUE}Publishing to Docker Hub...${NC}\n" + +# Configuration +IMAGE_NAME="walkeros/cli" +TAGS=("${VERSION}" "latest") + +# Step 1: Build +echo -e "${BLUE}[1/4] Building Docker image...${NC}" +bash "${SCRIPT_DIR}/build-docker.sh" +echo "" + +# Step 2: Test +echo -e "${BLUE}[2/4] Testing Docker image...${NC}" +bash "${SCRIPT_DIR}/test-docker.sh" "${IMAGE_NAME}" "latest" +echo "" + +# Step 3: Tag +echo -e "${BLUE}[3/4] Tagging images...${NC}" +for TAG in "${TAGS[@]}"; do + FULL_TAG="${IMAGE_NAME}:${TAG}" + echo -e "${BLUE}Tagging as ${FULL_TAG}...${NC}" + docker tag "${IMAGE_NAME}:latest" "${FULL_TAG}" + echo -e "${GREEN}✓ Tagged ${FULL_TAG}${NC}" +done +echo "" + +# Step 4: Push +echo -e "${BLUE}[4/4] Pushing to Docker Hub...${NC}" +echo -e "${YELLOW}Note: Make sure you're logged in with 'docker login'${NC}\n" + +for TAG in "${TAGS[@]}"; do + FULL_TAG="${IMAGE_NAME}:${TAG}" + echo -e "${BLUE}Pushing ${FULL_TAG}...${NC}" + + if docker push "${FULL_TAG}"; then + echo -e "${GREEN}✓ Pushed ${FULL_TAG}${NC}\n" + else + echo -e "${RED}✗ Failed to push ${FULL_TAG}${NC}" + echo -e "${RED}Make sure you're logged in to Docker Hub${NC}" + exit 1 + fi +done + +# Success +echo -e "${GREEN}=== Publish Complete! ===${NC}" +echo -e "${GREEN}Published images:${NC}" +for TAG in "${TAGS[@]}"; do + echo -e " ${IMAGE_NAME}:${TAG}" +done +echo "" +echo -e "${BLUE}View on Docker Hub: https://hub.docker.com/r/${IMAGE_NAME}${NC}" diff --git a/packages/cli/scripts/test-docker.sh b/packages/cli/scripts/test-docker.sh new file mode 100755 index 000000000..804ca6dfe --- /dev/null +++ b/packages/cli/scripts/test-docker.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# Test WalkerOS CLI Docker image +set -e + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${BLUE}=== Testing WalkerOS CLI Docker Image ===${NC}\n" + +# Configuration +IMAGE_NAME="${1:-walkeros/cli}" +IMAGE_TAG="${2:-latest}" +FULL_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}" + +echo -e "${BLUE}Testing image: ${FULL_IMAGE}${NC}\n" + +# Test 1: Version check +echo -e "${BLUE}[1/4] Testing version command...${NC}" +if VERSION=$(docker run --rm "${FULL_IMAGE}" --version 2>&1); then + echo -e "${GREEN}✓ Version check passed: ${VERSION}${NC}\n" +else + echo -e "${RED}✗ Version check failed${NC}" + exit 1 +fi + +# Test 2: Help command +echo -e "${BLUE}[2/4] Testing help command...${NC}" +if docker run --rm "${FULL_IMAGE}" --help > /dev/null 2>&1; then + echo -e "${GREEN}✓ Help command works${NC}\n" +else + echo -e "${RED}✗ Help command failed${NC}" + exit 1 +fi + +# Test 3: Bundle command with example config +echo -e "${BLUE}[3/4] Testing bundle command with built-in examples...${NC}" +TEST_DIR=$(mktemp -d) +trap "rm -rf ${TEST_DIR}" EXIT + +# Copy example config to workspace (output paths resolve relative to config location) +docker run --rm \ + --entrypoint sh \ + -v "${TEST_DIR}:/workspace" \ + "${FULL_IMAGE}" \ + -c "cp /cli/examples/server-collect.json /workspace/" > /dev/null 2>&1 + +if docker run --rm \ + --user "$(id -u):$(id -g)" \ + -v "${TEST_DIR}:/workspace" \ + -w /workspace \ + "${FULL_IMAGE}" \ + bundle server-collect.json \ + --stats > /dev/null 2>&1; then + + # Check if output file was created (output resolves relative to config in workspace) + if [ -f "${TEST_DIR}/server-collect.mjs" ]; then + BUNDLE_SIZE=$(stat -f%z "${TEST_DIR}/server-collect.mjs" 2>/dev/null || stat -c%s "${TEST_DIR}/server-collect.mjs") + echo -e "${GREEN}✓ Bundle created successfully (${BUNDLE_SIZE} bytes)${NC}\n" + else + echo -e "${RED}✗ Bundle file not created${NC}" + exit 1 + fi +else + echo -e "${RED}✗ Bundle command failed${NC}" + exit 1 +fi + +# Test 4: Simulate command +echo -e "${BLUE}[4/4] Testing simulate command...${NC}" +EVENT='{"name":"page view","data":{"title":"Test"}}' +if docker run --rm \ + --user "$(id -u):$(id -g)" \ + -v "${TEST_DIR}:/workspace" \ + -w /workspace \ + "${FULL_IMAGE}" \ + simulate server-collect.mjs \ + --event "${EVENT}" \ + --json > /dev/null 2>&1; then + echo -e "${GREEN}✓ Simulate command works${NC}\n" +else + echo -e "${YELLOW}⚠ Simulate command failed (may be expected with mocked packages)${NC}\n" +fi + +# Success +echo -e "${GREEN}=== All Tests Passed! ===${NC}" +echo -e "${GREEN}CLI Docker image ${FULL_IMAGE} is ready to use.${NC}\n" + +# Show image info +echo -e "${BLUE}Image Details:${NC}" +docker images "${IMAGE_NAME}" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" diff --git a/packages/cli/src/__tests__/bundle/bundler-helpers.test.ts b/packages/cli/src/__tests__/bundle/bundler-helpers.test.ts new file mode 100644 index 000000000..24fca3d8a --- /dev/null +++ b/packages/cli/src/__tests__/bundle/bundler-helpers.test.ts @@ -0,0 +1,344 @@ +import type { Flow } from '@walkeros/core'; +import type { BuildOptions } from '../../types/bundle.js'; + +// Import helper functions - we need to access them for testing +// Since they're not exported, we'll test through createEntryPoint's behavior +// Or we can temporarily export them for testing +// For now, let's create focused unit tests for each logical section + +describe('Bundler Helper Functions', () => { + describe('detectDestinationPackages', () => { + it('should detect destination packages with explicit package field', () => { + const flowConfig: Flow.Config = { + destinations: { + gtag: { + package: '@walkeros/web-destination-gtag', + config: {}, + }, + api: { + package: '@walkeros/web-destination-api', + config: {}, + }, + }, + } as unknown as Flow.Config; + + // We'll need to export the helper or test indirectly + // For this test file, we're documenting expected behavior + expect(flowConfig.destinations).toBeDefined(); + }); + + it('should skip destinations without package field', () => { + const flowConfig: Flow.Config = { + destinations: { + custom: { + // No package field + config: {}, + }, + }, + } as unknown as Flow.Config; + + expect(flowConfig.destinations).toBeDefined(); + }); + + it('should handle empty destinations', () => { + const flowConfig: Flow.Config = {} as Flow.Config; + expect(flowConfig.destinations).toBeUndefined(); + }); + }); + + describe('generateImportStatements', () => { + it('should generate default imports', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/core': { + imports: ['default as walkerCore'], + }, + }; + + // Expected output: + // import walkerCore from '@walkeros/core'; + expect(packages).toBeDefined(); + }); + + it('should generate named imports', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/core': { + imports: ['getId', 'trim'], + }, + }; + + // Expected output: + // import { getId, trim } from '@walkeros/core'; + expect(packages).toBeDefined(); + }); + + it('should generate namespace import when no imports specified', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/core': {}, + }; + + // Expected output: + // import * as _walkerosCore from '@walkeros/core'; // Consider specifying explicit imports + expect(packages).toBeDefined(); + }); + + it('should handle examples imports', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/web-destination-gtag': { + imports: ['examples as gtagExamples', 'destinationGtag'], + }, + }; + + // Expected output: + // import { destinationGtag } from '@walkeros/web-destination-gtag'; + // Example mapping: gtag: typeof gtagExamples !== 'undefined' ? gtagExamples : undefined + expect(packages).toBeDefined(); + }); + + it('should auto-import examples for destination packages', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/web-destination-gtag': { + imports: ['destinationGtag'], + }, + }; + const destinationPackages = new Set(['@walkeros/web-destination-gtag']); + + // Expected output: + // import { examples as gtag_examples } from '@walkeros/web-destination-gtag/dev'; + // Example mapping: gtag: gtag_examples + expect(destinationPackages.has('@walkeros/web-destination-gtag')).toBe( + true, + ); + }); + + it('should handle demo packages differently for examples', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/web-destination-gtag-demo': { + imports: [], + }, + }; + + // Expected output for demo packages: + // import { examples as gtag_demo_examples } from '@walkeros/web-destination-gtag-demo'; + // (not from /dev subpath) + expect(packages).toBeDefined(); + }); + + it('should remove duplicate imports', () => { + const packages: BuildOptions['packages'] = { + '@walkeros/core': { + imports: ['getId', 'getId', 'trim'], + }, + }; + + // Should deduplicate to: import { getId, trim } from '@walkeros/core'; + expect(packages).toBeDefined(); + }); + }); + + describe('processTemplate', () => { + it('should return code directly when no template', async () => { + const flowConfig: Flow.Config = {} as Flow.Config; + const buildOptions = { + code: 'console.log("test");', + template: undefined, + } as unknown as BuildOptions; + + // Expected: returns code as-is + expect(buildOptions.template).toBeUndefined(); + expect(buildOptions.code).toBe('console.log("test");'); + }); + + it('should process template when configured', async () => { + const flowConfig: Flow.Config = { + sources: {}, + destinations: {}, + collector: {}, + } as unknown as Flow.Config; + + const buildOptions = { + code: 'custom code', + template: 'flow-template', + } as unknown as BuildOptions; + + // Expected: calls TemplateEngine.process with all parameters + expect(buildOptions.template).toBe('flow-template'); + }); + + it('should handle empty code', async () => { + const flowConfig: Flow.Config = {} as Flow.Config; + const buildOptions = { + code: undefined, + template: undefined, + } as unknown as BuildOptions; + + // Expected: returns empty string + expect(buildOptions.code).toBeUndefined(); + }); + }); + + describe('wrapCodeForFormat', () => { + it('should not wrap code when template is used', () => { + const code = 'const flow = startFlow();'; + const format = 'esm'; + const hasTemplate = true; + + // Expected: returns code as-is + expect(hasTemplate).toBe(true); + }); + + it('should wrap ESM code without exports', () => { + const code = 'const flow = startFlow();'; + const format = 'esm'; + const hasTemplate = false; + + // Expected: export default const flow = startFlow(); + expect(format).toBe('esm'); + expect(hasTemplate).toBe(false); + expect(code).not.toMatch(/^\s*export\s/m); + }); + + it('should not wrap ESM code that already has exports', () => { + const code = 'export const flow = startFlow();'; + const format = 'esm'; + const hasTemplate = false; + + // Expected: returns code as-is (already has export) + expect(code).toMatch(/^\s*export\s/m); + }); + + it('should not wrap non-ESM formats', () => { + const code = 'const flow = startFlow();'; + const format = 'cjs'; + const hasTemplate = false; + + // Expected: returns code as-is + expect(format).toBe('cjs'); + }); + + it('should not wrap IIFE format', () => { + const code = 'const flow = startFlow();'; + const format = 'iife'; + const hasTemplate = false; + + // Expected: returns code as-is + expect(format).toBe('iife'); + }); + }); + + describe('assembleFinalCode', () => { + it('should combine imports, examples, and code', () => { + const importStatements = [ + "import { getId } from '@walkeros/core';", + "import { startFlow } from '@walkeros/collector';", + ]; + const examplesObject = + 'const examples = {\n gtag: gtag_examples\n};\n\n'; + const wrappedCode = 'export default startFlow();'; + const format = 'esm'; + + // Expected: imports + examples + code + expect(importStatements).toHaveLength(2); + expect(examplesObject).toContain('const examples'); + expect(wrappedCode).toContain('export default'); + }); + + it('should handle empty imports', () => { + const importStatements: string[] = []; + const examplesObject = ''; + const wrappedCode = 'export default startFlow();'; + const format = 'esm'; + + // Expected: just the code + expect(importStatements).toHaveLength(0); + }); + + it('should add examples export for ESM with examples', () => { + const importStatements = ["import { getId } from '@walkeros/core';"]; + const examplesObject = + 'const examples = {\n gtag: gtag_examples\n};\n\n'; + const wrappedCode = 'export default startFlow();'; + const format = 'esm'; + + // Expected to include: export { examples }; + expect(format).toBe('esm'); + expect(examplesObject).toContain('const examples'); + }); + + it('should not add examples export for non-ESM formats', () => { + const importStatements = ["import { getId } from '@walkeros/core';"]; + const examplesObject = + 'const examples = {\n gtag: gtag_examples\n};\n\n'; + const wrappedCode = 'startFlow();'; + const format = 'cjs'; + + // Should not include: export { examples }; + expect(format).not.toBe('esm'); + }); + + it('should not add examples export when no examples', () => { + const importStatements = ["import { getId } from '@walkeros/core';"]; + const examplesObject = ''; + const wrappedCode = 'export default startFlow();'; + const format = 'esm'; + + // Should not include: export { examples }; + expect(examplesObject).toBe(''); + }); + + it('should handle multiple import statements', () => { + const importStatements = [ + "import walkerCore from '@walkeros/core';", + "import { getId, trim } from '@walkeros/core';", + "import { startFlow } from '@walkeros/collector';", + ]; + const examplesObject = ''; + const wrappedCode = 'export default startFlow();'; + const format = 'esm'; + + // Expected: all imports joined with newlines + expect(importStatements).toHaveLength(3); + }); + }); + + describe('Integration: createEntryPoint refactored behavior', () => { + it('should maintain backward compatibility with original implementation', () => { + // This test documents that the refactored version should produce + // identical output to the original 189-line implementation + // The helper extraction is purely for maintainability and testability + + const flowConfig: Flow.Config = { + destinations: { + gtag: { + package: '@walkeros/web-destination-gtag', + }, + }, + } as unknown as Flow.Config; + + const buildOptions = { + packages: { + '@walkeros/core': { + imports: ['getId'], + }, + '@walkeros/web-destination-gtag': { + imports: ['destinationGtag', 'examples as gtagExamples'], + }, + }, + code: 'export const flow = startFlow();', + template: undefined, + format: 'esm' as const, + platform: 'browser' as const, + } as unknown as BuildOptions; + + // The refactored createEntryPoint should: + // 1. Detect @walkeros/web-destination-gtag as a destination package + // 2. Generate imports for @walkeros/core and gtag destination + // 3. Create examples object with gtag mapping + // 4. Process code (no template, so return as-is) + // 5. Wrap code (ESM, already has export, so no wrapping) + // 6. Assemble: imports + examples + code + export { examples } + + expect(buildOptions.format).toBe('esm'); + expect(flowConfig.destinations).toBeDefined(); + }); + }); +}); diff --git a/packages/cli/src/__tests__/bundle/bundler-integration.test.ts b/packages/cli/src/__tests__/bundle/bundler-integration.test.ts deleted file mode 100644 index 7a3fa5f3f..000000000 --- a/packages/cli/src/__tests__/bundle/bundler-integration.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -import fs from 'fs-extra'; -import path from 'path'; -import { bundleCore as bundle } from '../../commands/bundle/bundler'; -import { parseBundleConfig } from '../../config'; -import { createLogger, type Logger } from '../../core'; -import { getId } from '@walkeros/core'; - -describe('Bundler Integration', () => { - const testOutputDir = path.resolve( - '.tmp', - `bundler-integration-${Date.now()}-${getId()}`, - ); - let logger: Logger; - - beforeEach(async () => { - // Ensure test output directory exists - await fs.ensureDir(testOutputDir); - // Create a silent logger for tests - logger = createLogger({ silent: true }); - // Mock console.log to suppress output during tests - jest.spyOn(console, 'log').mockImplementation(() => {}); - }); - - afterEach(async () => { - // Clean up test output - await fs.remove(testOutputDir); - // Restore console.log - jest.restoreAllMocks(); - }); - - it('should handle configuration parsing correctly', async () => { - const rawConfig = { - flow: { - platform: 'web' as const, - }, - build: { - packages: { - '@walkeros/core': { - imports: ['getId'], - }, - }, - code: 'export const test = getId(8);', - platform: 'browser' as const, - format: 'esm' as const, - output: path.join(testOutputDir, 'test-config.js'), - }, - }; - - const { flowConfig, buildOptions } = parseBundleConfig(rawConfig); - - expect(Object.keys(buildOptions.packages)).toHaveLength(1); - expect('@walkeros/core' in buildOptions.packages).toBe(true); - expect(buildOptions.code).toContain('getId'); - expect(buildOptions.platform).toBe('browser'); - expect(buildOptions.output).toBe( - path.join(testOutputDir, 'test-config.js'), - ); - }); - - it('should handle template configuration', async () => { - const rawConfig = { - flow: { - platform: 'web' as const, - }, - build: { - packages: { - '@walkeros/core': { - imports: ['getId'], - }, - }, - code: 'export const test = getId(8);', - template: 'templates/web.hbs', - output: path.join(testOutputDir, 'template-test.js'), - }, - }; - - const { flowConfig, buildOptions } = parseBundleConfig(rawConfig); - - expect(buildOptions.template).toBeDefined(); - expect(buildOptions.template).toBe('templates/web.hbs'); - }); - - it('should validate custom build configuration', async () => { - const rawConfig = { - flow: { - platform: 'server' as const, - }, - build: { - packages: {}, - code: 'export const test = "hello";', - platform: 'node' as const, - format: 'esm' as const, - minify: true, - sourcemap: true, - target: 'node18', - output: path.join(testOutputDir, 'build-test.mjs'), - }, - }; - - const { flowConfig, buildOptions } = parseBundleConfig(rawConfig); - - expect(buildOptions.platform).toBe('node'); - expect(buildOptions.format).toBe('esm'); - expect(buildOptions.minify).toBe(true); - expect(buildOptions.sourcemap).toBe(true); - expect(buildOptions.target).toBe('node18'); - }); - - it('should handle error conditions gracefully', async () => { - // Test with invalid syntax in content - const { flowConfig, buildOptions } = parseBundleConfig({ - flow: { - platform: 'web' as const, - }, - build: { - packages: {}, - code: 'export const badCode = () => { return [1,2,3] x => x * 2; };', - output: path.join(testOutputDir, 'error-test.js'), - }, - }); - - // Should not throw during configuration parsing - expect(buildOptions.code).toContain('badCode'); - }); -}); diff --git a/packages/cli/src/__tests__/bundle/bundler.test.ts b/packages/cli/src/__tests__/bundle/bundler.test.ts index 76f5ba371..1e40f5624 100644 --- a/packages/cli/src/__tests__/bundle/bundler.test.ts +++ b/packages/cli/src/__tests__/bundle/bundler.test.ts @@ -1,8 +1,8 @@ import fs from 'fs-extra'; import path from 'path'; -import { bundleCore as bundle } from '../../commands/bundle/bundler'; -import { parseBundleConfig } from '../../config'; -import { createLogger, type Logger } from '../../core'; +import { bundleCore as bundle } from '../../commands/bundle/bundler.js'; +import { parseBundleConfig } from '../../config/index.js'; +import { createLogger, type Logger } from '../../core/index.js'; import { getId } from '@walkeros/core'; // No mocks - test with real package downloads and bundling @@ -53,6 +53,7 @@ describe('Bundler', () => { }, }, code: 'export const test = getId(8);', + template: '', // Explicitly disable template for raw code bundling platform: 'browser' as const, format: 'esm' as const, output: path.join(testOutputDir, 'minimal.js'), @@ -80,6 +81,7 @@ describe('Bundler', () => { }, }, code: 'export default { processText: (text) => trim(text) };', + template: '', // Explicitly disable template for raw code bundling platform: 'node' as const, format: 'esm' as const, output: path.join(testOutputDir, 'server-bundle.mjs'), @@ -107,6 +109,7 @@ describe('Bundler', () => { }, }, code: "export function processData(data) {\n return data.map(item => ({\n ...item,\n id: getId(8),\n timestamp: new Date().toISOString().split('T')[0],\n processed: true\n }));\n}\n\nexport function extractNestedValues(data, path) {\n return data.map(item => getByPath(item, path, null)).filter(val => val !== null);\n}\n\nexport function deepCloneData(data) {\n return clone(data);\n}\n\nexport function cleanStringData(data) {\n return data.map(item => ({\n ...item,\n name: typeof item.name === 'string' ? trim(item.name) : item.name\n }));\n}\n\n// Re-export walkerOS utilities\nexport { getId, getByPath, clone, trim, isObject };", + template: '', // Explicitly disable template for raw code bundling platform: 'browser' as const, format: 'esm' as const, target: 'es2020', @@ -137,6 +140,8 @@ describe('Bundler', () => { }, }, code: 'export const test = getId(8);', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'stats-test.js'), }, }; @@ -161,6 +166,8 @@ describe('Bundler', () => { build: { packages: { '@walkeros/core': {} }, code: 'import * as walkerCore from "@walkeros/core";\nexport const test = walkerCore.getId;', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'test.js'), }, }); @@ -182,6 +189,8 @@ describe('Bundler', () => { }, }, code: 'export const test = getId(8);', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'no-stats.js'), }, }; @@ -229,6 +238,8 @@ describe('Bundler', () => { '@walkeros/core': { imports: ['trim'] }, }, code: 'export const test = trim("hello");', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'missing-vars.js'), }, }); @@ -248,6 +259,8 @@ describe('Bundler', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId(6);', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'append-test.js'), }, }); @@ -269,6 +282,8 @@ describe('Bundler', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId();', + template: '', // Explicitly disable template for raw code bundling + format: 'esm' as const, tempDir: '/tmp/my-custom-bundler-temp', output: path.join(testOutputDir, 'custom-temp-example.js'), }, @@ -289,6 +304,7 @@ describe('Bundler', () => { '@walkeros/core': { version: '0.0.7', imports: ['getId'] }, }, code: '// Test version pinning\nexport const test = getId();', + template: '', // Explicitly disable template for raw code bundling platform: 'browser' as const, format: 'esm' as const, target: 'es2020', @@ -318,20 +334,5 @@ describe('Bundler', () => { }); }).toThrow(); }); - - it('should require content field', async () => { - expect(() => { - parseBundleConfig({ - flow: { - platform: 'web' as const, - }, - build: { - packages: {}, - // missing code field - output: path.join(testOutputDir, 'test.js'), - }, - }); - }).toThrow(); - }); }); }); diff --git a/packages/cli/src/__tests__/bundle/programmatic.test.ts b/packages/cli/src/__tests__/bundle/programmatic.test.ts index 7c8477afd..11e23e8ff 100644 --- a/packages/cli/src/__tests__/bundle/programmatic.test.ts +++ b/packages/cli/src/__tests__/bundle/programmatic.test.ts @@ -1,6 +1,6 @@ import fs from 'fs-extra'; import path from 'path'; -import { bundle } from '../../commands/bundle'; +import { bundle } from '../../commands/bundle/index.js'; import { getId } from '@walkeros/core'; describe('Programmatic Bundle API', () => { @@ -42,6 +42,7 @@ describe('Programmatic Bundle API', () => { }, }, code: 'export const test = getId(8); export const clean = (s) => trim(s);', + template: '', // Disable template for raw code bundling platform: 'browser', format: 'esm', output: path.join(testOutputDir, 'config-object.js'), @@ -70,6 +71,8 @@ describe('Programmatic Bundle API', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId(8);', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'with-stats.js'), }, }; @@ -92,6 +95,8 @@ describe('Programmatic Bundle API', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId(8);', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'no-stats.js'), }, }; @@ -111,6 +116,8 @@ describe('Programmatic Bundle API', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId(8);', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'with-cache.js'), }, }; @@ -130,6 +137,8 @@ describe('Programmatic Bundle API', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId(8);', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'verbose.js'), }, }; diff --git a/packages/cli/src/__tests__/bundle/serializer.test.ts b/packages/cli/src/__tests__/bundle/serializer.test.ts index 3cede81b2..bb64c6af4 100644 --- a/packages/cli/src/__tests__/bundle/serializer.test.ts +++ b/packages/cli/src/__tests__/bundle/serializer.test.ts @@ -2,7 +2,7 @@ import { serializeToJS, serializeConfig, processTemplateVariables, -} from '../../commands/bundle/serializer'; +} from '../../commands/bundle/serializer.js'; describe('Serializer', () => { describe('serializeToJS', () => { diff --git a/packages/cli/src/__tests__/bundle/template-engine.test.ts b/packages/cli/src/__tests__/bundle/template-engine.test.ts index df9a979e3..111480b17 100644 --- a/packages/cli/src/__tests__/bundle/template-engine.test.ts +++ b/packages/cli/src/__tests__/bundle/template-engine.test.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import path from 'path'; -import { TemplateEngine } from '../../commands/bundle/template-engine'; -import { SourceDestinationItem } from '../../types/template'; +import { TemplateEngine } from '../../commands/bundle/template-engine.js'; +import { SourceDestinationItem } from '../../types/template.js'; import { getId } from '@walkeros/core'; describe('TemplateEngine', () => { diff --git a/packages/cli/src/__tests__/cli-e2e.test.ts b/packages/cli/src/__tests__/cli-e2e.test.ts index ccafe08bf..1ff831bc1 100644 --- a/packages/cli/src/__tests__/cli-e2e.test.ts +++ b/packages/cli/src/__tests__/cli-e2e.test.ts @@ -35,7 +35,7 @@ describe('CLI E2E Tests', () => { it('should bundle a simple server config', async () => { const configPath = join(projectRoot, 'examples/server-collect.json'); - const result = await runCLI(['bundle', '--config', configPath]); + const result = await runCLI(['bundle', configPath]); expect(result.code).toBe(0); @@ -45,11 +45,7 @@ describe('CLI E2E Tests', () => { }, 30000); it('should show error for invalid config', async () => { - const result = await runCLI([ - 'bundle', - '--config', - '/nonexistent/config.json', - ]); + const result = await runCLI(['bundle', '/nonexistent/config.json']); expect(result.code).not.toBe(0); expect(result.stderr || result.stdout).toContain('not found'); @@ -58,12 +54,7 @@ describe('CLI E2E Tests', () => { it('should handle --stats flag', async () => { const configPath = join(projectRoot, 'examples/server-collect.json'); - const result = await runCLI([ - 'bundle', - '--config', - configPath, - '--stats', - ]); + const result = await runCLI(['bundle', configPath, '--stats']); expect(result.code).toBe(0); expect(result.stdout).toContain('Bundle Statistics'); @@ -76,7 +67,6 @@ describe('CLI E2E Tests', () => { const result = await runCLI([ 'simulate', - '--config', configPath, '--event', '{"name":"page view","data":{"title":"Test"}}', @@ -96,11 +86,7 @@ describe('CLI E2E Tests', () => { }, 30000); it('should handle invalid config gracefully', async () => { - const result = await runCLI([ - 'simulate', - '--config', - '/invalid/path.json', - ]); + const result = await runCLI(['simulate', '/invalid/path.json']); expect(result.code).not.toBe(0); expect(result.stderr || result.stdout).toContain('not found'); diff --git a/packages/cli/src/__tests__/cli.test.ts b/packages/cli/src/__tests__/cli.test.ts index 0b257ff90..a1a5b25df 100644 --- a/packages/cli/src/__tests__/cli.test.ts +++ b/packages/cli/src/__tests__/cli.test.ts @@ -57,18 +57,15 @@ describe('CLI Bundle Command', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const test = getId();', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'test.js'), }, }; await fs.writeJson(testConfigPath, testConfig); - const result = await runCLI([ - 'bundle', - '--config', - testConfigPath, - '--json', - ]); + const result = await runCLI(['bundle', testConfigPath, '--json']); expect(result.exitCode).toBe(0); @@ -113,18 +110,15 @@ describe('CLI Bundle Command', () => { '@walkeros/core': { imports: ['getId'] }, }, code: 'export const badCode = () => {\n return getId([1,2,3] x => x * 2);\n};', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'error-test.js'), }, }; await fs.writeJson(testConfigPath, testConfig); - const result = await runCLI([ - 'bundle', - '--config', - testConfigPath, - '--json', - ]); + const result = await runCLI(['bundle', testConfigPath, '--json']); expect(result.exitCode).toBe(1); @@ -139,12 +133,7 @@ describe('CLI Bundle Command', () => { }); it('should output JSON format when config file not found', async () => { - const result = await runCLI([ - 'bundle', - '--config', - 'nonexistent.json', - '--json', - ]); + const result = await runCLI(['bundle', 'nonexistent.json', '--json']); expect(result.exitCode).toBe(1); @@ -163,18 +152,15 @@ describe('CLI Bundle Command', () => { build: { packages: { '@walkeros/core': { imports: ['getId'] } }, code: 'export const test = getId;', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'wildcard-test.js'), }, }; await fs.writeJson(testConfigPath, testConfig); - const result = await runCLI([ - 'bundle', - '--config', - testConfigPath, - '--json', - ]); + const result = await runCLI(['bundle', testConfigPath, '--json']); expect(result.exitCode).toBe(0); @@ -191,18 +177,15 @@ describe('CLI Bundle Command', () => { build: { packages: { '@walkeros/core': { imports: ['getId'] } }, code: 'export const test = getId();', + template: '', // Disable template for raw code bundling + format: 'esm' as const, output: path.join(testOutputDir, 'minimal-test.js'), }, }; await fs.writeJson(testConfigPath, testConfig); - const result = await runCLI([ - 'bundle', - '--config', - testConfigPath, - '--json', - ]); + const result = await runCLI(['bundle', testConfigPath, '--json']); expect(result.exitCode).toBe(0); @@ -218,90 +201,6 @@ describe('CLI Bundle Command', () => { }); describe('CLI Simulate Command', () => { - const testConfigPath = path.join(__dirname, '../../examples/web-serve.json'); - - beforeEach(() => { - // Mock console.log and console.error to suppress output during tests - jest.spyOn(console, 'log').mockImplementation(() => {}); - jest.spyOn(console, 'error').mockImplementation(() => {}); - }); - - afterEach(() => { - // Restore console methods - jest.restoreAllMocks(); - }); - - const runCLI = ( - args: string[], - ): Promise<{ stdout: string; stderr: string; exitCode: number }> => { - return new Promise((resolve) => { - // Add --local flag to run tests without Docker - const child = spawn('node', ['dist/index.js', ...args, '--local'], { - stdio: 'pipe', - shell: false, - }); - - let stdout = ''; - let stderr = ''; - - child.stdout.on('data', (data) => { - stdout += data.toString(); - }); - - child.stderr.on('data', (data) => { - stderr += data.toString(); - }); - - child.on('close', (exitCode) => { - resolve({ stdout, stderr, exitCode: exitCode || 0 }); - }); - }); - }; - - it('should output JSON format for simulation', async () => { - const result = await runCLI([ - 'simulate', - '--config', - testConfigPath, - '--event', - '{"name":"product view","data":{"id":"P123"}}', - '--json', - ]); - - if (result.exitCode !== 0) { - console.log('STDERR:', result.stderr); - console.log('STDOUT:', result.stdout); - } - - expect(result.exitCode).toBe(0); - - const output = JSON.parse(result.stdout); - expect(output).toMatchObject({ - result: { - ok: true, - successful: expect.arrayContaining([ - expect.objectContaining({ id: 'demo' }), - ]), - queued: [], - failed: [], - event: expect.objectContaining({ - name: 'product view', - data: { id: 'P123' }, - }), - }, - usage: { - demo: expect.any(Array), - }, - duration: expect.any(Number), - }); - - // Verify demo destination log calls - expect(output.usage.demo.length).toBeGreaterThan(0); - expect(output.usage.demo[0]).toMatchObject({ - type: 'call', - path: 'log', - timestamp: expect.any(Number), - args: expect.any(Array), - }); - }); + // Placeholder for future simulate command tests + // Current simulate functionality is tested in cli-e2e.test.ts }); diff --git a/packages/cli/src/__tests__/config-loader.test.ts b/packages/cli/src/__tests__/config-loader.test.ts index e6a9f3145..2a4ef8179 100644 --- a/packages/cli/src/__tests__/config-loader.test.ts +++ b/packages/cli/src/__tests__/config-loader.test.ts @@ -8,7 +8,7 @@ import { loadBundleConfig, loadAllEnvironments, getAvailableEnvironments, -} from '../config'; +} from '../config/index.js'; describe('Config Loader', () => { // ======================================== @@ -74,7 +74,8 @@ describe('Config Loader', () => { expect(result.buildOptions.platform).toBe('browser'); expect(result.buildOptions.format).toBe('iife'); expect(result.buildOptions.target).toBe('es2020'); - expect(result.buildOptions.output).toBe('./dist/walker.js'); + // Output path is resolved relative to config file directory + expect(result.buildOptions.output).toBe('/test/dist/walker.js'); }); test('applies platform-specific defaults for server', () => { @@ -96,7 +97,8 @@ describe('Config Loader', () => { expect(result.buildOptions.platform).toBe('node'); expect(result.buildOptions.format).toBe('esm'); expect(result.buildOptions.target).toBe('node20'); - expect(result.buildOptions.output).toBe('./dist/bundle.js'); + // Output path is resolved relative to config file directory + expect(result.buildOptions.output).toBe('/test/dist/bundle.js'); }); test('merges custom build options with defaults', () => { @@ -122,7 +124,7 @@ describe('Config Loader', () => { expect(result.buildOptions.target).toBe('es2020'); // Default preserved }); - test('does not auto-select templates', () => { + test('auto-selects templates based on platform', () => { const config = { flow: { platform: 'web' as const, @@ -138,7 +140,8 @@ describe('Config Loader', () => { configPath: '/test/config.json', }); - expect(result.buildOptions.template).toBeUndefined(); + // Should auto-select web.hbs for web platform + expect(result.buildOptions.template).toBe('web.hbs'); }); }); @@ -311,7 +314,7 @@ describe('Config Loader', () => { loadBundleConfig(invalidConfig, { configPath: '/test/config.json', }), - ).toThrow('Invalid configuration format'); + ).toThrow('Invalid platform "invalid". Must be "web" or "server".'); }); test('throws error for missing required fields', () => { @@ -475,7 +478,8 @@ describe('Config Loader', () => { ).sources?.browser?.package, ).toBe('@walkeros/web-source-browser@2.0.0'); expect(result.buildOptions.minify).toBe(true); - expect(result.buildOptions.output).toBe('./dist/walker.min.js'); + // Output path is resolved relative to config file directory + expect(result.buildOptions.output).toBe('/test/dist/walker.min.js'); }); }); }); diff --git a/packages/cli/src/__tests__/core/config.test.ts b/packages/cli/src/__tests__/core/config.test.ts index 2b599121d..273e44ce8 100644 --- a/packages/cli/src/__tests__/core/config.test.ts +++ b/packages/cli/src/__tests__/core/config.test.ts @@ -4,7 +4,7 @@ import { loadJsonConfig, substituteEnvVariables, getTempDir, -} from '../../config'; +} from '../../config/index.js'; import { getId } from '@walkeros/core'; describe('Config utilities', () => { diff --git a/packages/cli/src/__tests__/core/logger.test.ts b/packages/cli/src/__tests__/core/logger.test.ts index f7b608e93..b9bb2aa23 100644 --- a/packages/cli/src/__tests__/core/logger.test.ts +++ b/packages/cli/src/__tests__/core/logger.test.ts @@ -1,4 +1,4 @@ -import { createLogger } from '../../core/logger'; +import { createLogger } from '../../core/logger.js'; describe('Logger', () => { let consoleLogSpy: jest.SpyInstance; diff --git a/packages/cli/src/__tests__/integration/bundle-run.integration.test.ts b/packages/cli/src/__tests__/integration/bundle-run.integration.test.ts new file mode 100644 index 000000000..3c8be59c4 --- /dev/null +++ b/packages/cli/src/__tests__/integration/bundle-run.integration.test.ts @@ -0,0 +1,62 @@ +/** + * Integration Test: Bundle → Run Workflow + * + * Tests complete flow from config to running bundle. + * Uses real packages, real bundles, NO MOCKING. + */ + +import { bundle } from '../../commands/bundle/index.js'; +import { join } from 'path'; +import fs from 'fs-extra'; + +const projectRoot = process.cwd(); + +describe('Bundle → Run Integration', () => { + const testDir = join(projectRoot, '.tmp/integration-tests'); + + beforeAll(async () => { + await fs.ensureDir(testDir); + }); + + afterAll(async () => { + await fs.remove(testDir).catch(() => {}); + }); + + it('should create functional bundle from config', async () => { + // Step 1: Bundle example config + await bundle(join(projectRoot, 'examples/server-collect.json'), { + verbose: false, + silent: true, + }); + + // Step 2: Verify bundle exists + const bundlePath = join(projectRoot, 'examples/server-collect.mjs'); + expect(fs.existsSync(bundlePath)).toBe(true); + + // Step 3: Verify it's valid ESM + const module = await import(bundlePath); + expect(module.default).toBeDefined(); + expect(typeof module.default).toBe('function'); + + // Step 4: Verify factory function signature + // (Don't actually execute to avoid port conflicts and hanging servers) + const factoryFn = module.default; + expect(factoryFn.length).toBeGreaterThanOrEqual(0); + + // Verify it's a function that would return the right structure + // by checking the module exports + expect(module).toHaveProperty('default'); + }, 60000); + + it('should bundle with correct dependencies included', async () => { + const bundlePath = join(projectRoot, 'examples/server-collect.mjs'); + const content = fs.readFileSync(bundlePath, 'utf-8'); + + // Should include runtime dependencies + expect(content).toContain('express'); + + // Should NOT include dev dependencies + expect(content).not.toContain('jest'); + expect(content).not.toContain('@types/'); + }); +}); diff --git a/packages/cli/src/__tests__/push/fixtures/configs/server-basic.json b/packages/cli/src/__tests__/push/fixtures/configs/server-basic.json new file mode 100644 index 000000000..b31f3a9df --- /dev/null +++ b/packages/cli/src/__tests__/push/fixtures/configs/server-basic.json @@ -0,0 +1,20 @@ +{ + "flow": { + "platform": "server", + "destinations": { + "demo": { + "code": "destinationDemo" + } + } + }, + "build": { + "packages": { + "@walkeros/collector": { + "imports": ["startFlow"] + }, + "@walkeros/destination-demo": { + "imports": ["destinationDemo"] + } + } + } +} diff --git a/packages/cli/src/__tests__/push/fixtures/configs/web-basic.json b/packages/cli/src/__tests__/push/fixtures/configs/web-basic.json new file mode 100644 index 000000000..4c803730f --- /dev/null +++ b/packages/cli/src/__tests__/push/fixtures/configs/web-basic.json @@ -0,0 +1,20 @@ +{ + "flow": { + "platform": "web", + "destinations": { + "demo": { + "code": "destinationDemo" + } + } + }, + "build": { + "packages": { + "@walkeros/collector": { + "imports": ["startFlow"] + }, + "@walkeros/destination-demo": { + "imports": ["destinationDemo"] + } + } + } +} diff --git a/packages/cli/src/__tests__/push/fixtures/events/invalid-event.json b/packages/cli/src/__tests__/push/fixtures/events/invalid-event.json new file mode 100644 index 000000000..6a5aac976 --- /dev/null +++ b/packages/cli/src/__tests__/push/fixtures/events/invalid-event.json @@ -0,0 +1,6 @@ +{ + "data": { + "title": "Test Page", + "path": "/test" + } +} diff --git a/packages/cli/src/__tests__/push/fixtures/events/valid-event.json b/packages/cli/src/__tests__/push/fixtures/events/valid-event.json new file mode 100644 index 000000000..2b934ed52 --- /dev/null +++ b/packages/cli/src/__tests__/push/fixtures/events/valid-event.json @@ -0,0 +1,7 @@ +{ + "name": "page view", + "data": { + "title": "Test Page", + "path": "/test" + } +} diff --git a/packages/cli/src/__tests__/push/push.test.ts b/packages/cli/src/__tests__/push/push.test.ts new file mode 100644 index 000000000..030a32b41 --- /dev/null +++ b/packages/cli/src/__tests__/push/push.test.ts @@ -0,0 +1,302 @@ +/** + * Push Command Tests + * + * Tests the push command validation and execution logic + */ + +import path from 'path'; +import fs from 'fs-extra'; +import { loadJsonFromSource } from '../../config/index.js'; + +// Test fixtures +const FIXTURES_DIR = path.join(__dirname, 'fixtures'); +const VALID_EVENT = path.join(FIXTURES_DIR, 'events/valid-event.json'); +const INVALID_EVENT = path.join(FIXTURES_DIR, 'events/invalid-event.json'); + +// Helper to cast event to Record for testing +const asEvent = (e: unknown) => e as Record; + +describe('Event Loading and Validation', () => { + it('should load valid event from file', async () => { + const event = asEvent( + await loadJsonFromSource(VALID_EVENT, { name: 'event' }), + ); + + expect(event).toBeDefined(); + expect(event).toHaveProperty('name', 'page view'); + expect(event).toHaveProperty('data'); + expect(asEvent(event.data)).toHaveProperty('title', 'Test Page'); + }); + + it('should load event from JSON string', async () => { + const jsonString = '{"name": "product view", "data": {"id": "P123"}}'; + const event = asEvent( + await loadJsonFromSource(jsonString, { name: 'event' }), + ); + + expect(event).toBeDefined(); + expect(event).toHaveProperty('name', 'product view'); + expect(asEvent(event.data)).toHaveProperty('id', 'P123'); + }); + + it('should validate event has name property', async () => { + const event = asEvent( + await loadJsonFromSource(VALID_EVENT, { name: 'event' }), + ); + + expect('name' in event).toBe(true); + expect(typeof event.name).toBe('string'); + }); + + it('should reject event without name property', async () => { + const event = asEvent( + await loadJsonFromSource(INVALID_EVENT, { name: 'event' }), + ); + + expect(!('name' in event)).toBe(true); + }); +}); + +describe('Event Name Format', () => { + it('should accept entity-action format with space', async () => { + const event = asEvent( + await loadJsonFromSource('{"name": "page view", "data": {}}', { + name: 'event', + }), + ); + + expect(event.name).toBe('page view'); + expect((event.name as string).includes(' ')).toBe(true); + }); + + it('should detect missing space in event name', async () => { + const event = asEvent( + await loadJsonFromSource('{"name": "pageview", "data": {}}', { + name: 'event', + }), + ); + + expect(event.name).toBe('pageview'); + expect((event.name as string).includes(' ')).toBe(false); + }); + + it('should accept multiple word event names', async () => { + const event = asEvent( + await loadJsonFromSource('{"name": "product detail view", "data": {}}', { + name: 'event', + }), + ); + + expect(event.name).toBe('product detail view'); + expect((event.name as string).includes(' ')).toBe(true); + }); +}); + +describe('Event Structure', () => { + it('should accept event with data property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "data": {"title": "Home", "path": "/"}}', + { name: 'event' }, + ), + ); + + expect(event.data).toBeDefined(); + expect(typeof event.data).toBe('object'); + expect(asEvent(event.data).title).toBe('Home'); + }); + + it('should accept event without data property', async () => { + const event = asEvent( + await loadJsonFromSource('{"name": "page view"}', { + name: 'event', + }), + ); + + expect(event.name).toBe('page view'); + expect(event.data).toBeUndefined(); + }); + + it('should accept event with nested property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "nested": [{"type": "category", "data": {"name": "Tech"}}]}', + { name: 'event' }, + ), + ); + + expect(event.nested).toBeDefined(); + expect(Array.isArray(event.nested)).toBe(true); + const nested = event.nested as Array>; + expect(nested[0].type).toBe('category'); + }); + + it('should accept event with user property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "user": {"id": "user123", "device": "dev456"}}', + { name: 'event' }, + ), + ); + + expect(event.user).toBeDefined(); + const user = asEvent(event.user); + expect(user.id).toBe('user123'); + expect(user.device).toBe('dev456'); + }); + + it('should accept event with globals property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "globals": {"language": "en", "currency": "USD"}}', + { name: 'event' }, + ), + ); + + expect(event.globals).toBeDefined(); + const globals = asEvent(event.globals); + expect(globals.language).toBe('en'); + expect(globals.currency).toBe('USD'); + }); + + it('should accept event with context property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "context": {"stage": ["checkout", 1]}}', + { name: 'event' }, + ), + ); + + expect(event.context).toBeDefined(); + const context = asEvent(event.context); + expect(context.stage).toEqual(['checkout', 1]); + }); + + it('should accept event with consent property', async () => { + const event = asEvent( + await loadJsonFromSource( + '{"name": "page view", "consent": {"functional": true, "marketing": false}}', + { name: 'event' }, + ), + ); + + expect(event.consent).toBeDefined(); + const consent = asEvent(event.consent); + expect(consent.functional).toBe(true); + expect(consent.marketing).toBe(false); + }); +}); + +describe('Event Type Validation', () => { + it('should load non-object event (validation happens at command level)', async () => { + const result = await loadJsonFromSource('"not an object"', { + name: 'event', + }); + + // loadJsonFromSource loads JSON but doesn't validate structure + expect(result).toBe('not an object'); + expect(typeof result).not.toBe('object'); + }); + + it('should load array as event (validation happens at command level)', async () => { + const result = await loadJsonFromSource('[{"name": "page view"}]', { + name: 'event', + }); + + expect(Array.isArray(result)).toBe(true); + }); + + it('should load null as event (validation happens at command level)', async () => { + const result = await loadJsonFromSource('null', { name: 'event' }); + + expect(result).toBeNull(); + }); + + it('should load event with non-string name (validation happens at command level)', async () => { + const event = await loadJsonFromSource('{"name": 123, "data": {}}', { + name: 'event', + }); + + const e = event as Record; + expect(e.name).toBe(123); + expect(typeof e.name).not.toBe('string'); + }); +}); + +describe('JSON Source Loading', () => { + it('should load from file path', async () => { + const event = await loadJsonFromSource(VALID_EVENT, { name: 'event' }); + + expect(event).toBeDefined(); + const e = event as Record; + expect(e.name).toBe('page view'); + }); + + it('should load from JSON string', async () => { + const event = await loadJsonFromSource('{"name": "page view"}', { + name: 'event', + }); + + expect(event).toBeDefined(); + const e = event as Record; + expect(e.name).toBe('page view'); + }); + + it('should handle JSON with whitespace', async () => { + const event = await loadJsonFromSource( + `{ + "name": "page view", + "data": { + "title": "Home" + } + }`, + { name: 'event' }, + ); + + const e = event as Record; + expect(e.name).toBe('page view'); + const data = e.data as Record; + expect(data.title).toBe('Home'); + }); + + it('should reject invalid JSON', async () => { + await expect( + loadJsonFromSource('{invalid json}', { name: 'event' }), + ).rejects.toThrow(); + }); + + it('should fallback to event name for non-existent file paths', async () => { + // Non-existent file paths that don't look like JSON are treated as event names + const result = await loadJsonFromSource('/tmp/nonexistent', { + name: 'event', + }); + + expect(result).toEqual({ name: '/tmp/nonexistent' }); + }); + + it('should reject JSON-like non-existent files', async () => { + // Paths ending in .json should fail if they don't exist + await expect( + loadJsonFromSource('{invalid', { name: 'event' }), + ).rejects.toThrow(); + }); +}); + +describe('Fixture Files', () => { + it('should have valid-event.json fixture', async () => { + const exists = await fs.pathExists(VALID_EVENT); + expect(exists).toBe(true); + + const content = await fs.readJson(VALID_EVENT); + expect(content).toHaveProperty('name'); + expect(content.name).toContain(' '); // Should follow entity-action format + }); + + it('should have invalid-event.json fixture', async () => { + const exists = await fs.pathExists(INVALID_EVENT); + expect(exists).toBe(true); + + const content = await fs.readJson(INVALID_EVENT); + expect(content).not.toHaveProperty('name'); + }); +}); diff --git a/packages/cli/src/__tests__/simulate/env-loader.test.ts b/packages/cli/src/__tests__/simulate/env-loader.test.ts new file mode 100644 index 000000000..30b848122 --- /dev/null +++ b/packages/cli/src/__tests__/simulate/env-loader.test.ts @@ -0,0 +1,58 @@ +import { loadDestinationEnvs } from '../../commands/simulate/env-loader'; + +describe('loadDestinationEnvs', () => { + it('loads env from destination packages', async () => { + const destinations = { + gtag: { + package: '@walkeros/web-destination-gtag', + config: { settings: { ga4: { measurementId: 'G-TEST' } } }, + }, + }; + + const envs = await loadDestinationEnvs(destinations); + + expect(envs).toHaveProperty('gtag'); + expect(envs.gtag).toHaveProperty('push'); + expect(envs.gtag.push).toHaveProperty('window'); + expect(envs.gtag.push.window).toHaveProperty('gtag'); + }); + + it('returns empty object for destinations without package field', async () => { + const destinations = { + custom: { + config: {}, + }, + }; + + const envs = await loadDestinationEnvs(destinations); + + expect(envs).toEqual({}); + }); + + it('handles package import errors gracefully', async () => { + const destinations = { + invalid: { + package: '@walkeros/nonexistent-package', + config: {}, + }, + }; + + const envs = await loadDestinationEnvs(destinations); + + expect(envs).toEqual({}); + }); + + it('loads simulation tracking paths', async () => { + const destinations = { + gtag: { + package: '@walkeros/web-destination-gtag', + config: {}, + }, + }; + + const envs = await loadDestinationEnvs(destinations); + + expect(envs.gtag).toHaveProperty('simulation'); + expect(Array.isArray(envs.gtag.simulation)).toBe(true); + }); +}); diff --git a/packages/cli/src/__tests__/simulate/programmatic.test.ts b/packages/cli/src/__tests__/simulate/programmatic.test.ts deleted file mode 100644 index b2bb6d8f9..000000000 --- a/packages/cli/src/__tests__/simulate/programmatic.test.ts +++ /dev/null @@ -1,73 +0,0 @@ -import path from 'path'; -import { simulate } from '../../commands/simulate'; - -// Mock package-manager to avoid network calls -jest.mock('../../commands/bundle/package-manager', () => ({ - downloadPackages: jest.fn().mockResolvedValue(new Map()), -})); - -describe('Programmatic Simulate API', () => { - it('should simulate with config file path', async () => { - const configPath = path.resolve( - __dirname, - '../../../examples/web-serve.json', - ); - const event = { name: 'page view', data: { title: 'Home', path: '/' } }; - - const result = await simulate(configPath, event, { silent: true }); - - expect(result).toBeDefined(); - expect(typeof result.success).toBe('boolean'); - - // Either succeeds or fails gracefully - if (result.success) { - expect(result.error).toBeUndefined(); - expect(result.usage).toBeDefined(); - } else { - expect(typeof result.error).toBe('string'); - } - }, 30000); - - it('should handle verbose option', async () => { - const configPath = path.resolve( - __dirname, - '../../../examples/web-serve.json', - ); - const event = { name: 'product view', data: { id: 'P123' } }; - - const result = await simulate(configPath, event, { - verbose: true, - silent: false, - }); - - expect(result).toBeDefined(); - expect(typeof result.success).toBe('boolean'); - }, 30000); - - it('should throw error when config object is provided (not yet supported)', async () => { - const config = { - platform: 'web', - packages: {}, - code: 'export default {}', - output: './test.js', - }; - const event = { name: 'test' }; - - await expect(simulate(config, event, { silent: true })).rejects.toThrow( - 'currently only supports config file paths', - ); - }); - - it('should handle JSON option', async () => { - const configPath = path.resolve( - __dirname, - '../../../examples/web-serve.json', - ); - const event = { name: 'page view', data: {} }; - - const result = await simulate(configPath, event, { json: true }); - - expect(result).toBeDefined(); - expect(typeof result.success).toBe('boolean'); - }, 30000); -}); diff --git a/packages/cli/src/__tests__/simulate/simulator.test.ts b/packages/cli/src/__tests__/simulate/simulator.test.ts deleted file mode 100644 index a1b4fe2d1..000000000 --- a/packages/cli/src/__tests__/simulate/simulator.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import path from 'path'; -import { simulateCore as simulate } from '../../commands/simulate/simulator'; -import { Collector } from '@walkeros/core'; - -// Mock package-manager to avoid network calls and return empty results -jest.mock('../../commands/bundle/package-manager', () => ({ - downloadPackages: jest.fn().mockResolvedValue(new Map()), -})); - -describe('Simulate', () => { - it('should handle package manager errors gracefully', async () => { - const configPath = path.resolve( - __dirname, - '../../../examples/web-serve.json', - ); - const event = { name: 'product view', data: { id: 'P123' } }; - - const result = await simulate(configPath, event, { - json: true, - verbose: true, - }); - - // With mocked packages that return empty map, this will fail to bundle - // but should fail gracefully without crashing - expect(result).toBeDefined(); - expect(typeof result).toBe('object'); - expect(typeof result.success).toBe('boolean'); - - // Either succeeds or fails gracefully - if (result.success) { - expect(result.error).toBeUndefined(); - } else { - expect(typeof result.error).toBe('string'); - } - }, 30000); -}); diff --git a/packages/cli/src/__tests__/smoke/production.smoke.test.ts b/packages/cli/src/__tests__/smoke/production.smoke.test.ts new file mode 100644 index 000000000..32d8c5e66 --- /dev/null +++ b/packages/cli/src/__tests__/smoke/production.smoke.test.ts @@ -0,0 +1,73 @@ +/** + * Production Smoke Tests + * + * Validates bundle quality before production deployment. + * Checks: size, structure, executability, dependencies. + */ + +import { bundle } from '../../commands/bundle/index.js'; +import { join } from 'path'; +import fs from 'fs-extra'; + +const projectRoot = process.cwd(); + +describe('Production Smoke Tests', () => { + const bundlePath = join(projectRoot, 'examples/server-collect.mjs'); + + beforeAll(async () => { + // Ensure fresh bundle + await bundle(join(projectRoot, 'examples/server-collect.json'), { + silent: true, + }); + }); + + it('bundle should exist and be non-empty', () => { + expect(fs.existsSync(bundlePath)).toBe(true); + const stats = fs.statSync(bundlePath); + expect(stats.size).toBeGreaterThan(1024); // > 1KB + }); + + it('bundle should be reasonable size', () => { + const stats = fs.statSync(bundlePath); + const sizeKB = stats.size / 1024; + + console.log(`Bundle size: ${sizeKB.toFixed(2)} KB`); + + // Should be less than 2MB + expect(stats.size).toBeLessThan(2 * 1024 * 1024); + }); + + it('bundle should be valid ESM module', async () => { + const module = await import(bundlePath); + expect(module.default).toBeDefined(); + expect(typeof module.default).toBe('function'); + }); + + it('bundle factory function should be executable', async () => { + const module = await import(bundlePath); + + // Verify factory function signature - don't actually execute it + // (to avoid port conflicts and hanging servers in tests) + expect(typeof module.default).toBe('function'); + expect(module.default.length).toBeGreaterThanOrEqual(0); + + // Verify it's an async function by checking constructor + const factoryFn = module.default; + expect( + factoryFn.constructor.name === 'AsyncFunction' || + factoryFn.constructor.name === 'Function', + ).toBe(true); + }); + + it('bundle should include required runtime dependencies', () => { + const content = fs.readFileSync(bundlePath, 'utf-8'); + expect(content).toContain('express'); + }); + + it('bundle should NOT include development dependencies', () => { + const content = fs.readFileSync(bundlePath, 'utf-8'); + expect(content).not.toContain('jest'); + expect(content).not.toContain('prettier'); + expect(content).not.toContain('@types/'); + }); +}); diff --git a/packages/cli/src/commands/bundle/bundler.ts b/packages/cli/src/commands/bundle/bundler.ts index 04304fbaa..3157c4b63 100644 --- a/packages/cli/src/commands/bundle/bundler.ts +++ b/packages/cli/src/commands/bundle/bundler.ts @@ -2,12 +2,12 @@ import esbuild from 'esbuild'; import path from 'path'; import fs from 'fs-extra'; import type { Flow } from '@walkeros/core'; -import type { BuildOptions } from '../../types/bundle'; -import type { SourceDestinationItem } from '../../types/template'; -import { downloadPackages } from './package-manager'; -import { TemplateEngine } from './template-engine'; -import type { Logger } from '../../core'; -import { getTempDir } from '../../config'; +import type { BuildOptions } from '../../types/bundle.js'; +import type { SourceDestinationItem } from '../../types/template.js'; +import { downloadPackages } from './package-manager.js'; +import { TemplateEngine } from './template-engine.js'; +import type { Logger } from '../../core/index.js'; +import { getTempDir } from '../../config/index.js'; export interface BundleStats { totalSize: number; @@ -115,7 +115,10 @@ export async function bundleCore( await esbuild.build(esbuildOptions); } catch (buildError) { // Enhanced error handling for build failures - throw createBuildError(buildError as EsbuildError, buildOptions.code); + throw createBuildError( + buildError as EsbuildError, + buildOptions.code || '', + ); } logger.gray(`Output: ${outputPath}`); @@ -257,19 +260,12 @@ function createEsbuildOptions( ]; // Mark runtime dependencies as external // These packages are installed in the Docker container and should not be bundled - // - zod: Prevents double-loading issues (used by @walkeros/core) // - express/cors: Runtime dependencies for server sources + // Note: zod is bundled inline via @walkeros/core (not marked external) // Use wildcard patterns to match both ESM and CJS imports - const npmPackages = [ - 'zod', - 'zod/*', - 'express', - 'express/*', - 'cors', - 'cors/*', - ]; + const npmPackages = ['express', 'express/*', 'cors', 'cors/*']; // All downloaded @walkeros packages will be bundled into the output - // Only Node.js built-ins and problematic packages (zod) are marked external + // Only Node.js built-ins and runtime server packages (express/cors) are marked external baseOptions.external = buildOptions.external ? [...nodeBuiltins, ...npmPackages, ...buildOptions.external] : [...nodeBuiltins, ...npmPackages]; @@ -284,11 +280,6 @@ function createEsbuildOptions( baseOptions.target = 'es2018'; } - // Set global name for IIFE format - if (buildOptions.globalName && buildOptions.format === 'iife') { - baseOptions.globalName = buildOptions.globalName; - } - return baseOptions; } @@ -304,22 +295,16 @@ function packageNameToVariable(packageName: string): string { .join(''); } -async function createEntryPoint( - flowConfig: Flow.Config, - buildOptions: BuildOptions, - packagePaths: Map, -): Promise { - // Generate import statements from packages - const importStatements: string[] = []; - const examplesMappings: string[] = []; - - // For simulation mode, automatically import examples from destination packages - // This ensures examples are loaded in the SAME execution context as the bundle - // preventing zod double-loading issues +/** + * Detects destination packages from flow configuration. + * Extracts package names from destinations that have explicit 'package' field. + */ +function detectDestinationPackages(flowConfig: Flow.Config): Set { const destinationPackages = new Set(); const destinations = ( flowConfig as unknown as { destinations?: Record } ).destinations; + if (destinations) { for (const [destKey, destConfig] of Object.entries(destinations)) { // Require explicit package field - no inference for any packages @@ -335,9 +320,26 @@ async function createEntryPoint( } } - for (const [packageName, packageConfig] of Object.entries( - buildOptions.packages, - )) { + return destinationPackages; +} + +interface ImportGenerationResult { + importStatements: string[]; + examplesMappings: string[]; +} + +/** + * Generates import statements and examples mappings from build packages. + * Handles explicit imports, namespace imports, and auto-imports for destination packages. + */ +function generateImportStatements( + packages: BuildOptions['packages'], + destinationPackages: Set, +): ImportGenerationResult { + const importStatements: string[] = []; + const examplesMappings: string[] = []; + + for (const [packageName, packageConfig] of Object.entries(packages)) { if (packageConfig.imports && packageConfig.imports.length > 0) { // Remove duplicates within the same package const uniqueImports = [...new Set(packageConfig.imports)]; @@ -398,42 +400,20 @@ async function createEntryPoint( ); } - // Auto-import examples for destination packages - if (destinationPackages.has(packageName)) { - const destinationMatch = packageName.match( - /@walkeros\/(?:(?:web|server)-)?destination-(.+)$/, - ); - if (destinationMatch) { - const destinationName = destinationMatch[1]; - const examplesVarName = `${destinationName.replace(/-/g, '_')}_examples`; - // Try importing from /examples subpath first (standard packages) - // Fall back to importing { examples } from main module (demo packages) - const isDemoPackage = packageName.includes('-demo'); - if (isDemoPackage) { - importStatements.push( - `import { examples as ${examplesVarName} } from '${packageName}';`, - ); - } else { - importStatements.push( - `import * as ${examplesVarName} from '${packageName}/examples';`, - ); - } - examplesMappings.push(` ${destinationName}: ${examplesVarName}`); - } - } + // Examples are no longer auto-imported - simulator loads them dynamically } - // Create examples object if we have any mappings - const examplesObject = - examplesMappings.length > 0 - ? `const examples = {\n${examplesMappings.join(',\n')}\n};\n\n` - : ''; - - // Separate imports from template processing - const importsCode = importStatements.join('\n'); + return { importStatements, examplesMappings }; +} - // Apply template if configured, otherwise just use code directly - let templatedCode: string; +/** + * Processes template if configured, otherwise returns code directly. + * Applies TemplateEngine to transform code with flow configuration. + */ +async function processTemplate( + flowConfig: Flow.Config, + buildOptions: BuildOptions, +): Promise { if (buildOptions.template) { const templateEngine = new TemplateEngine(); const flowWithProps = flowConfig as unknown as { @@ -441,9 +421,9 @@ async function createEntryPoint( destinations?: Record; collector?: Record; }; - templatedCode = await templateEngine.process( + return await templateEngine.process( buildOptions.template, - buildOptions.code, // Pass user code as parameter + buildOptions.code || '', // Pass user code as parameter (empty if undefined) (flowWithProps.sources || {}) as unknown as Record< string, SourceDestinationItem @@ -457,38 +437,99 @@ async function createEntryPoint( ); } else { // No template - just use the code directly - templatedCode = buildOptions.code; + return buildOptions.code || ''; } +} - // Apply module format wrapping if needed - let wrappedCode = templatedCode; +/** + * Wraps code for specific output formats. + * Adds export wrapper for ESM without template when no export exists. + */ +function wrapCodeForFormat( + code: string, + format: BuildOptions['format'], + hasTemplate: boolean, +): string { + // Template outputs ready-to-use code - no wrapping needed + if (hasTemplate) { + return code; + } - // Check if code already has any export statements (default, named, etc.) - const hasExport = /^\s*export\s/m.test(templatedCode); + // Only add export wrapper for server ESM without template + if (format === 'esm') { + // Check if code already has export statements + const hasExport = /^\s*export\s/m.test(code); - if (!hasExport) { - if (buildOptions.format === 'esm') { - // Export as default for ESM - wrappedCode = `export default ${templatedCode}`; - } else if (buildOptions.platform === 'browser' && buildOptions.globalName) { - // Assign to window for browser builds with globalName - wrappedCode = `window['${buildOptions.globalName}'] = ${templatedCode}`; + if (!hasExport) { + // Raw code without export - wrap as default export + return `export default ${code}`; } } - // Combine imports, examples object, and wrapped code + return code; +} + +/** + * Assembles the final entry point code from all components. + * Combines imports, examples object, and wrapped code with format-specific exports. + */ +function assembleFinalCode( + importStatements: string[], + examplesObject: string, + wrappedCode: string, + format: BuildOptions['format'], +): string { + const importsCode = importStatements.join('\n'); + let finalCode = importsCode ? `${importsCode}\n\n${examplesObject}${wrappedCode}` : `${examplesObject}${wrappedCode}`; - // If we have examples, export them as a named export - if (examplesObject && buildOptions.format === 'esm') { + // Make examples available for ESM + if (examplesObject && format === 'esm') { + // ESM: export as named export finalCode += `\n\nexport { examples };`; } return finalCode; } +async function createEntryPoint( + flowConfig: Flow.Config, + buildOptions: BuildOptions, + packagePaths: Map, +): Promise { + // Detect destination packages for auto-importing examples + const destinationPackages = detectDestinationPackages(flowConfig); + + // Generate import statements (examples generation removed) + const { importStatements } = generateImportStatements( + buildOptions.packages, + destinationPackages, + ); + + // No longer generate examples in bundles - simulator loads them dynamically + const examplesObject = ''; + + // Process template or use code directly + const templatedCode = await processTemplate(flowConfig, buildOptions); + + // Wrap code for specific output format + const wrappedCode = wrapCodeForFormat( + templatedCode, + buildOptions.format, + !!buildOptions.template, + ); + + // Assemble final entry point code + return assembleFinalCode( + importStatements, + examplesObject, + wrappedCode, + buildOptions.format, + ); +} + interface EsbuildError { errors?: Array<{ text: string; diff --git a/packages/cli/src/commands/bundle/index.ts b/packages/cli/src/commands/bundle/index.ts index a365e5a90..31585d2b9 100644 --- a/packages/cli/src/commands/bundle/index.ts +++ b/packages/cli/src/commands/bundle/index.ts @@ -6,22 +6,25 @@ import path from 'path'; import { + createCommandLogger, createLogger, createTimer, createSuccessOutput, createErrorOutput, executeCommand, -} from '../../core'; + getErrorMessage, + buildCommonDockerArgs, +} from '../../core/index.js'; import { loadJsonConfig, loadBundleConfig, loadAllEnvironments, parseBundleConfig, type LoadConfigResult, -} from '../../config'; -import type { GlobalOptions } from '../../types'; -import { bundleCore } from './bundler'; -import { displayStats, createStatsSummary } from './stats'; +} from '../../config/index.js'; +import type { GlobalOptions } from '../../types/index.js'; +import { bundleCore } from './bundler.js'; +import { displayStats, createStatsSummary } from './stats.js'; export interface BundleCommandOptions extends GlobalOptions { config: string; @@ -38,21 +41,15 @@ export async function bundleCommand( const timer = createTimer(); timer.start(); - const logger = createLogger({ - verbose: options.verbose, - silent: options.silent ?? false, - json: options.json, - }); + const logger = createCommandLogger(options); - // Build Docker args - const dockerArgs = [options.config]; + // Build Docker args - start with common flags + const dockerArgs = buildCommonDockerArgs(options); + // Add bundle-specific flags if (options.env) dockerArgs.push('--env', options.env); if (options.all) dockerArgs.push('--all'); if (options.stats) dockerArgs.push('--stats'); - if (options.json) dockerArgs.push('--json'); if (options.cache === false) dockerArgs.push('--no-cache'); - if (options.verbose) dockerArgs.push('--verbose'); - if (options.silent) dockerArgs.push('--silent'); await executeCommand( async () => { @@ -64,7 +61,8 @@ export async function bundleCommand( // Step 1: Read configuration file logger.info('📦 Reading configuration...'); - const configPath = path.resolve(options.config); + // Don't resolve URLs - pass them through as-is for download + const configPath = options.config; const rawConfig = await loadJsonConfig(configPath); // Step 2: Load configuration(s) based on flags @@ -125,8 +123,7 @@ export async function bundleCommand( displayStats(stats, logger); } } catch (error) { - const errorMessage = - error instanceof Error ? error.message : String(error); + const errorMessage = getErrorMessage(error); results.push({ environment, success: false, @@ -185,8 +182,7 @@ export async function bundleCommand( } } catch (error) { const duration = timer.getElapsed() / 1000; - const errorMessage = - error instanceof Error ? error.message : String(error); + const errorMessage = getErrorMessage(error); if (options.json) { // JSON error output for CI/CD @@ -204,6 +200,7 @@ export async function bundleCommand( dockerArgs, options, logger, + options.config, ); } @@ -262,10 +259,7 @@ export async function bundle( } // 4. Create logger internally - const logger = createLogger({ - silent: options.silent ?? false, - verbose: options.verbose ?? false, - }); + const logger = createCommandLogger(options); // 5. Call core bundler return await bundleCore( diff --git a/packages/cli/src/commands/bundle/package-manager.ts b/packages/cli/src/commands/bundle/package-manager.ts index 5e89dc068..c3460467d 100644 --- a/packages/cli/src/commands/bundle/package-manager.ts +++ b/packages/cli/src/commands/bundle/package-manager.ts @@ -1,7 +1,7 @@ import pacote from 'pacote'; import path from 'path'; import fs from 'fs-extra'; -import { Logger } from '../../core'; +import { Logger } from '../../core/index.js'; export interface Package { name: string; diff --git a/packages/cli/src/commands/bundle/serializer.ts b/packages/cli/src/commands/bundle/serializer.ts index aa97cceed..e1146a37d 100644 --- a/packages/cli/src/commands/bundle/serializer.ts +++ b/packages/cli/src/commands/bundle/serializer.ts @@ -3,12 +3,12 @@ * Converts JSON objects to valid JavaScript code for use in templates */ -import { isObject } from '../../config'; +import { isObject } from '../../config/index.js'; import type { TemplateSource, TemplateDestination, ProcessedTemplateVariables, -} from '../../types/template'; +} from '../../types/template.js'; export interface SerializerOptions { indent?: number; diff --git a/packages/cli/src/commands/bundle/stats.ts b/packages/cli/src/commands/bundle/stats.ts index c8bfd8529..68f921304 100644 --- a/packages/cli/src/commands/bundle/stats.ts +++ b/packages/cli/src/commands/bundle/stats.ts @@ -1,9 +1,9 @@ /** * Bundle statistics display utilities */ -import { formatBytes } from '../../core'; -import type { BundleStats } from './bundler'; -import type { Logger } from '../../core'; +import { formatBytes } from '../../core/index.js'; +import type { BundleStats } from './bundler.js'; +import type { Logger } from '../../core/index.js'; /** * Display detailed bundle statistics to console diff --git a/packages/cli/src/commands/bundle/template-engine.ts b/packages/cli/src/commands/bundle/template-engine.ts index c511f887e..6a66c511c 100644 --- a/packages/cli/src/commands/bundle/template-engine.ts +++ b/packages/cli/src/commands/bundle/template-engine.ts @@ -1,8 +1,8 @@ import fs from 'fs-extra'; -import path from 'path'; import Handlebars from 'handlebars'; -import type { SourceDestinationItem } from '../../types/template'; -import { processTemplateVariables } from './serializer'; +import type { SourceDestinationItem } from '../../types/template.js'; +import { processTemplateVariables } from './serializer.js'; +import { resolveAsset } from '../../core/asset-resolver.js'; export class TemplateEngine { private handlebars: typeof Handlebars; @@ -10,13 +10,19 @@ export class TemplateEngine { constructor() { // Create a new Handlebars instance this.handlebars = Handlebars.create(); + + // Register equality helper for conditional window assignment + this.handlebars.registerHelper('eq', (a: unknown, b: unknown) => a === b); } /** * Load template content from file path + * + * @param templatePath - Template path (bare name, relative, or absolute) */ async loadTemplate(templatePath: string): Promise { - const resolvedPath = path.resolve(templatePath); + // Use unified asset resolver (works in both local and Docker) + const resolvedPath = resolveAsset(templatePath, 'template'); if (!(await fs.pathExists(resolvedPath))) { throw new Error(`Template file not found: ${resolvedPath}`); diff --git a/packages/cli/src/commands/push/index.ts b/packages/cli/src/commands/push/index.ts new file mode 100644 index 000000000..dd1e8886e --- /dev/null +++ b/packages/cli/src/commands/push/index.ts @@ -0,0 +1,365 @@ +import path from 'path'; +import os from 'os'; +import { JSDOM, VirtualConsole } from 'jsdom'; +import fs from 'fs-extra'; +import type { Elb } from '@walkeros/core'; +import { + createCommandLogger, + createLogger, + executeCommand, + getErrorMessage, + buildCommonDockerArgs, + type Logger, +} from '../../core/index.js'; +import { + loadJsonConfig, + loadJsonFromSource, + loadBundleConfig, +} from '../../config/index.js'; +import { bundle } from '../bundle/index.js'; +import type { PushCommandOptions, PushResult } from './types.js'; + +/** + * CLI command handler for push command + */ +export async function pushCommand(options: PushCommandOptions): Promise { + const logger = createCommandLogger(options); + + // Build Docker args + const dockerArgs = buildCommonDockerArgs(options); + dockerArgs.push('--event', options.event); + if (options.env) dockerArgs.push('--env', options.env); + + await executeCommand( + async () => { + const startTime = Date.now(); + + try { + // Step 1: Load event + logger.info('📥 Loading event...'); + const event = await loadJsonFromSource(options.event, { + name: 'event', + }); + + // Validate event format + if ( + !event || + typeof event !== 'object' || + !('name' in event) || + typeof event.name !== 'string' + ) { + throw new Error( + 'Event must be an object with a "name" property (string)', + ); + } + + // Warn about event naming format + if (!event.name.includes(' ')) { + logger.warn( + `Event name "${event.name}" should follow "ENTITY ACTION" format (e.g., "page view")`, + ); + } + + // Step 2: Load config + logger.info('📦 Loading flow configuration...'); + const configPath = path.resolve(options.config); + const rawConfig = await loadJsonConfig(configPath); + const { flowConfig, buildOptions, environment, isMultiEnvironment } = + loadBundleConfig(rawConfig, { + configPath: options.config, + environment: options.env, + logger, + }); + + const platform = flowConfig.platform; + + // Step 3: Bundle to temp file + logger.info('🔨 Bundling flow configuration...'); + const tempPath = path.join( + os.tmpdir(), + `walkeros-push-${Date.now()}-${Math.random().toString(36).slice(2, 9)}.${platform === 'web' ? 'js' : 'mjs'}`, + ); + + const configWithOutput = { + flow: flowConfig, + build: { + ...buildOptions, + output: tempPath, + // Web uses IIFE for browser-like execution, server uses ESM + format: platform === 'web' ? ('iife' as const) : ('esm' as const), + platform: + platform === 'web' ? ('browser' as const) : ('node' as const), + ...(platform === 'web' && { + windowCollector: 'collector', + windowElb: 'elb', + }), + }, + }; + + await bundle(configWithOutput, { + cache: true, + verbose: options.verbose, + silent: !options.verbose, + }); + + logger.debug(`Bundle created: ${tempPath}`); + + // Step 4: Execute based on platform + let result: PushResult; + + if (platform === 'web') { + logger.info('🌐 Executing in web environment (JSDOM)...'); + result = await executeWebPush(tempPath, event, logger); + } else if (platform === 'server') { + logger.info('🖥️ Executing in server environment (Node.js)...'); + result = await executeServerPush(tempPath, event, logger); + } else { + throw new Error(`Unsupported platform: ${platform}`); + } + + // Step 5: Output results + const duration = Date.now() - startTime; + + if (options.json) { + // JSON output + const outputLogger = createLogger({ silent: false, json: false }); + outputLogger.log( + 'white', + JSON.stringify( + { + success: result.success, + event: result.elbResult, + duration, + }, + null, + 2, + ), + ); + } else { + // Standard output + if (result.success) { + logger.success('✅ Event pushed successfully'); + if (result.elbResult && typeof result.elbResult === 'object') { + const pushResult = result.elbResult as unknown as Record< + string, + unknown + >; + if ('id' in pushResult && pushResult.id) { + logger.info(` Event ID: ${pushResult.id}`); + } + if ('entity' in pushResult && pushResult.entity) { + logger.info(` Entity: ${pushResult.entity}`); + } + if ('action' in pushResult && pushResult.action) { + logger.info(` Action: ${pushResult.action}`); + } + } + logger.info(` Duration: ${duration}ms`); + } else { + logger.error(`❌ Push failed: ${result.error}`); + process.exit(1); + } + } + + // Cleanup + try { + await fs.remove(tempPath); + } catch { + // Ignore cleanup errors + } + } catch (error) { + const duration = Date.now() - startTime; + const errorMessage = getErrorMessage(error); + + if (options.json) { + const outputLogger = createLogger({ silent: false, json: false }); + outputLogger.log( + 'white', + JSON.stringify( + { + success: false, + error: errorMessage, + duration, + }, + null, + 2, + ), + ); + } else { + logger.error(`❌ Push command failed: ${errorMessage}`); + } + + process.exit(1); + } + }, + 'push', + dockerArgs, + options, + logger, + options.config, + ); +} + +/** + * Execute push for web platform using JSDOM with real APIs + */ +async function executeWebPush( + bundlePath: string, + event: Record, + logger: Logger, +): Promise { + const startTime = Date.now(); + + try { + // Create JSDOM with silent console + const virtualConsole = new VirtualConsole(); + const dom = new JSDOM('', { + url: 'http://localhost', + runScripts: 'dangerously', + resources: 'usable', + virtualConsole, + }); + + const { window } = dom; + + // JSDOM provides fetch natively, no need to inject node-fetch + + // Load and execute bundle + logger.debug('Loading bundle...'); + const bundleCode = await fs.readFile(bundlePath, 'utf8'); + window.eval(bundleCode); + + // Wait for window.elb assignment + logger.debug('Waiting for elb...'); + await waitForWindowProperty( + window as unknown as Record, + 'elb', + 5000, + ); + + const windowObj = window as unknown as Record; + const elb = windowObj.elb as unknown as ( + name: string, + data: Record, + ) => Promise; + + // Push event + logger.info(`Pushing event: ${event.name}`); + const eventData = (event.data || {}) as Record; + const elbResult = await elb(event.name as string, eventData); + + return { + success: true, + elbResult, + duration: Date.now() - startTime, + }; + } catch (error) { + return { + success: false, + duration: Date.now() - startTime, + error: getErrorMessage(error), + }; + } +} + +/** + * Execute push for server platform using Node.js + */ +async function executeServerPush( + bundlePath: string, + event: Record, + logger: Logger, + timeout: number = 60000, // 60 second default timeout +): Promise { + const startTime = Date.now(); + + try { + // Create timeout promise + const timeoutPromise = new Promise((_, reject) => { + setTimeout( + () => reject(new Error(`Server push timeout after ${timeout}ms`)), + timeout, + ); + }); + + // Execute with timeout + const executePromise = (async () => { + // Dynamic import of ESM bundle + logger.debug('Importing bundle...'); + const flowModule = await import(bundlePath); + + if (!flowModule.default || typeof flowModule.default !== 'function') { + throw new Error('Bundle does not export default factory function'); + } + + // Call factory function to start flow + logger.debug('Calling factory function...'); + const result = await flowModule.default(); + + if (!result || !result.elb || typeof result.elb !== 'function') { + throw new Error( + 'Factory function did not return valid result with elb', + ); + } + + const { elb } = result; + + // Push event + logger.info(`Pushing event: ${event.name}`); + const eventData = (event.data || {}) as Record; + const elbResult = await ( + elb as ( + name: string, + data: Record, + ) => Promise + )(event.name as string, eventData); + + return { + success: true, + elbResult, + duration: Date.now() - startTime, + }; + })(); + + // Race between execution and timeout + return await Promise.race([executePromise, timeoutPromise]); + } catch (error) { + return { + success: false, + duration: Date.now() - startTime, + error: getErrorMessage(error), + }; + } +} + +/** + * Wait for window property to be assigned + */ +function waitForWindowProperty( + window: Record, + prop: string, + timeout: number = 5000, +): Promise { + return new Promise((resolve, reject) => { + const start = Date.now(); + + const check = () => { + if (window[prop] !== undefined) { + resolve(); + } else if (Date.now() - start > timeout) { + reject( + new Error( + `Timeout waiting for window.${prop}. IIFE may have failed to execute.`, + ), + ); + } else { + setImmediate(check); + } + }; + + check(); + }); +} + +// Export types +export type { PushCommandOptions, PushResult }; diff --git a/packages/cli/src/commands/push/types.ts b/packages/cli/src/commands/push/types.ts new file mode 100644 index 000000000..34abf2fd2 --- /dev/null +++ b/packages/cli/src/commands/push/types.ts @@ -0,0 +1,22 @@ +import type { Elb } from '@walkeros/core'; +import type { GlobalOptions } from '../../types/index.js'; + +/** + * Push command options + */ +export interface PushCommandOptions extends GlobalOptions { + config: string; + event: string; + env?: string; + json?: boolean; +} + +/** + * Push execution result + */ +export interface PushResult { + success: boolean; + elbResult?: Elb.PushResult; + duration: number; + error?: string; +} diff --git a/packages/cli/src/commands/run/__tests__/run.integration.test.ts b/packages/cli/src/commands/run/__tests__/run.integration.test.ts index aa047fb77..e2a7cc7a6 100644 --- a/packages/cli/src/commands/run/__tests__/run.integration.test.ts +++ b/packages/cli/src/commands/run/__tests__/run.integration.test.ts @@ -5,7 +5,7 @@ * No Docker daemon required - runs directly in Node.js process */ -import { runCommand } from '../index'; +import { runCommand } from '../index.js'; import { join } from 'path'; import { existsSync } from 'fs'; diff --git a/packages/cli/src/commands/run/__tests__/validators.test.ts b/packages/cli/src/commands/run/__tests__/validators.test.ts index 0844ecd86..8c50e4e92 100644 --- a/packages/cli/src/commands/run/__tests__/validators.test.ts +++ b/packages/cli/src/commands/run/__tests__/validators.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from '@jest/globals'; import { mkdirSync, writeFileSync, rmSync } from 'fs'; import { join } from 'path'; -import { validateMode, validateFlowFile, validatePort } from '../validators'; +import { validateMode, validateFlowFile, validatePort } from '../validators.js'; describe('validators', () => { describe('validateMode', () => { diff --git a/packages/cli/src/commands/run/execution.ts b/packages/cli/src/commands/run/execution.ts new file mode 100644 index 000000000..cf0afcafa --- /dev/null +++ b/packages/cli/src/commands/run/execution.ts @@ -0,0 +1,49 @@ +import type { RuntimeConfig, ServeConfig } from '@walkeros/docker'; +import { runFlow, runServeMode } from '@walkeros/docker'; + +/** + * Execute run command locally + * + * @param mode - Run mode (collect | serve) + * @param flowPath - Path to flow bundle (required for collect, optional for serve) + * @param options - Runtime options + */ +export async function executeRunLocal( + mode: 'collect' | 'serve', + flowPath: string | null, + options: { + port?: number; + host?: string; + serveName?: string; + servePath?: string; + }, +): Promise { + switch (mode) { + case 'collect': { + if (!flowPath) { + throw new Error('Flow path is required for collect mode'); + } + const config: RuntimeConfig = { + port: options.port, + host: options.host, + }; + await runFlow(flowPath, config); + break; + } + + case 'serve': { + const config: ServeConfig = { + port: options.port, + host: options.host, + serveName: options.serveName, + servePath: options.servePath, + filePath: flowPath || undefined, + }; + await runServeMode(config); + break; + } + + default: + throw new Error(`Unknown mode: ${mode}`); + } +} diff --git a/packages/cli/src/commands/run/index.ts b/packages/cli/src/commands/run/index.ts index 56a3ff4da..18b774d90 100644 --- a/packages/cli/src/commands/run/index.ts +++ b/packages/cli/src/commands/run/index.ts @@ -6,23 +6,23 @@ */ import path from 'path'; -import os from 'os'; import { - runFlow, - runServeMode, - type RuntimeConfig, - type ServeConfig, -} from '@walkeros/docker'; -import { bundle } from '../bundle'; -import { createLogger, createTimer, executeCommand } from '../../core'; -import { loadJsonConfig } from '../../config'; -import { validateMode, validateFlowFile, validatePort } from './validators'; + createCommandLogger, + createTimer, + getExecutionMode, + getErrorMessage, + executeRunInDocker, + isDockerAvailable, +} from '../../core/index.js'; +import { validateMode, validateFlowFile, validatePort } from './validators.js'; +import { prepareBundleForRun, isPreBuiltConfig } from './utils.js'; +import { executeRunLocal } from './execution.js'; import type { RunMode, RunCommandOptions, RunOptions, RunResult, -} from './types'; +} from './types.js'; /** * CLI command function for `walkeros run` @@ -37,150 +37,116 @@ export async function runCommand( const timer = createTimer(); timer.start(); - const logger = createLogger({ - verbose: options.verbose, - silent: options.silent ?? false, - json: options.json, - }); + const logger = createCommandLogger(options); - // Build Docker args - const dockerArgs = [mode, options.config]; - if (options.port !== undefined) - dockerArgs.push('--port', String(options.port)); - if (options.host) dockerArgs.push('--host', options.host); - if (options.staticDir) dockerArgs.push('--static-dir', options.staticDir); - if (options.json) dockerArgs.push('--json'); - if (options.verbose) dockerArgs.push('--verbose'); - if (options.silent) dockerArgs.push('--silent'); - - await executeCommand( - async () => { - try { - // Step 1: Validate inputs - validateMode(mode); - const configPath = validateFlowFile(options.config); - - if (options.port !== undefined) { - validatePort(options.port); - } - - // Step 2: Determine if config is pre-built or needs bundling - const isPreBuilt = - configPath.endsWith('.mjs') || - configPath.endsWith('.js') || - configPath.endsWith('.cjs'); - - let flowPath: string; - - if (isPreBuilt) { - // Use pre-built bundle directly - flowPath = path.resolve(configPath); - if (!options.json) { - logger.info(`📦 Using pre-built flow: ${path.basename(flowPath)}`); - } - } else { - // Bundle JSON config first - if (!options.json) { - logger.info('🔨 Building flow bundle...'); - } + try { + // Step 1: Validate inputs + validateMode(mode); + const configPath = validateFlowFile(options.config); - // Read config and modify output path - const rawConfig = await loadJsonConfig(configPath); - const tempPath = path.join( - os.tmpdir(), - `walkeros-${Date.now()}-${Math.random().toString(36).slice(2, 9)}.mjs`, - ); + if (options.port !== undefined) { + validatePort(options.port); + } - // Ensure config has build.output set to temp path - const existingBuild = - typeof rawConfig === 'object' && - rawConfig !== null && - 'build' in rawConfig && - typeof (rawConfig as Record).build === 'object' - ? ((rawConfig as Record).build as Record< - string, - unknown - >) - : {}; + // Step 2: Determine if config is pre-built or needs bundling + const isPreBuilt = isPreBuiltConfig(configPath); - const configWithOutput = { - ...(rawConfig as Record), - build: { - ...existingBuild, - output: tempPath, - }, - }; + let flowPath: string | null = null; - await bundle(configWithOutput, { - cache: true, - verbose: options.verbose, - silent: options.json, - }); + if (mode === 'collect') { + if (isPreBuilt) { + // Use pre-built bundle directly + flowPath = path.resolve(configPath); + if (!options.json && !options.silent) { + logger.info(`📦 Using pre-built flow: ${path.basename(flowPath)}`); + } + } else { + // Bundle JSON config first + if (!options.json && !options.silent) { + logger.info('🔨 Building flow bundle...'); + } - flowPath = tempPath; + flowPath = await prepareBundleForRun(configPath, { + verbose: options.verbose, + silent: options.json || options.silent, + }); - if (!options.json) { - logger.success('✅ Bundle ready'); - } + if (!options.json && !options.silent) { + logger.success('✅ Bundle ready'); } + } + } - // Step 3: Run the flow using Docker package - if (!options.json) { - const modeLabel = mode === 'collect' ? 'Collector' : 'Server'; - logger.info(`🚀 Starting ${modeLabel}...`); - } + // Step 3: Execute based on mode + const executionMode = getExecutionMode(options); + + // Handle dry-run + if (options.dryRun) { + if (executionMode === 'docker') { + logger.info( + `[DRY-RUN] Would execute in Docker: run ${mode} with runtime image`, + ); + } else { + logger.info(`[DRY-RUN] Would execute locally: run ${mode}`); + } + return; + } - switch (mode) { - case 'collect': { - const config: RuntimeConfig = { - port: options.port, - host: options.host, - }; - await runFlow(flowPath, config); - break; - } + if (executionMode === 'docker') { + // Docker mode: Use production runtime image + const dockerAvailable = await isDockerAvailable(); + if (!dockerAvailable) { + throw new Error( + 'Docker is not available. Please install Docker or use --local flag to execute locally.', + ); + } - case 'serve': { - const config: ServeConfig = { - port: options.port, - host: options.host, - staticDir: options.staticDir, - }; - await runServeMode(config); - break; - } + if (!options.json && !options.silent) { + logger.info('🐳 Executing in production runtime container...'); + } - default: - throw new Error(`Unknown mode: ${mode}`); - } + await executeRunInDocker(mode as 'collect' | 'serve', flowPath, { + port: options.port, + host: options.host, + serveName: options.serveName, + servePath: options.servePath, + silent: options.silent, + }); + } else { + // Local mode: Use library functions + if (!options.json && !options.silent) { + const modeLabel = mode === 'collect' ? 'Collector' : 'Server'; + logger.info(`🖥️ Starting ${modeLabel} locally...`); + } - // Note: runFlow runs forever, so we won't reach here unless it fails - } catch (error) { - const duration = timer.getElapsed() / 1000; - const errorMessage = - error instanceof Error ? error.message : String(error); + await executeRunLocal(mode as 'collect' | 'serve', flowPath, { + port: options.port, + host: options.host, + serveName: options.serveName, + servePath: options.servePath, + }); + } - if (options.json) { - const output = { - success: false, - mode, - error: errorMessage, - duration, - }; - // eslint-disable-next-line no-console - console.log(JSON.stringify(output, null, 2)); - } else { - logger.error('❌ Run failed:'); - logger.error(errorMessage); - } - process.exit(1); - } - }, - 'run', - dockerArgs, - options, - logger, - ); + // Note: Both Docker and local modes run forever, so we won't reach here unless they fail + } catch (error) { + const duration = timer.getElapsed() / 1000; + const errorMessage = getErrorMessage(error); + + if (options.json) { + const output = { + success: false, + mode, + error: errorMessage, + duration, + }; + // eslint-disable-next-line no-console + console.log(JSON.stringify(output, null, 2)); + } else { + logger.error('❌ Run failed:'); + logger.error(errorMessage); + } + process.exit(1); + } } /** @@ -227,10 +193,7 @@ export async function run( } // Determine if config is pre-built or needs bundling - const isPreBuilt = - flowFile.endsWith('.mjs') || - flowFile.endsWith('.js') || - flowFile.endsWith('.cjs'); + const isPreBuilt = isPreBuiltConfig(flowFile); let flowPath: string; @@ -238,65 +201,19 @@ export async function run( flowPath = path.resolve(flowFile); } else { // Bundle JSON config - const rawConfig = await loadJsonConfig(flowFile); - const tempPath = path.join( - os.tmpdir(), - `walkeros-${Date.now()}-${Math.random().toString(36).slice(2, 9)}.mjs`, - ); - - // Ensure config has build.output set to temp path - const existingBuild = - typeof rawConfig === 'object' && - rawConfig !== null && - 'build' in rawConfig && - typeof (rawConfig as Record).build === 'object' - ? ((rawConfig as Record).build as Record< - string, - unknown - >) - : {}; - - const configWithOutput = { - ...(rawConfig as Record), - build: { - ...existingBuild, - output: tempPath, - }, - }; - - await bundle(configWithOutput, { - cache: true, + flowPath = await prepareBundleForRun(flowFile, { verbose: options.verbose, silent: true, }); - - flowPath = tempPath; } // Run the flow using Docker package - switch (mode) { - case 'collect': { - const config: RuntimeConfig = { - port: options.port, - host: options.host, - }; - await runFlow(flowPath, config); - break; - } - - case 'serve': { - const config: ServeConfig = { - port: options.port, - host: options.host, - staticDir: options.staticDir, - }; - await runServeMode(config); - break; - } - - default: - throw new Error(`Unknown mode: ${mode}`); - } + await executeRunLocal(mode, flowPath, { + port: options.port, + host: options.host, + serveName: options.serveName, + servePath: options.servePath, + }); // Success (though runFlow runs forever, so we typically don't reach here) return { @@ -309,7 +226,7 @@ export async function run( success: false, exitCode: 1, duration: Date.now() - startTime, - error: error instanceof Error ? error.message : String(error), + error: getErrorMessage(error), }; } } diff --git a/packages/cli/src/commands/run/types.ts b/packages/cli/src/commands/run/types.ts index 003d9117d..009b4133e 100644 --- a/packages/cli/src/commands/run/types.ts +++ b/packages/cli/src/commands/run/types.ts @@ -4,7 +4,7 @@ * Types for running walkerOS flows via CLI using @walkeros/docker as a library */ -import type { GlobalOptions } from '../../types'; +import type { GlobalOptions } from '../../types/index.js'; /** * Run mode - determines which execution mode to use @@ -24,8 +24,11 @@ export interface RunCommandOptions extends GlobalOptions { /** Server host (default: 0.0.0.0) */ host?: string; - /** Static directory for serve mode */ - staticDir?: string; + /** Serve path (URL directory path, e.g., 'libs/v1') */ + servePath?: string; + + /** Serve name (filename in URL, default: walker.js) */ + serveName?: string; /** Enable JSON output */ json?: boolean; @@ -44,8 +47,11 @@ export interface RunOptions { /** Server host */ host?: string; - /** Static directory for serve mode */ - staticDir?: string; + /** Serve path (URL directory path, e.g., 'libs/v1') */ + servePath?: string; + + /** Serve name (filename in URL, default: walker.js) */ + serveName?: string; /** Suppress output */ silent?: boolean; diff --git a/packages/cli/src/commands/run/utils.ts b/packages/cli/src/commands/run/utils.ts new file mode 100644 index 000000000..4fa2b6e00 --- /dev/null +++ b/packages/cli/src/commands/run/utils.ts @@ -0,0 +1,80 @@ +/** + * Run Command Utilities + * + * Shared utilities for the run command + */ + +import path from 'path'; +import os from 'os'; +import { loadJsonConfig } from '../../config/index.js'; +import { bundle } from '../bundle/index.js'; + +/** + * Prepares a JSON config file for execution by bundling it to a temporary location + * + * @param configPath - Path to the JSON configuration file + * @param options - Bundle options + * @param options.verbose - Enable verbose logging + * @param options.silent - Suppress output + * @returns Path to the bundled output file + */ +export async function prepareBundleForRun( + configPath: string, + options: { + verbose?: boolean; + silent?: boolean; + }, +): Promise { + // Load JSON config + const rawConfig = await loadJsonConfig(configPath); + + // Generate unique temp path + const tempPath = path.join( + os.tmpdir(), + `walkeros-${Date.now()}-${Math.random().toString(36).slice(2, 9)}.mjs`, + ); + + // Extract existing build config if present + const existingBuild = + typeof rawConfig === 'object' && + rawConfig !== null && + 'build' in rawConfig && + typeof (rawConfig as Record).build === 'object' + ? ((rawConfig as Record).build as Record< + string, + unknown + >) + : {}; + + // Create config with temp output path + const configWithOutput = { + ...(rawConfig as Record), + build: { + ...existingBuild, + output: tempPath, + }, + }; + + // Bundle the config + await bundle(configWithOutput, { + cache: true, + verbose: options.verbose, + silent: options.silent, + }); + + return tempPath; +} + +/** + * Checks if a config file is pre-built or needs bundling + * + * @param configPath - Path to configuration file + * @returns True if file is pre-built (js/mjs/cjs), false if needs bundling (json) + */ +export function isPreBuiltConfig(configPath: string): boolean { + return ( + configPath.endsWith('.mjs') || + configPath.endsWith('.js') || + configPath.endsWith('.cjs') + ); +} diff --git a/packages/cli/src/commands/run/validators.ts b/packages/cli/src/commands/run/validators.ts index 18d046a96..ba12d5ebe 100644 --- a/packages/cli/src/commands/run/validators.ts +++ b/packages/cli/src/commands/run/validators.ts @@ -5,8 +5,8 @@ */ import { existsSync } from 'fs'; -import { resolve } from 'path'; -import type { RunMode } from './types'; +import { resolveAsset } from '../../core/asset-resolver.js'; +import type { RunMode } from './types.js'; /** * Valid run modes @@ -32,12 +32,13 @@ export function validateMode(mode: string): asserts mode is RunMode { /** * Validates flow file exists * - * @param filePath - Path to flow configuration file + * @param filePath - Path to flow configuration file (bare name, relative, or absolute) * @returns Absolute path to flow file * @throws Error if file doesn't exist */ export function validateFlowFile(filePath: string): string { - const absolutePath = resolve(filePath); + // Use asset resolver to handle bare names, relative paths, and absolute paths + const absolutePath = resolveAsset(filePath, 'bundle'); if (!existsSync(absolutePath)) { throw new Error( diff --git a/packages/cli/src/commands/simulate/env-loader.ts b/packages/cli/src/commands/simulate/env-loader.ts new file mode 100644 index 000000000..f6b9bd913 --- /dev/null +++ b/packages/cli/src/commands/simulate/env-loader.ts @@ -0,0 +1,66 @@ +interface DestinationEnv { + init?: Record; + push: Record; + simulation?: string[]; +} + +interface DestinationConfig { + package?: string; + config?: Record; +} + +/** + * Dynamically loads env examples from destination packages. + * + * Imports from `/dev` subpath (e.g., '@walkeros/web-destination-gtag/dev') + * and extracts the `env` object which contains: + * - push: Mock environment with API functions (gtag, fbq, etc.) + * - simulation: Array of tracking paths for call verification + * + * @param destinations - Destination configuration from flow config + * @returns Map of destination key to env object + */ +export async function loadDestinationEnvs( + destinations: Record, +): Promise> { + const envs: Record = {}; + + for (const [destKey, destConfig] of Object.entries(destinations)) { + const typedConfig = destConfig as DestinationConfig; + + // Skip if no package field + if (!typedConfig.package) { + continue; + } + + try { + // Determine import path + const packageName = typedConfig.package; + const isDemoPackage = packageName.includes('-demo'); + const importPath = isDemoPackage ? packageName : `${packageName}/dev`; + + // Dynamic import + const module = await import(importPath); + + // Extract env from examples + const examplesModule = module.examples || module.default?.examples; + const envModule = examplesModule?.env; + + if (envModule?.push) { + envs[destKey] = { + init: envModule.init, + push: envModule.push, + simulation: envModule.simulation || [], + }; + } + } catch (error) { + // Silently skip destinations without env or invalid packages + // eslint-disable-next-line no-console + console.warn( + `Warning: Could not load env for destination "${destKey}": ${error instanceof Error ? error.message : String(error)}`, + ); + } + } + + return envs; +} diff --git a/packages/cli/src/commands/simulate/index.ts b/packages/cli/src/commands/simulate/index.ts index 360c87124..c9e0e9ec3 100644 --- a/packages/cli/src/commands/simulate/index.ts +++ b/packages/cli/src/commands/simulate/index.ts @@ -1,10 +1,13 @@ +import { simulateCore, formatSimulationResult } from './simulator.js'; import { - simulateCore, - parseEventInput, - formatSimulationResult, -} from './simulator'; -import { createLogger, executeCommand } from '../../core'; -import type { SimulateCommandOptions } from './types'; + createCommandLogger, + createLogger, + executeCommand, + getErrorMessage, + buildCommonDockerArgs, +} from '../../core/index.js'; +import { loadJsonFromSource } from '../../config/index.js'; +import type { SimulateCommandOptions } from './types.js'; /** * CLI command handler for simulate command @@ -12,26 +15,22 @@ import type { SimulateCommandOptions } from './types'; export async function simulateCommand( options: SimulateCommandOptions, ): Promise { - const logger = createLogger({ - verbose: options.verbose, - silent: options.silent ?? false, - json: options.json, - }); + const logger = createCommandLogger(options); - // Build Docker args - const dockerArgs = [options.config]; + // Build Docker args - start with common flags + const dockerArgs = buildCommonDockerArgs(options); + // Add simulate-specific flag if (options.event) dockerArgs.push('--event', options.event); - if (options.json) dockerArgs.push('--json'); - if (options.verbose) dockerArgs.push('--verbose'); - if (options.silent) dockerArgs.push('--silent'); await executeCommand( async () => { const startTime = Date.now(); try { - // Parse event input - const event = parseEventInput(options.event); + // Load event from inline JSON, file path, or URL + const event = await loadJsonFromSource(options.event, { + name: 'event', + }); // Execute simulation const result = await simulateCore(options.config, event, { @@ -58,8 +57,7 @@ export async function simulateCommand( process.exit(1); } } catch (error) { - const errorMessage = - error instanceof Error ? error.message : String(error); + const errorMessage = getErrorMessage(error); if (options.json) { // JSON error output - create output logger that always logs @@ -87,6 +85,7 @@ export async function simulateCommand( dockerArgs, options, logger, + options.config, ); } @@ -151,5 +150,5 @@ export async function simulate( } // Re-export types and utilities for testing -export * from './types'; -export * from './simulator'; +export * from './types.js'; +export * from './simulator.js'; diff --git a/packages/cli/src/commands/simulate/jsdom-executor.ts b/packages/cli/src/commands/simulate/jsdom-executor.ts new file mode 100644 index 000000000..0b856f7a3 --- /dev/null +++ b/packages/cli/src/commands/simulate/jsdom-executor.ts @@ -0,0 +1,205 @@ +/** + * JSDOM-based executor for simulating IIFE bundles + * + * Executes actual production IIFE bundles in a virtual DOM environment + * with env-based mocking from destination examples. + */ + +import { JSDOM, VirtualConsole } from 'jsdom'; +import fs from 'fs-extra'; +import type { Elb } from '@walkeros/core'; +import { getErrorMessage } from '../../core/index.js'; +import type { CallTracker, ApiCall } from './tracker.js'; + +export interface ExecutionResult { + collector: unknown; + elb: unknown; + elbResult: Elb.PushResult | undefined; + usage: Record; + duration: number; +} + +interface DestinationEnv { + init?: Record; + push: Record; + simulation?: string[]; +} + +/** + * Build sandbox from destination-provided envs + * + * Merges env mocks from each destination's envs, wrapping + * specified paths with CallTracker for API call tracking. + */ +function buildSandboxFromEnvs( + envs: Record, + destinations: Record, + tracker: CallTracker, +): { window: Record; document: Record } { + // Base browser APIs (not provided by destinations) + const baseBrowserMocks = { + Image: class MockImage { + src = ''; + onload = (() => {}) as unknown; + onerror = (() => {}) as unknown; + }, + fetch: async () => ({ ok: true, json: async () => ({}) }), + location: { href: 'http://localhost' }, + navigator: { userAgent: 'Mozilla/5.0 (walkerOS Simulation)' }, + }; + + const sandbox = { + window: { ...baseBrowserMocks } as Record, + document: {} as Record, + }; + + // Add destination-specific env mocks + for (const [destKey, destConfig] of Object.entries(destinations)) { + const destEnv = envs[destKey]; + if (!destEnv?.push) continue; + + const mockEnv = destEnv.push; + const trackPaths = destEnv.simulation || []; + + // Use existing CallTracker to wrap env + const trackedEnv = tracker.wrapEnv( + mockEnv as Record, + trackPaths.map((p) => `${destKey}:${p}`), + ); + + // Merge window properties + if (trackedEnv.window && typeof trackedEnv.window === 'object') { + Object.assign(sandbox.window, trackedEnv.window); + } + + // Merge document properties + if (trackedEnv.document && typeof trackedEnv.document === 'object') { + Object.assign(sandbox.document, trackedEnv.document); + } + } + + return sandbox; +} + +/** + * Wait for async window property assignment + * + * IIFE bundles execute asynchronously and assign to window. + * This helper polls until the property appears or timeout occurs. + */ +function waitForWindowProperty( + window: Record, + prop: string, + timeout: number = 5000, +): Promise { + return new Promise((resolve, reject) => { + const start = Date.now(); + + const check = () => { + if (window[prop] !== undefined) { + resolve(); + } else if (Date.now() - start > timeout) { + reject( + new Error( + `Timeout waiting for window.${prop}. ` + + `IIFE may have failed to execute or assign to window.`, + ), + ); + } else { + setImmediate(check); + } + }; + + check(); + }); +} + +/** + * Execute production IIFE bundle in JSDOM with env-based mocking + * + * Main orchestration function that: + * 1. Creates JSDOM virtual DOM + * 2. Builds sandbox from dynamically loaded envs + * 3. Executes IIFE in JSDOM + * 4. Waits for window.collector/elb assignment + * 5. Runs event through elb + * 6. Returns tracked API calls + */ +export async function executeInJSDOM( + bundlePath: string, + destinations: Record, + event: { name: string; data?: unknown }, + tracker: CallTracker, + envs: Record, + timeout: number = 10000, +): Promise { + const start = Date.now(); + + // 1. Create JSDOM virtual DOM with console suppression + const virtualConsole = new VirtualConsole(); + // Silent mode - don't pipe console output to process stdout/stderr + const dom = new JSDOM('', { + url: 'http://localhost', + runScripts: 'dangerously', // Allow script execution + resources: 'usable', + virtualConsole, + }); + + const { window } = dom; + + // 2. Build sandbox from dynamically loaded envs and inject into window + const sandbox = buildSandboxFromEnvs(envs, destinations, tracker); + Object.assign(window, sandbox.window); + Object.assign(window.document, sandbox.document); + + // 3. Load and execute bundle code + const bundleCode = await fs.readFile(bundlePath, 'utf8'); + + try { + window.eval(bundleCode); + } catch (error) { + throw new Error(`Bundle execution failed: ${getErrorMessage(error)}`); + } + + // 4. Wait for window.collector and window.elb assignments + try { + await waitForWindowProperty( + window as unknown as Record, + 'collector', + timeout, + ); + await waitForWindowProperty( + window as unknown as Record, + 'elb', + timeout, + ); + } catch (error) { + throw new Error( + `Window property assignment failed: ${getErrorMessage(error)}`, + ); + } + + const { collector, elb } = window as unknown as { + collector: unknown; + elb: (name: string, data?: unknown) => Promise; + }; + + // 5. Run event through elb + let elbResult: Elb.PushResult | undefined; + try { + elbResult = (await elb(event.name, event.data)) as + | Elb.PushResult + | undefined; + } catch (error) { + throw new Error(`Event execution failed: ${getErrorMessage(error)}`); + } + + // 6. Return results with tracked calls + return { + collector, + elb, + elbResult, + usage: tracker.getCalls(), + duration: Date.now() - start, + }; +} diff --git a/packages/cli/src/commands/simulate/simulator.ts b/packages/cli/src/commands/simulate/simulator.ts index 7472295d6..c357137e7 100644 --- a/packages/cli/src/commands/simulate/simulator.ts +++ b/packages/cli/src/commands/simulate/simulator.ts @@ -1,18 +1,20 @@ import path from 'path'; import fs from 'fs-extra'; import type { Flow } from '@walkeros/core'; -import { createLogger } from '../../core'; +import { createLogger, getErrorMessage } from '../../core/index.js'; import { loadJsonConfig, getTempDir, isObject, parseBundleConfig, type BuildOptions, -} from '../../config'; -import { bundleCore } from '../bundle/bundler'; -import { downloadPackages } from '../bundle/package-manager'; -import { CallTracker } from './tracker'; -import type { SimulateCommandOptions, SimulationResult } from './types'; +} from '../../config/index.js'; +import { bundleCore } from '../bundle/bundler.js'; +import { downloadPackages } from '../bundle/package-manager.js'; +import { CallTracker } from './tracker.js'; +import { executeInJSDOM } from './jsdom-executor.js'; +import { loadDestinationEnvs } from './env-loader.js'; +import type { SimulateCommandOptions, SimulationResult } from './types.js'; /** * Generate a unique ID for temp files @@ -57,7 +59,7 @@ export async function simulateCore( return result; } catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); + const errorMessage = getErrorMessage(error); logger.error(`💥 Simulation error: ${errorMessage}`); return { @@ -67,24 +69,6 @@ export async function simulateCore( } } -/** - * Parse event input - handles both strings and JSON objects - */ -export function parseEventInput(eventString: string = ''): unknown { - if (!eventString) { - return {}; - } - - // Try to parse as JSON first - try { - const parsed = JSON.parse(eventString); - return isObject(parsed) ? parsed : {}; - } catch { - // If JSON parsing fails, treat as event name string - return { name: eventString }; - } -} - /** * Simple result formatting */ @@ -120,6 +104,19 @@ export async function executeSimulation( const tempDir = getTempDir(); try { + // Validate event format + if ( + !isObject(event) || + !('name' in event) || + typeof event.name !== 'string' + ) { + throw new Error( + 'Event must be an object with a "name" property of type string', + ); + } + + const typedEvent = event as { name: string; data?: unknown }; + // Ensure temp directory exists await fs.ensureDir(tempDir); @@ -151,61 +148,29 @@ export async function executeSimulation( // 3. Create tracker const tracker = new CallTracker(); - // 4. Prepare env setup code to inject into bundle - // The bundle will import examples, so we can reference them directly in the injected code - const envSetupCode: string[] = []; + // 4. Create temporary bundle as production IIFE (not ESM!) + const tempOutput = path.join( + tempDir, + `simulation-bundle-${generateId()}.js`, + ); const destinations = ( flowConfig as unknown as { destinations?: Record } ).destinations; - if (destinations) { - for (const [key, dest] of Object.entries(destinations)) { - // Generate code to wrap env using examples imported IN THE BUNDLE - const destName = key.replace(/-/g, '_'); - envSetupCode.push(` - // Inject tracked env for destination '${key}' using examples from bundle - if (examples && examples['${key}'] && examples['${key}'].env) { - const mockEnv = examples['${key}'].env.push; - const trackPaths = examples['${key}'].env.simulation || []; - if (mockEnv) { - const wrappedPaths = trackPaths.map((p) => '${key}:' + p); - const trackedEnv = __simulationTracker.wrapEnv(mockEnv, wrappedPaths); - if (config.destinations && config.destinations['${key}']) { - config.destinations['${key}'].env = trackedEnv; - } - } - } -`); - } - } - - // 5. Inject env setup code BEFORE startFlow - // Note: __simulationTracker will be provided via factory function parameter - const modifiedCode = ` -// Inject tracked envs into destination configs -${envSetupCode.join('\n')} -${buildOptions.code || ''} -`; - - // 7. Create temporary bundle with downloaded packages - const tempOutput = path.join( - tempDir, - `simulation-bundle-${generateId()}.mjs`, - ); - - // Create modified build options for simulation + // Create build options for simulation - bundle as IIFE to test actual production code const simulationBuildOptions: BuildOptions = { ...buildOptions, - code: modifiedCode, + code: buildOptions.code || '', // No code modification - use original output: tempOutput, tempDir, // Use same temp dir for bundle - format: 'esm' as const, - // Force node platform for simulation since we're running in Node.js - platform: 'node' as const, + format: 'iife' as const, // ← Test actual production format! + platform: 'browser' as const, // ← Browser platform for IIFE + windowCollector: 'collector', // ← Ensure window assignment + windowElb: 'elb', }; - // 8. Bundle with downloaded packages (they're already in tempDir/node_modules) + // 5. Bundle with downloaded packages (they're already in tempDir/node_modules) await bundleCore( flowConfig, simulationBuildOptions, @@ -214,64 +179,21 @@ ${buildOptions.code || ''} ); bundlePath = tempOutput; - // 9. Inject minimal globals for Node simulation environment - // This allows destinations to reference window/document without errors - const globalWithSim = globalThis as Record; - if (!globalWithSim.window) { - globalWithSim.window = {}; - } - if (!globalWithSim.document) { - globalWithSim.document = {}; - } - - // 10. Dynamic import the bundle - const timestamp = Date.now(); - const moduleUrl = `file://${bundlePath}?t=${timestamp}`; - const module = await import(moduleUrl); - - // 11. Populate globals with destination-specific mocks from examples - // This happens AFTER import so we can access the exported examples - const importedExamples = module.examples; - const destinations2 = ( - flowConfig as unknown as { destinations?: Record } - ).destinations; - if (importedExamples && destinations2) { - for (const [key, dest] of Object.entries(destinations2)) { - const destEnv = importedExamples[key]?.env?.push; - if (destEnv) { - if ( - destEnv.window && - typeof globalWithSim.window === 'object' && - globalWithSim.window !== null - ) { - Object.assign(globalWithSim.window, destEnv.window); - } - if ( - destEnv.document && - typeof globalWithSim.document === 'object' && - globalWithSim.document !== null - ) { - Object.assign(globalWithSim.document, destEnv.document); - } - } - } - } - - // 12. Call bundle factory function with tracker - const flowResult = await module.default({ tracker }); - if (!flowResult || typeof flowResult.elb !== 'function') { - throw new Error( - 'Bundle did not export valid flow object with elb function', - ); - } - - const { elb } = flowResult; - - // 13. Execute the event - const elbResult = await elb(event); + // 6. Load env examples dynamically from destination packages + const envs = await loadDestinationEnvs(destinations || {}); + + // 7. Execute IIFE in JSDOM with env-based mocking + const result = await executeInJSDOM( + tempOutput, + destinations || {}, + typedEvent, + tracker, + envs, // Pass dynamically loaded envs + 10000, // 10s timeout + ); - // 14. Retrieve tracked calls from tracker instance - const usage = tracker.getCalls(); + const elbResult = result.elbResult; + const usage = result.usage; const duration = Date.now() - startTime; @@ -286,7 +208,7 @@ ${buildOptions.code || ''} const duration = Date.now() - startTime; return { success: false, - error: error instanceof Error ? error.message : String(error), + error: getErrorMessage(error), duration, }; } finally { @@ -296,10 +218,6 @@ ${buildOptions.code || ''} // Ignore cleanup errors - temp dirs will be cleaned eventually }); } - - // Cleanup injected globals - const globalWithSim = globalThis as Record; - delete globalWithSim.window; - delete globalWithSim.document; + // Note: JSDOM automatically cleans up its own isolated environment } } diff --git a/packages/cli/src/commands/simulate/types.ts b/packages/cli/src/commands/simulate/types.ts index 4c1678c4d..4cd3dfd9c 100644 --- a/packages/cli/src/commands/simulate/types.ts +++ b/packages/cli/src/commands/simulate/types.ts @@ -1,6 +1,6 @@ import type { Elb } from '@walkeros/core'; -import type { GlobalOptions } from '../../types'; -import type { ApiCall } from './tracker'; +import type { GlobalOptions } from '../../types/index.js'; +import type { ApiCall } from './tracker.js'; export interface SimulateCommandOptions extends GlobalOptions { config: string; diff --git a/packages/cli/src/config/defaults.ts b/packages/cli/src/config/defaults.ts index f9571c81b..92ae6b1b5 100644 --- a/packages/cli/src/config/defaults.ts +++ b/packages/cli/src/config/defaults.ts @@ -4,7 +4,7 @@ * Platform-specific default build options. */ -import type { BuildOptions } from '../types/bundle'; +import type { BuildOptions } from '../types/bundle.js'; /** * Get default build configuration for platform. @@ -39,7 +39,6 @@ export function getDefaultBuildOptions( format: 'iife', target: 'es2020', output: output || './dist/walker.js', - globalName: 'walkerOS', }; } @@ -74,9 +73,6 @@ export function ensureBuildOptions( ); // Validate required fields - if (!buildOptions.code && !defaults.code) { - throw new Error('BuildOptions.code is required'); - } if (!buildOptions.output && !defaults.output) { throw new Error('BuildOptions.output is required'); } @@ -84,7 +80,7 @@ export function ensureBuildOptions( return { ...defaults, ...buildOptions, - code: buildOptions.code || defaults.code!, + code: buildOptions.code || defaults.code || '', output: buildOptions.output || defaults.output!, packages: buildOptions.packages || defaults.packages!, } as BuildOptions; diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts index 577e9c984..185b08a79 100644 --- a/packages/cli/src/config/index.ts +++ b/packages/cli/src/config/index.ts @@ -10,29 +10,34 @@ export { validatePlatform, isMultiEnvConfig, isSingleEnvConfig, -} from './validators'; +} from './validators.js'; // Utility functions -export { substituteEnvVariables, loadJsonConfig, getTempDir } from './utils'; +export { + substituteEnvVariables, + loadJsonConfig, + loadJsonFromSource, + getTempDir, +} from './utils.js'; // Platform defaults -export { getDefaultBuildOptions, ensureBuildOptions } from './defaults'; +export { getDefaultBuildOptions, ensureBuildOptions } from './defaults.js'; // Parser export { parseBundleConfig, safeParseBundleConfig, normalizeConfigs, -} from './parser'; -export type { ParsedConfig } from './parser'; +} from './parser.js'; +export type { ParsedConfig } from './parser.js'; // Loader export { loadBundleConfig, loadAllEnvironments, getAvailableEnvironments, -} from './loader'; -export type { LoadConfigResult, LoadConfigOptions } from './loader'; +} from './loader.js'; +export type { LoadConfigResult, LoadConfigOptions } from './loader.js'; // Type re-exports from bundle types export type { @@ -40,4 +45,4 @@ export type { MinifyOptions, EnvironmentConfig, Setup, -} from '../types/bundle'; +} from '../types/bundle.js'; diff --git a/packages/cli/src/config/loader.ts b/packages/cli/src/config/loader.ts index 053490245..f2c2cb344 100644 --- a/packages/cli/src/config/loader.ts +++ b/packages/cli/src/config/loader.ts @@ -8,14 +8,17 @@ */ import type { Flow } from '@walkeros/core'; -import type { BuildOptions, EnvironmentConfig, Setup } from '../types/bundle'; +import type { + BuildOptions, + EnvironmentConfig, + Setup, +} from '../types/bundle.js'; +import { isMultiEnvConfig, isObject } from './validators.js'; import { - isMultiEnvConfig, - isSingleEnvConfig, - validatePlatform, - isObject, -} from './validators'; -import { normalizeConfigs } from './parser'; + parseConfigStructure, + normalizeAndValidate, + normalizeConfigs, +} from './parser.js'; /** * Result of configuration loading. @@ -67,34 +70,46 @@ export function loadBundleConfig( rawConfig: unknown, options: LoadConfigOptions, ): LoadConfigResult { - // Check if multi-environment format - if (isMultiEnvConfig(rawConfig)) { - return loadMultiEnvironmentConfig(rawConfig, options); + // Level 1: Parse structure and extract config + const { flowConfig, buildOptions, metadata } = parseConfigStructure( + rawConfig, + { + configPath: options.configPath, + environment: options.environment, + }, + ); + + // Level 2: Normalize and validate + const normalized = normalizeAndValidate( + flowConfig, + buildOptions, + options.configPath, + ); + + // Log environment selection if multi-environment + if (metadata.isMultiEnvironment && options.logger) { + options.logger.info( + `📦 Using environment: ${metadata.environment} (${metadata.availableEnvironments?.length || 0} total)`, + ); } - // Check if new single-environment format - if (isSingleEnvConfig(rawConfig)) { - return loadSingleEnvironmentConfig(rawConfig, options); + // Warn if --env flag specified for single-environment config + if (!metadata.isMultiEnvironment && options.environment && options.logger) { + options.logger.warn( + `--env flag specified but configuration is single-environment. Ignoring flag.`, + ); } - // Invalid format - provide helpful error - const configType = isObject(rawConfig) - ? 'platform' in rawConfig - ? `invalid platform value: "${(rawConfig as { platform: unknown }).platform}"` - : 'missing "flow" and "build" fields' - : `not an object (got ${typeof rawConfig})`; - - throw new Error( - `Invalid configuration format at ${options.configPath}.\n` + - `Configuration ${configType}.\n\n` + - `Expected either:\n` + - ` 1. Multi-environment: { version: 1, environments: { prod: { flow: {...}, build: {...} } } }\n` + - ` 2. Single-environment: { flow: { platform: "web" | "server", ... }, build: { packages: {...}, ... } }`, - ); + return { + ...normalized, + ...metadata, + }; } /** * Load multi-environment configuration. + * + * @deprecated Kept for backward compatibility. Use loadBundleConfig() instead. */ function loadMultiEnvironmentConfig( setup: Setup, @@ -145,6 +160,8 @@ function loadMultiEnvironmentConfig( /** * Load single-environment configuration. + * + * @deprecated Kept for backward compatibility. Use loadBundleConfig() instead. */ function loadSingleEnvironmentConfig( config: EnvironmentConfig, diff --git a/packages/cli/src/config/parser.ts b/packages/cli/src/config/parser.ts index 1d5c9e1de..af760daf3 100644 --- a/packages/cli/src/config/parser.ts +++ b/packages/cli/src/config/parser.ts @@ -6,10 +6,17 @@ import path from 'path'; import type { Flow } from '@walkeros/core'; -import type { BuildOptions, EnvironmentConfig } from '../types/bundle'; -import { isObject, isSingleEnvConfig } from './validators'; -import { ensureBuildOptions } from './defaults'; -import { validatePlatform } from './validators'; +import type { + BuildOptions, + EnvironmentConfig, + Setup, +} from '../types/bundle.js'; +import { + isObject, + isSingleEnvConfig, + isMultiEnvConfig, + validatePlatform, +} from './validators.js'; /** * Result of parsing bundle configuration. @@ -19,6 +26,249 @@ export interface ParsedConfig { buildOptions: BuildOptions; } +/** + * Result of config structure parsing (before validation). + */ +export interface ParsedStructure { + /** Raw flow config (not yet validated) */ + flowConfig: unknown; + /** Raw build options (not yet validated) */ + buildOptions: unknown; + /** Metadata about the config */ + metadata: { + /** Selected environment name */ + environment: string; + /** Whether this is a multi-environment setup */ + isMultiEnvironment: boolean; + /** All available environment names (for multi-env setups) */ + availableEnvironments?: string[]; + }; +} + +/** + * Options for parsing config structure. + */ +export interface ParseStructureOptions { + /** Config file path (for error messages) */ + configPath?: string; + /** Environment to select (for multi-env configs) */ + environment?: string; +} + +/** + * Parse config structure and extract environment-specific configuration. + * + * @param rawConfig - Raw configuration object + * @param options - Parsing options + * @returns Extracted flow config, build options, and metadata + * @throws Error if config format is invalid or environment is missing + * + * @remarks + * **Level 1 of 3-level config loading**: + * - Detects multi-env vs single-env format + * - Extracts the appropriate environment config + * - No validation performed (happens in normalizeAndValidate) + */ +export function parseConfigStructure( + rawConfig: unknown, + options: ParseStructureOptions = {}, +): ParsedStructure { + // Multi-environment format + if (isMultiEnvConfig(rawConfig)) { + const setup = rawConfig as Setup; + const availableEnvironments = Object.keys(setup.environments); + + // Validate environment selection + if (!options.environment) { + throw new Error( + `Multi-environment configuration detected. Please specify an environment using --env flag.\n` + + `Available environments: ${availableEnvironments.join(', ')}`, + ); + } + + const selectedEnv = options.environment; + + if (!setup.environments[selectedEnv]) { + throw new Error( + `Environment "${selectedEnv}" not found in configuration.\n` + + `Available environments: ${availableEnvironments.join(', ')}`, + ); + } + + const envConfig = setup.environments[selectedEnv]; + + return { + flowConfig: envConfig.flow, + buildOptions: envConfig.build, + metadata: { + environment: selectedEnv, + isMultiEnvironment: true, + availableEnvironments, + }, + }; + } + + // Single-environment format + if (isSingleEnvConfig(rawConfig)) { + const config = rawConfig as EnvironmentConfig; + + return { + flowConfig: config.flow, + buildOptions: config.build, + metadata: { + environment: 'default', + isMultiEnvironment: false, + }, + }; + } + + // Invalid format - provide helpful error + const configPath = options.configPath || 'configuration'; + const configType = isObject(rawConfig) + ? 'platform' in rawConfig + ? `invalid platform value: "${(rawConfig as { platform: unknown }).platform}"` + : 'missing "flow" and "build" fields' + : `not an object (got ${typeof rawConfig})`; + + throw new Error( + `Invalid configuration format at ${configPath}.\n` + + `Configuration ${configType}.\n\n` + + `Expected either:\n` + + ` 1. Multi-environment: { version: 1, environments: { prod: { flow: {...}, build: {...} } } }\n` + + ` 2. Single-environment: { flow: { platform: "web" | "server", ... }, build: { packages: {...}, ... } }`, + ); +} + +/** + * Normalize and validate flow and build configurations. + * + * @param flowConfig - Raw flow configuration + * @param buildOptions - Raw build options + * @param configPath - Path to config file (for relative template resolution) + * @returns Validated and normalized configuration + * @throws Error if validation fails + * + * @remarks + * **Level 2 of 3-level config loading**: + * - Validates platform (once!) + * - Applies platform-specific defaults (single pass) + * - Resolves relative template paths + * - Ensures all required fields are present + */ +export function normalizeAndValidate( + flowConfig: unknown, + buildOptions: unknown, + configPath?: string, +): ParsedConfig { + // Extract and validate platform (ONCE - not in type guards) + if (!isObject(flowConfig) || !('platform' in flowConfig)) { + throw new Error( + `Invalid flow config: missing "platform" field. Expected "web" or "server".`, + ); + } + + const platform = (flowConfig as { platform: unknown }).platform; + + if (!validatePlatform(platform)) { + throw new Error( + `Invalid platform "${platform}". Must be "web" or "server".`, + ); + } + + // Validate build options structure + if (!isObject(buildOptions)) { + throw new Error( + `Invalid build options: expected object, got ${typeof buildOptions}`, + ); + } + + // Apply platform-specific defaults (single pass merge) + const platformDefaults: Partial = + platform === 'web' + ? { + platform: 'browser', + format: 'iife', + target: 'es2020', + minify: false, + sourcemap: false, + tempDir: '.tmp', + cache: true, + } + : { + platform: 'node', + format: 'esm', + target: 'node20', + minify: false, + sourcemap: false, + tempDir: '.tmp', + cache: true, + }; + + // Single merge: defaults + user config + conditional defaults + const merged: Partial = { + ...platformDefaults, + ...(buildOptions as Partial), + }; + + // Auto-select default template based on platform if not specified + if (merged.template === undefined) { + merged.template = platform === 'server' ? 'server.hbs' : 'web.hbs'; + } + + // Apply window assignment defaults for browser IIFE + if (merged.format === 'iife' && merged.platform === 'browser') { + if (merged.windowCollector === undefined) { + merged.windowCollector = 'collector'; + } + if (merged.windowElb === undefined) { + merged.windowElb = 'elb'; + } + } + + // Resolve template path relative to config file directory if it starts with ./ or ../ + if ( + configPath && + merged.template && + !path.isAbsolute(merged.template) && + (merged.template.startsWith('./') || merged.template.startsWith('../')) + ) { + const configDir = path.dirname(configPath); + merged.template = path.resolve(configDir, merged.template); + } + + // Apply platform-specific defaults for required fields + if (!merged.output || merged.output === '') { + merged.output = + platform === 'web' ? './dist/walker.js' : './dist/bundle.js'; + } + + // Resolve output path relative to config file directory if it's relative + // Skip resolution for placeholder paths used in tests/programmatic API + if ( + configPath && + configPath !== '/unknown/path' && + merged.output && + !path.isAbsolute(merged.output) + ) { + const configDir = path.dirname(configPath); + merged.output = path.resolve(configDir, merged.output); + } + + if (!merged.packages) { + merged.packages = {}; + } + + if (merged.code === undefined || merged.code === '') { + merged.code = ''; + } + + // Return fully validated config + return { + flowConfig: flowConfig as Flow.Config, + buildOptions: merged as BuildOptions, + }; +} + /** * Parse and normalize bundle configuration. * @@ -63,16 +313,6 @@ export function parseBundleConfig(data: unknown): ParsedConfig { ); } - const flowData = data.flow as Record; - if ( - !('platform' in flowData) || - (flowData.platform !== 'web' && flowData.platform !== 'server') - ) { - throw new Error( - `Invalid config: flow.platform must be "web" or "server", got "${flowData.platform}"`, - ); - } - // Validate build.packages field const buildData = data.build as Record; if ('packages' in buildData && !isObject(buildData.packages)) { @@ -81,8 +321,8 @@ export function parseBundleConfig(data: unknown): ParsedConfig { ); } - const config = data as unknown as EnvironmentConfig; - return normalizeConfigs(config, '/unknown/path'); + // Use new simplified validation + return normalizeAndValidate(data.flow, data.build, '/unknown/path'); } /** @@ -116,6 +356,11 @@ export function safeParseBundleConfig(data: unknown): { * @param config - Environment configuration or flow+build object * @param configPath - Path to config file (for relative template resolution) * @returns Normalized flow and build configurations + * + * @deprecated Use normalizeAndValidate() instead (simpler, single-pass validation) + * + * @remarks + * Kept for backward compatibility. Internally delegates to normalizeAndValidate(). */ export function normalizeConfigs( config: @@ -123,64 +368,6 @@ export function normalizeConfigs( | { flow: Flow.Config; build: Partial }, configPath?: string, ): { flowConfig: Flow.Config; buildOptions: BuildOptions } { - const flowConfig = config.flow; - const platform = (flowConfig as unknown as { platform: 'web' | 'server' }) - .platform; - - if (!validatePlatform(platform)) { - throw new Error( - `Invalid platform "${platform}". Must be "web" or "server".`, - ); - } - - // Apply platform-specific build defaults - const buildDefaults: Partial = - platform === 'web' - ? { - platform: 'browser', - format: 'iife', - target: 'es2020', - minify: false, - sourcemap: false, - tempDir: '.tmp', - cache: true, - } - : { - platform: 'node', - format: 'esm', - target: 'node20', - minify: false, - sourcemap: false, - tempDir: '.tmp', - cache: true, - }; - - // Merge build config - const buildConfig: Partial = { - ...buildDefaults, - ...config.build, - }; - - // Resolve template path relative to config file directory if it starts with ./ or ../ - if ( - configPath && - buildConfig.template && - !path.isAbsolute(buildConfig.template) - ) { - if ( - buildConfig.template.startsWith('./') || - buildConfig.template.startsWith('../') - ) { - const configDir = path.dirname(configPath); - buildConfig.template = path.resolve(configDir, buildConfig.template); - } - } - - // Ensure all required build fields are present - const buildOptions = ensureBuildOptions(buildConfig, platform); - - return { - flowConfig, - buildOptions, - }; + // Delegate to new simplified function + return normalizeAndValidate(config.flow, config.build, configPath); } diff --git a/packages/cli/src/config/utils.ts b/packages/cli/src/config/utils.ts index 3f3473c3b..9c9881865 100644 --- a/packages/cli/src/config/utils.ts +++ b/packages/cli/src/config/utils.ts @@ -4,6 +4,72 @@ import fs from 'fs-extra'; import path from 'path'; +import os from 'os'; +import { getErrorMessage } from '../core/index.js'; + +/** + * Check if a string is a valid URL + * + * @param str - String to check + * @returns True if string is a valid HTTP/HTTPS URL + */ +export function isUrl(str: string): boolean { + try { + const url = new URL(str); + return url.protocol === 'http:' || url.protocol === 'https:'; + } catch { + return false; + } +} + +/** + * Download a file from a URL to a temporary location + * + * @param url - HTTP/HTTPS URL to download + * @returns Path to downloaded temporary file + * @throws Error if download fails or response is not OK + * + * @example + * ```typescript + * const tempPath = await downloadFromUrl('https://example.com/config.json') + * // Returns: "/tmp/walkeros-download-1647261462000-abc123.json" + * ``` + */ +export async function downloadFromUrl(url: string): Promise { + if (!isUrl(url)) { + throw new Error(`Invalid URL: ${url}`); + } + + try { + const response = await fetch(url); + + if (!response.ok) { + throw new Error( + `Failed to download ${url}: ${response.status} ${response.statusText}`, + ); + } + + const content = await response.text(); + + // Extract filename from URL or generate one + const urlObj = new URL(url); + const urlFilename = path.basename(urlObj.pathname); + const extension = path.extname(urlFilename) || '.json'; + const randomId = Math.random().toString(36).substring(2, 11); + const filename = `walkeros-download-${Date.now()}-${randomId}${extension}`; + + // Write to system temp directory + const tempPath = path.join(os.tmpdir(), filename); + await fs.writeFile(tempPath, content, 'utf-8'); + + return tempPath; + } catch (error) { + if (error instanceof Error) { + throw new Error(`Failed to download from URL: ${error.message}`); + } + throw error; + } +} /** * Substitute environment variables in a string. @@ -28,17 +94,37 @@ export function substituteEnvVariables(value: string): string { } /** - * Load and parse JSON configuration file. + * Load and parse JSON configuration file from local path or URL. + * + * @param configPath - Path to JSON file or HTTP/HTTPS URL + * @returns Parsed configuration object and cleanup function + * @throws Error if file not found, download fails, or invalid JSON + * + * @example + * ```typescript + * // Local file + * const config = await loadJsonConfig('./config.json') * - * @param configPath - Path to JSON file - * @returns Parsed configuration object - * @throws Error if file not found or invalid JSON + * // Remote URL + * const config = await loadJsonConfig('https://example.com/config.json') + * ``` */ export async function loadJsonConfig(configPath: string): Promise { - const absolutePath = path.resolve(configPath); + let absolutePath: string; + let isTemporary = false; + + // Check if input is a URL + if (isUrl(configPath)) { + // Download from URL to temp location + absolutePath = await downloadFromUrl(configPath); + isTemporary = true; + } else { + // Local file path + absolutePath = path.resolve(configPath); - if (!(await fs.pathExists(absolutePath))) { - throw new Error(`Configuration file not found: ${absolutePath}`); + if (!(await fs.pathExists(absolutePath))) { + throw new Error(`Configuration file not found: ${absolutePath}`); + } } try { @@ -48,6 +134,15 @@ export async function loadJsonConfig(configPath: string): Promise { throw new Error( `Invalid JSON in config file: ${configPath}. ${error instanceof Error ? error.message : error}`, ); + } finally { + // Clean up temporary downloaded file + if (isTemporary) { + try { + await fs.remove(absolutePath); + } catch { + // Ignore cleanup errors + } + } } } @@ -70,3 +165,120 @@ export function getTempDir(tempDir = '.tmp'): string { : path.join(process.cwd(), tempDir); return path.join(basePath, `cli-${Date.now()}-${randomId}`); } + +/** + * Load JSON from inline string, file path, or URL. + * + * Supports three input formats: + * 1. Inline JSON string - parsed directly + * 2. Local file path - read and parsed + * 3. HTTP/HTTPS URL - downloaded and parsed + * + * Detection priority: + * 1. URL (http://, https://) → download and parse + * 2. Existing file path → read and parse + * 3. Valid JSON string → parse directly + * 4. Simple string → treat as {name: string} for backward compatibility + * + * @param source - JSON string, file path, or URL + * @param options - Optional configuration + * @param options.name - Parameter name for error messages (e.g., "event", "config") + * @param options.required - Throw error if source is empty (default: false) + * @param options.fallback - Default value if source is empty + * @returns Parsed JSON object + * @throws Error if source is required but empty, or if loading/parsing fails + * + * @example + * ```typescript + * // Inline JSON + * await loadJsonFromSource('{"name":"order complete","data":{}}') + * + * // File path + * await loadJsonFromSource('./examples/event.json') + * + * // URL + * await loadJsonFromSource('https://example.com/event.json') + * + * // With options + * await loadJsonFromSource(input, { + * name: 'event', + * required: true, + * fallback: { name: 'default' } + * }) + * ``` + */ +export async function loadJsonFromSource( + source: string | undefined, + options?: { + name?: string; + required?: boolean; + fallback?: T; + }, +): Promise { + const paramName = options?.name || 'input'; + + // Handle empty/undefined input + if (!source || source.trim() === '') { + if (options?.required) { + throw new Error(`${paramName} is required`); + } + if (options?.fallback !== undefined) { + return options.fallback; + } + return {} as T; + } + + const trimmedSource = source.trim(); + + // 1. Check if URL + if (isUrl(trimmedSource)) { + try { + const tempPath = await downloadFromUrl(trimmedSource); + try { + const data = await fs.readJson(tempPath); + return data as T; + } finally { + // Clean up temp file + try { + await fs.remove(tempPath); + } catch { + // Ignore cleanup errors + } + } + } catch (error) { + throw new Error( + `Failed to load ${paramName} from URL ${trimmedSource}: ${getErrorMessage(error)}`, + ); + } + } + + // 2. Check if file path exists + const resolvedPath = path.resolve(trimmedSource); + if (await fs.pathExists(resolvedPath)) { + try { + const data = await fs.readJson(resolvedPath); + return data as T; + } catch (error) { + throw new Error( + `Failed to parse ${paramName} from file ${trimmedSource}: ${getErrorMessage(error)}`, + ); + } + } + + // 3. Try to parse as inline JSON + try { + const parsed = JSON.parse(trimmedSource); + return parsed as T; + } catch (jsonError) { + // 4. Fallback: treat as event name string for backward compatibility + // This allows simple strings like "page view" to work + if (!trimmedSource.startsWith('{') && !trimmedSource.startsWith('[')) { + return { name: trimmedSource } as T; + } + + // If it looks like JSON but failed to parse, throw helpful error + throw new Error( + `Failed to parse ${paramName}. Input appears to be JSON but contains errors: ${jsonError instanceof Error ? jsonError.message : String(jsonError)}`, + ); + } +} diff --git a/packages/cli/src/config/validators.ts b/packages/cli/src/config/validators.ts index 3f89b8e20..423ad37f3 100644 --- a/packages/cli/src/config/validators.ts +++ b/packages/cli/src/config/validators.ts @@ -4,7 +4,7 @@ * Type checking utilities for configuration validation. */ -import type { Setup, EnvironmentConfig } from '../types/bundle'; +import type { Setup, EnvironmentConfig } from '../types/bundle.js'; /** * Type guard: Check if value is a plain object. @@ -42,6 +42,9 @@ export function isMultiEnvConfig(data: unknown): data is Setup { /** * Type guard: Check if config is single-environment format. + * + * @remarks + * Only checks structural shape. Platform validation happens later in normalization. */ export function isSingleEnvConfig(data: unknown): data is EnvironmentConfig { return ( @@ -50,8 +53,7 @@ export function isSingleEnvConfig(data: unknown): data is EnvironmentConfig { 'build' in data && isObject(data.flow) && isObject(data.build) && - 'platform' in data.flow && - validatePlatform((data.flow as { platform: unknown }).platform) + 'platform' in data.flow ); } diff --git a/packages/cli/src/core/asset-resolver.ts b/packages/cli/src/core/asset-resolver.ts new file mode 100644 index 000000000..6866ff83b --- /dev/null +++ b/packages/cli/src/core/asset-resolver.ts @@ -0,0 +1,93 @@ +/** + * Asset Resolver + * + * Unified path resolution for package assets (templates, examples) and user assets (configs, custom templates). + * Works identically in both local and Docker environments. + */ + +import { fileURLToPath } from 'url'; +import path from 'path'; + +/** + * Get the package root directory + * + * Uses import.meta.url to find the package root, works in both environments: + * - Production (dist): /path/to/packages/cli/dist/index.js → /path/to/packages/cli + * - Test (src): /path/to/packages/cli/src/core/asset-resolver.ts → /path/to/packages/cli + * - Docker: /cli + * + * @returns Absolute path to package root + */ +export function getPackageRoot(): string { + const currentFile = fileURLToPath(import.meta.url); + + // In test/dev mode: files are in src/ directory (e.g., src/core/asset-resolver.ts) + if (currentFile.includes('/src/')) { + // Running from source (tests): go up to package root + // e.g., /path/to/packages/cli/src/core/asset-resolver.ts -> /path/to/packages/cli + const srcIndex = currentFile.indexOf('/src/'); + return currentFile.substring(0, srcIndex); + } + + // Running from dist (production) + // Files can be at any depth: dist/index.js or dist/core/asset-resolver.js + // Find the dist/ directory and go one level up + // e.g., /path/to/packages/cli/dist/core/asset-resolver.js -> /path/to/packages/cli + // e.g., /cli/dist/core/asset-resolver.js -> /cli (Docker) + if (currentFile.includes('/dist/')) { + const distIndex = currentFile.indexOf('/dist/'); + return currentFile.substring(0, distIndex); + } + + // Fallback for other environments + return path.resolve(currentFile, '../..'); +} + +/** + * Asset type for resolution strategy + */ +export type AssetType = 'template' | 'config' | 'bundle'; + +/** + * Resolve asset path using unified strategy + * + * Resolution rules: + * 1. Bare names (no / or \) → Package asset + * - "web.hbs" → ${packageRoot}/templates/web.hbs + * - "server-collect.json" → ${packageRoot}/examples/server-collect.json + * + * 2. Relative paths (./ or ../) → User asset relative to base directory + * - "./my-template.hbs" → ${baseDir}/my-template.hbs + * + * 3. Absolute paths → Use as-is + * + * @param assetPath - Path to resolve + * @param assetType - Type of asset (determines package subdirectory) + * @param baseDir - Base directory for relative paths (defaults to cwd) + * @returns Absolute path to asset + */ +export function resolveAsset( + assetPath: string, + assetType: AssetType, + baseDir?: string, +): string { + const packageRoot = getPackageRoot(); + + // Bare name → package asset + if (!assetPath.includes('/') && !assetPath.includes('\\')) { + if (assetType === 'template') { + return path.join(packageRoot, 'templates', assetPath); + } + // config or bundle → examples directory + return path.join(packageRoot, 'examples', assetPath); + } + + // Absolute path → use as-is + if (path.isAbsolute(assetPath)) { + return assetPath; + } + + // Relative path → resolve from base directory + const resolveBase = baseDir || process.cwd(); + return path.resolve(resolveBase, assetPath); +} diff --git a/packages/cli/src/core/docker.ts b/packages/cli/src/core/docker.ts index e5597cc3e..f28d54c7b 100644 --- a/packages/cli/src/core/docker.ts +++ b/packages/cli/src/core/docker.ts @@ -6,13 +6,83 @@ import { spawn } from 'child_process'; import path from 'path'; -import type { GlobalOptions } from '../types/global'; +import { readFileSync } from 'fs'; +import { fileURLToPath } from 'url'; +import { VERSION as DOCKER_VERSION } from '@walkeros/docker'; +import { isUrl } from '../config/utils.js'; +import type { GlobalOptions } from '../types/global.js'; + +// Read CLI version from own package.json +// Handle both development (src/) and production (dist/) paths +function readPackageVersion(): string { + // Get the directory of this module (ESM-compatible) + const moduleFilename = fileURLToPath(import.meta.url); + const moduleDir = path.dirname(moduleFilename); + + // Try production path first (dist/index.js -> ../package.json) + const prodPath = path.join(moduleDir, '../package.json'); + try { + const pkg = JSON.parse(readFileSync(prodPath, 'utf-8')) as { + version: string; + }; + return pkg.version; + } catch { + // Fall back to development path (src/core/docker.ts -> ../../package.json) + const devPath = path.join(moduleDir, '../../package.json'); + const pkg = JSON.parse(readFileSync(devPath, 'utf-8')) as { + version: string; + }; + return pkg.version; + } +} + +const CLI_VERSION = readPackageVersion(); + +/** + * Docker image for CLI/build tools (bundle, simulate) + * Uses explicit version by default, can be overridden with env var + */ +export const CLI_DOCKER_IMAGE = + process.env.WALKEROS_CLI_DOCKER_IMAGE || `walkeros/cli:${CLI_VERSION}`; + +/** + * Docker image for production runtime (run command) + * Uses explicit version by default, can be overridden with env var + */ +export const RUNTIME_DOCKER_IMAGE = + process.env.WALKEROS_RUNTIME_DOCKER_IMAGE || + `walkeros/docker:${DOCKER_VERSION}`; /** - * Docker image to use for CLI execution + * @deprecated Use CLI_DOCKER_IMAGE or RUNTIME_DOCKER_IMAGE instead */ -export const DOCKER_IMAGE = - process.env.WALKEROS_DOCKER_IMAGE || 'walkeros/cli:latest'; +export const DOCKER_IMAGE = CLI_DOCKER_IMAGE; + +/** + * Build common Docker arguments from CLI options + * + * Extracts common flags (config, json, verbose, silent) that are shared + * across bundle and simulate commands. Command-specific flags should be + * added after calling this function. + * + * @param options - CLI options containing common flags + * @returns Array of command-line arguments starting with config path + */ +export function buildCommonDockerArgs(options: { + config: string; + json?: boolean; + verbose?: boolean; + silent?: boolean; +}): string[] { + const args = [options.config]; + + // Common flags + if (options.json) args.push('--json'); + if (options.verbose) args.push('--verbose'); + if (options.silent) args.push('--silent'); + + return args; +} /** * Build Docker command for executing CLI commands @@ -20,25 +90,34 @@ export const DOCKER_IMAGE = * @param command - CLI command (bundle, simulate, run) * @param args - Command arguments * @param options - Global options + * @param configFile - Optional config file path to mount in Docker * @returns Docker command array */ export function buildDockerCommand( command: string, args: string[], options: GlobalOptions = {}, + configFile?: string, ): string[] { const cwd = process.cwd(); - const cmd = [ - 'docker', - 'run', - '--rm', - // Mount current directory - '-v', - `${cwd}:/workspace`, - '-w', - '/workspace', - ]; + const cmd = ['docker', 'run', '--rm']; + + // Mount config file if provided (only for local files, not URLs) + if (configFile && !isUrl(configFile)) { + const configPath = path.resolve(cwd, configFile); + + // Mount config file at /config/flow.json (read-only, separate from workspace) + cmd.push('-v', `${configPath}:/config/flow.json:ro`); + + // Update args to use container path - replace first occurrence of config file path + args = args.map((arg) => (arg === configFile ? '/config/flow.json' : arg)); + } + // For URLs, pass them through as-is - container will download them + + // Mount current directory for output files + cmd.push('-v', `${cwd}:/workspace`); + cmd.push('-w', '/workspace'); // Add user mapping on Linux/Mac to prevent permission issues if (process.platform !== 'win32') { @@ -61,8 +140,8 @@ export function buildDockerCommand( cmd.push('-e', 'SILENT=true'); } - // Add the Docker image - cmd.push(DOCKER_IMAGE); + // Add the Docker image (CLI tools for bundle/simulate) + cmd.push(CLI_DOCKER_IMAGE); // Add the command and arguments cmd.push(command, ...args); @@ -76,14 +155,26 @@ export function buildDockerCommand( * @param command - CLI command * @param args - Command arguments * @param options - Global options + * @param configFile - Optional config file path to mount in Docker * @returns Promise that resolves when command completes */ export async function executeInDocker( command: string, args: string[], options: GlobalOptions = {}, + configFile?: string, ): Promise { - const dockerCmd = buildDockerCommand(command, args, options); + // Force --local execution inside container to prevent nested Docker attempts + // Architecture: Host CLI decides environment (Docker vs local), + // Container CLI always executes locally (no Docker-in-Docker) + const containerArgs = [...args, '--local']; + + const dockerCmd = buildDockerCommand( + command, + containerArgs, + options, + configFile, + ); return new Promise((resolve, reject) => { const proc = spawn(dockerCmd[0], dockerCmd.slice(1), { @@ -128,7 +219,7 @@ export async function isDockerAvailable(): Promise { * @returns Promise resolving to true if image exists */ export async function imageExists( - image: string = DOCKER_IMAGE, + image: string = CLI_DOCKER_IMAGE, ): Promise { return new Promise((resolve) => { const proc = spawn('docker', ['image', 'inspect', image], { @@ -139,3 +230,121 @@ export async function imageExists( proc.on('exit', (code) => resolve(code === 0)); }); } + +/** + * Build Docker command for run command (production runtime) + * + * @param mode - Run mode (collect | serve) + * @param flowPath - Path to pre-built .mjs bundle (for collect mode) or custom file (for serve mode) + * @param options - Runtime options + * @returns Docker command array + */ +export function buildDockerRunCommand( + mode: 'collect' | 'serve', + flowPath: string | null, + options: { + port?: number; + host?: string; + serveName?: string; + servePath?: string; + } = {}, +): string[] { + const cwd = process.cwd(); + const cmd = ['docker', 'run', '--rm']; + + // Set MODE environment variable + cmd.push('-e', `MODE=${mode}`); + + // Mount flow bundle for collect mode + if (mode === 'collect' && flowPath) { + const absoluteFlowPath = path.resolve(cwd, flowPath); + cmd.push('-v', `${absoluteFlowPath}:/app/flow.mjs:ro`); + cmd.push('-e', 'FLOW=/app/flow.mjs'); + } + + // Mount custom file for serve mode + if (mode === 'serve' && flowPath) { + const absoluteFilePath = path.resolve(cwd, flowPath); + cmd.push('-v', `${absoluteFilePath}:/app/bundle.mjs:ro`); + cmd.push('-e', 'FILE_PATH=/app/bundle.mjs'); + } + + // Port mapping - always map port for serve mode, use default if not specified + const port = options.port !== undefined ? options.port : 8080; + cmd.push('-p', `${port}:${port}`); + cmd.push('-e', `PORT=${port}`); + + // Host + if (options.host) { + cmd.push('-e', `HOST=${options.host}`); + } + + // Serve name (filename in URL) + if (options.serveName) { + cmd.push('-e', `SERVE_NAME=${options.serveName}`); + } + + // Serve path (URL directory path) + if (options.servePath) { + cmd.push('-e', `SERVE_PATH=${options.servePath}`); + } + + // Add user mapping on Linux/Mac to prevent permission issues + if (process.platform !== 'win32') { + try { + const uid = process.getuid?.(); + const gid = process.getgid?.(); + if (uid !== undefined && gid !== undefined) { + cmd.push('--user', `${uid}:${gid}`); + } + } catch { + // Ignore if not available + } + } + + // Add the runtime Docker image + cmd.push(RUNTIME_DOCKER_IMAGE); + + return cmd; +} + +/** + * Execute run command in Docker container (production runtime) + * + * @param mode - Run mode (collect | serve) + * @param flowPath - Path to pre-built .mjs bundle (for collect mode) or custom file (for serve mode) + * @param options - Runtime and global options + * @returns Promise that resolves when command completes + */ +export async function executeRunInDocker( + mode: 'collect' | 'serve', + flowPath: string | null, + options: { + port?: number; + host?: string; + serveName?: string; + servePath?: string; + silent?: boolean; + } = {}, +): Promise { + const dockerCmd = buildDockerRunCommand(mode, flowPath, options); + + return new Promise((resolve, reject) => { + const proc = spawn(dockerCmd[0], dockerCmd.slice(1), { + stdio: options.silent ? 'ignore' : 'inherit', + shell: false, + }); + + proc.on('error', (error) => { + reject(new Error(`Docker execution failed: ${error.message}`)); + }); + + proc.on('exit', (code) => { + if (code === 0) { + resolve(); + } else { + reject(new Error(`Docker command exited with code ${code}`)); + } + }); + }); +} diff --git a/packages/cli/src/core/execution.ts b/packages/cli/src/core/execution.ts index b16d93a2d..f3e989215 100644 --- a/packages/cli/src/core/execution.ts +++ b/packages/cli/src/core/execution.ts @@ -4,9 +4,13 @@ * Determines whether to execute commands locally or in Docker. */ -import type { GlobalOptions } from '../types/global'; -import { executeInDocker, isDockerAvailable } from './docker'; -import type { Logger } from './logger'; +import type { GlobalOptions } from '../types/global.js'; +import { + executeInDocker, + executeRunInDocker, + isDockerAvailable, +} from './docker.js'; +import type { Logger } from './logger.js'; /** * Execution mode @@ -20,7 +24,13 @@ export type ExecutionMode = 'local' | 'docker'; * @returns Execution mode */ export function getExecutionMode(options: GlobalOptions): ExecutionMode { - return options.local ? 'local' : 'docker'; + // Force local mode if: + // 1. --local flag is provided, OR + // 2. Running inside a Docker container (WALKEROS_CONTAINER env var) + if (options.local || process.env.WALKEROS_CONTAINER === 'true') { + return 'local'; + } + return 'docker'; } /** @@ -36,6 +46,7 @@ export type ExecuteHandler = () => Promise; * @param dockerArgs - Docker command arguments * @param options - Global options * @param logger - Logger instance + * @param configFile - Optional config file path to mount in Docker */ export async function executeCommand( localHandler: ExecuteHandler, @@ -43,6 +54,7 @@ export async function executeCommand( dockerArgs: string[], options: GlobalOptions, logger?: Logger, + configFile?: string, ): Promise { const mode = getExecutionMode(options); @@ -77,6 +89,6 @@ export async function executeCommand( if (logger && !options.silent) { logger.info('🐳 Executing in Docker container...'); } - await executeInDocker(dockerCommand, dockerArgs, options); + await executeInDocker(dockerCommand, dockerArgs, options, configFile); } } diff --git a/packages/cli/src/core/index.ts b/packages/cli/src/core/index.ts index 9b784de5c..84c07e85e 100644 --- a/packages/cli/src/core/index.ts +++ b/packages/cli/src/core/index.ts @@ -1,5 +1,8 @@ -export * from './logger'; -export * from './timer'; -export * from './output'; -export * from './execution'; -export * from './docker'; +export * from './logger.js'; +export * from './timer.js'; +export * from './output.js'; +export * from './execution.js'; +export * from './docker.js'; +export * from './temp-manager.js'; +export * from './asset-resolver.js'; +export * from './utils.js'; diff --git a/packages/cli/src/core/logger.ts b/packages/cli/src/core/logger.ts index ddbbfa3e0..8c04abd5d 100644 --- a/packages/cli/src/core/logger.ts +++ b/packages/cli/src/core/logger.ts @@ -1,5 +1,6 @@ /* eslint-disable no-console */ import chalk from 'chalk'; +import type { GlobalOptions } from '../types/global.js'; export interface LoggerOptions { verbose?: boolean; @@ -98,3 +99,20 @@ export function createLogger(options: LoggerOptions = {}): Logger { }, }; } + +/** + * Create logger from command options + * Factory function that standardizes logger creation across commands + * + * @param options - Command options containing verbose, silent, and json flags + * @returns Configured logger instance + */ +export function createCommandLogger( + options: GlobalOptions & { json?: boolean }, +): Logger { + return createLogger({ + verbose: options.verbose, + silent: options.silent ?? false, + json: options.json, + }); +} diff --git a/packages/cli/src/core/temp-manager.ts b/packages/cli/src/core/temp-manager.ts new file mode 100644 index 000000000..7f303b072 --- /dev/null +++ b/packages/cli/src/core/temp-manager.ts @@ -0,0 +1,94 @@ +/** + * Unified Temporary Directory Manager + * + * Manages temporary directories for CLI operations using hash-based naming. + * This provides a single location for all temp files per operation, making + * cleanup simple and Docker mounting straightforward. + */ + +import { getHashServer } from '@walkeros/server-core'; +import path from 'path'; +import fs from 'fs-extra'; + +export interface TempDirPaths { + root: string; + nodeModules: string; + cache: string; + bundle: string; + entry: string; +} + +/** + * Manages a unified temporary directory structure for CLI operations + */ +export class TempDirManager { + private hash: string; + public readonly paths: TempDirPaths; + + /** + * Create a new TempDirManager with hash-based directory naming + * + * @param configPath - Path to the config file (used in hash) + * @param operation - Operation type ('bundle' | 'simulate') + * @param timestamp - Optional timestamp for uniqueness (defaults to Date.now()) + */ + static async create( + configPath: string, + operation: 'bundle' | 'simulate', + timestamp?: number, + ): Promise { + const ts = timestamp || Date.now(); + const hash = await getHashServer(`${configPath}:${operation}:${ts}`, 12); + return new TempDirManager(hash); + } + + constructor(hash: string) { + this.hash = hash; + const root = path.join('.tmp', `walkeros-${hash}`); + + this.paths = { + root, + nodeModules: path.join(root, 'node_modules'), + cache: path.join(root, 'cache'), + bundle: path.join(root, 'bundle.js'), + entry: path.join(root, 'entry.js'), + }; + } + + /** + * Initialize the temporary directory structure + */ + async initialize(): Promise { + await fs.ensureDir(this.paths.root); + await fs.ensureDir(this.paths.nodeModules); + await fs.ensureDir(this.paths.cache); + } + + /** + * Clean up the temporary directory + */ + async cleanup(): Promise { + await fs.remove(this.paths.root); + } + + /** + * Get the hash used for this temp directory + */ + getHash(): string { + return this.hash; + } + + /** + * Get a path within the temp directory + */ + getPath(...parts: string[]): string { + return path.join(this.paths.root, ...parts); + } + + /** + * Check if the temp directory exists + */ + async exists(): Promise { + return fs.pathExists(this.paths.root); + } +} diff --git a/packages/cli/src/core/utils.ts b/packages/cli/src/core/utils.ts new file mode 100644 index 000000000..c0bd986e1 --- /dev/null +++ b/packages/cli/src/core/utils.ts @@ -0,0 +1,12 @@ +/** + * Utility functions for the CLI package + */ + +/** + * Extract error message from unknown error type + * @param error - Unknown error object + * @returns Error message as string + */ +export function getErrorMessage(error: unknown): string { + return error instanceof Error ? error.message : String(error); +} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 89ca95c09..b02e87921 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,54 +1,61 @@ import { Command } from 'commander'; -import { bundleCommand } from './commands/bundle'; -import { simulateCommand } from './commands/simulate'; -import { runCommand } from './commands/run'; +import { readFileSync } from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname, join } from 'path'; +import { bundleCommand } from './commands/bundle/index.js'; +import { simulateCommand } from './commands/simulate/index.js'; +import { pushCommand } from './commands/push/index.js'; +import { runCommand } from './commands/run/index.js'; + +// Get package version dynamically +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const packageJson = JSON.parse( + readFileSync(join(__dirname, '../package.json'), 'utf-8'), +); +const VERSION = packageJson.version; // === CLI Commands === // Export CLI command handlers -export { bundleCommand, simulateCommand, runCommand }; +export { bundleCommand, simulateCommand, pushCommand, runCommand }; // === Programmatic API === // High-level functions for library usage -export { bundle } from './commands/bundle'; -export { simulate } from './commands/simulate'; -export { run } from './commands/run'; +export { bundle } from './commands/bundle/index.js'; +export { simulate } from './commands/simulate/index.js'; +export { run } from './commands/run/index.js'; // === Types === // Export types for programmatic usage -export type { BuildOptions, EnvironmentConfig, Setup } from './types/bundle'; -export type { BundleStats } from './commands/bundle/bundler'; -export type { SimulationResult } from './commands/simulate/types'; +export type { BuildOptions, EnvironmentConfig, Setup } from './types/bundle.js'; +export type { BundleStats } from './commands/bundle/bundler.js'; +export type { SimulationResult } from './commands/simulate/types.js'; export type { SourceDestinationItem, TemplateVariables, ProcessedTemplateVariables, TemplateSource, TemplateDestination, -} from './types/template'; +} from './types/template.js'; export type { RunMode, RunCommandOptions, RunOptions, RunResult, -} from './commands/run'; -export type { GlobalOptions } from './types/global'; +} from './commands/run/index.js'; +export type { GlobalOptions } from './types/global.js'; const program = new Command(); program .name('walkeros') .description('walkerOS CLI - Bundle and deploy walkerOS components') - .version('0.1.0'); + .version(VERSION); // Bundle command program - .command('bundle') + .command('bundle [file]') .description('Bundle NPM packages with custom code') - .option( - '-c, --config ', - 'configuration file path', - 'bundle.config.json', - ) .option( '-e, --env ', 'environment to build (for multi-environment configs)', @@ -61,9 +68,9 @@ program .option('--local', 'execute in local Node.js instead of Docker') .option('--dry-run', 'preview command without executing') .option('--silent', 'suppress output') - .action(async (options) => { + .action(async (file, options) => { await bundleCommand({ - config: options.config, + config: file || 'bundle.config.json', env: options.env, all: options.all, stats: options.stats, @@ -78,22 +85,20 @@ program // Simulate command program - .command('simulate') + .command('simulate [file]') .description('Simulate event processing and capture API calls') .option( - '-c, --config ', - 'Bundle configuration file', - 'bundle.config.json', + '-e, --event ', + 'Event to simulate (JSON string, file path, or URL)', ) - .option('-e, --event ', 'Event to simulate (JSON string)') .option('--json', 'Output results as JSON') .option('-v, --verbose', 'Verbose output') .option('--local', 'execute in local Node.js instead of Docker') .option('--dry-run', 'preview command without executing') .option('--silent', 'suppress output') - .action(async (options) => { + .action(async (file, options) => { await simulateCommand({ - config: options.config, + config: file || 'bundle.config.json', event: options.event, json: options.json, verbose: options.verbose, @@ -103,6 +108,31 @@ program }); }); +// Push command +program + .command('push [file]') + .description('Push an event through the flow with real API execution') + .requiredOption( + '-e, --event ', + 'Event to push (JSON string, file path, or URL)', + ) + .option('--env ', 'Environment name (for multi-environment configs)') + .option('--json', 'Output results as JSON') + .option('-v, --verbose', 'Verbose output') + .option('-s, --silent', 'Suppress output') + .option('--local', 'Execute in local Node.js instead of Docker') + .action(async (file, options) => { + await pushCommand({ + config: file || 'bundle.config.json', + event: options.event, + env: options.env, + json: options.json, + verbose: options.verbose, + silent: options.silent, + local: options.local, + }); + }); + // Run command with subcommands const runCmd = program .command('run') @@ -110,8 +140,10 @@ const runCmd = program // Run collect subcommand runCmd - .command('collect ') - .description('Run collector mode (event collection endpoint)') + .command('collect [file]') + .description( + 'Run collector mode (event collection endpoint). Defaults to server-collect.mjs if no file specified.', + ) .option('-p, --port ', 'Port to listen on (default: 8080)', parseInt) .option('-h, --host
', 'Host address (default: 0.0.0.0)') .option('--json', 'Output results as JSON') @@ -121,7 +153,7 @@ runCmd .option('--silent', 'suppress output') .action(async (file, options) => { await runCommand('collect', { - config: file, + config: file || 'server-collect.mjs', port: options.port, host: options.host, json: options.json, @@ -134,11 +166,14 @@ runCmd // Run serve subcommand runCmd - .command('serve ') - .description('Run serve mode (static file server for browser bundles)') + .command('serve [file]') + .description( + 'Run serve mode (single-file server for browser bundles). Defaults to baked-in web-serve.js if no file specified.', + ) .option('-p, --port ', 'Port to listen on (default: 8080)', parseInt) .option('-h, --host
', 'Host address (default: 0.0.0.0)') - .option('--static-dir ', 'Static directory for serve mode') + .option('--name ', 'Filename in URL (default: walker.js)') + .option('--path ', 'URL directory path (e.g., libs/v1)') .option('--json', 'Output results as JSON') .option('-v, --verbose', 'Verbose output') .option('--local', 'execute in local Node.js instead of Docker') @@ -146,10 +181,11 @@ runCmd .option('--silent', 'suppress output') .action(async (file, options) => { await runCommand('serve', { - config: file, + config: file || 'web-serve.js', port: options.port, host: options.host, - staticDir: options.staticDir, + serveName: options.name, + servePath: options.path, json: options.json, verbose: options.verbose, local: options.local, @@ -158,11 +194,7 @@ runCmd }); }); -// Only run CLI if this file is executed directly (not imported as a module) -// Check if the resolved file path matches the first CLI argument -import { fileURLToPath } from 'url'; -const isMainModule = - process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]; -if (isMainModule) { - program.parse(); -} +// Run the CLI +// Note: This file is marked as a bin script in package.json, +// so it's always executed directly (never imported as a library) +program.parse(); diff --git a/packages/cli/src/types/bundle.ts b/packages/cli/src/types/bundle.ts index 46ac9e226..7974a1f6b 100644 --- a/packages/cli/src/types/bundle.ts +++ b/packages/cli/src/types/bundle.ts @@ -55,15 +55,18 @@ export interface BuildOptions * User code to include in bundle. * * @remarks - * Custom JavaScript/TypeScript code that will be included in the bundle. + * Optional custom JavaScript/TypeScript code that will be included in the bundle. * Can reference imported packages and will be executed when bundle loads. + * If omitted, the template's default behavior will be used. + * + * @default "" * * @example * ```typescript * "export default () => startFlow({ sources: {...}, destinations: {...} })" * ``` */ - code: string; + code?: string; /** * Output file path. @@ -119,34 +122,49 @@ export interface BuildOptions cache?: boolean; /** - * Global variable name for IIFE bundles. + * Minification options. + * + * @remarks + * Fine-tune minification behavior. + * Only applies when minify=true. + */ + minifyOptions?: MinifyOptions; + + /** + * Window property name for collector instance (web platform only). * * @remarks - * Only used when format=iife. - * Creates a global variable on the window object. + * Only used when platform=browser and format=iife. + * The collector instance will be assigned to window[windowCollector]. + * Ignored for server platform. * - * @default "walkerOS" + * @default "collector" * * @example * ```json * { - * "format": "iife", - * "globalName": "myTracker" + * "build": { + * "windowCollector": "tracker", + * "windowElb": "track" + * } * } * ``` * - * Results in: `window.myTracker = { ... }` + * Results in: `window.tracker = collector; window.track = elb;` */ - globalName?: string; + windowCollector?: string; /** - * Minification options. + * Window property name for elb function (web platform only). * * @remarks - * Fine-tune minification behavior. - * Only applies when minify=true. + * Only used when platform=browser and format=iife. + * The elb function will be assigned to window[windowElb]. + * Ignored for server platform. + * + * @default "elb" */ - minifyOptions?: MinifyOptions; + windowElb?: string; } /** diff --git a/packages/cli/src/types/index.ts b/packages/cli/src/types/index.ts index 3c7ad9b77..661c96b7e 100644 --- a/packages/cli/src/types/index.ts +++ b/packages/cli/src/types/index.ts @@ -4,5 +4,5 @@ * Type definitions for walkerOS CLI commands and configuration. */ -export * as Bundle from './bundle'; -export * from './global'; +export * as Bundle from './bundle.js'; +export * from './global.js'; diff --git a/packages/cli/templates/server.hbs b/packages/cli/templates/server.hbs index 14392cd13..42df9c44a 100644 --- a/packages/cli/templates/server.hbs +++ b/packages/cli/templates/server.hbs @@ -1,4 +1,4 @@ -(async function() { +export default async function(context = {}) { const config = { sources: { {{#each sources}} @@ -26,4 +26,4 @@ const result = await startFlow(config); return result; -})(); +} diff --git a/packages/cli/templates/base.hbs b/packages/cli/templates/web.hbs similarity index 59% rename from packages/cli/templates/base.hbs rename to packages/cli/templates/web.hbs index 7023487f8..249e3bf35 100644 --- a/packages/cli/templates/base.hbs +++ b/packages/cli/templates/web.hbs @@ -1,7 +1,4 @@ -export default async function(context = {}) { - const { tracker } = context; - const __simulationTracker = tracker; - +(async () => { // Check if we're in a browser environment const window = typeof globalThis.window !== 'undefined' ? globalThis.window : undefined; const document = typeof globalThis.document !== 'undefined' ? globalThis.document : undefined; @@ -11,26 +8,26 @@ export default async function(context = {}) { {{#each sources}} {{@key}}: { code: {{{code}}}, - config: {{{config}}}{{#if env}}, + config: {{{config}}}{{#unless config}}{}{{/unless}}{{#if env}}, env: { window, document, ...{{{env}}} }{{/if}} - }, + }{{#unless @last}},{{/unless}} {{/each}} }, destinations: { {{#each destinations}} {{@key}}: { code: {{{code}}}, - config: {{{config}}}{{#if env}}, + config: {{{config}}}{{#unless config}}{}{{/unless}}{{#if env}}, env: { window, document, ...{{{env}}} }{{/if}} - }, + }{{#unless @last}},{{/unless}} {{/each}} }{{#if collector}}, ...{{{collector}}}{{/if}} @@ -38,7 +35,11 @@ export default async function(context = {}) { {{{CODE}}} - const result = await startFlow(config); + const { collector, elb } = await startFlow(config); - return result; -} \ No newline at end of file + if (typeof window !== 'undefined') { + {{#if build.windowCollector}}window['{{build.windowCollector}}'] = collector; + {{/if}}{{#if build.windowElb}}window['{{build.windowElb}}'] = elb; + {{/if}} + } +})(); diff --git a/packages/cli/web-serve.js b/packages/cli/web-serve.js new file mode 100644 index 000000000..9bd586459 --- /dev/null +++ b/packages/cli/web-serve.js @@ -0,0 +1,997 @@ +'use strict'; +(() => { + var ut = { merge: !0, shallow: !0, extend: !0 }; + function y(t, e = {}, n = {}) { + n = { ...ut, ...n }; + let s = Object.entries(e).reduce((o, [r, a]) => { + let i = t[r]; + return ( + n.merge && Array.isArray(i) && Array.isArray(a) + ? (o[r] = a.reduce((c, u) => (c.includes(u) ? c : [...c, u]), [...i])) + : (n.extend || r in t) && (o[r] = a), + o + ); + }, {}); + return n.shallow ? { ...t, ...s } : (Object.assign(t, s), t); + } + function j(t) { + return Array.isArray(t); + } + function lt(t) { + return typeof t == 'boolean'; + } + function O(t) { + return t !== void 0; + } + function G(t) { + return typeof t == 'function'; + } + function dt(t) { + return typeof t == 'number' && !Number.isNaN(t); + } + function b(t) { + return ( + typeof t == 'object' && + t !== null && + !j(t) && + Object.prototype.toString.call(t) === '[object Object]' + ); + } + function H(t) { + return typeof t == 'string'; + } + function T(t, e = new WeakMap()) { + if (typeof t != 'object' || t === null) return t; + if (e.has(t)) return e.get(t); + let n = Object.prototype.toString.call(t); + if (n === '[object Object]') { + let s = {}; + e.set(t, s); + for (let o in t) + Object.prototype.hasOwnProperty.call(t, o) && (s[o] = T(t[o], e)); + return s; + } + if (n === '[object Array]') { + let s = []; + return ( + e.set(t, s), + t.forEach((o) => { + s.push(T(o, e)); + }), + s + ); + } + if (n === '[object Date]') return new Date(t.getTime()); + if (n === '[object RegExp]') { + let s = t; + return new RegExp(s.source, s.flags); + } + return t; + } + function J(t, e = '', n) { + let s = e.split('.'), + o = t; + for (let r = 0; r < s.length; r++) { + let a = s[r]; + if (a === '*' && j(o)) { + let i = s.slice(r + 1).join('.'), + c = []; + for (let u of o) { + let l = J(u, i, n); + c.push(l); + } + return c; + } + if (((o = o instanceof Object ? o[a] : void 0), !o)) break; + } + return O(o) ? o : n; + } + function z(t, e, n) { + if (!b(t)) return t; + let s = T(t), + o = e.split('.'), + r = s; + for (let a = 0; a < o.length; a++) { + let i = o[a]; + a === o.length - 1 + ? (r[i] = n) + : ((i in r && typeof r[i] == 'object' && r[i] !== null) || (r[i] = {}), + (r = r[i])); + } + return s; + } + function $(t, e = {}, n = {}) { + let s = { ...e, ...n }, + o = {}, + r = t === void 0; + return ( + Object.keys(s).forEach((a) => { + s[a] && ((o[a] = !0), t && t[a] && (r = !0)); + }), + !!r && o + ); + } + function L(t = 6) { + let e = ''; + for (let n = 36; e.length < t; ) e += ((Math.random() * n) | 0).toString(n); + return e; + } + function X(t, e = 1e3, n = !1) { + let s, + o = null, + r = !1; + return (...a) => + new Promise((i) => { + let c = n && !r; + (o && clearTimeout(o), + (o = setTimeout(() => { + ((o = null), (n && !r) || ((s = t(...a)), i(s))); + }, e)), + c && ((r = !0), (s = t(...a)), i(s))); + }); + } + function _(t) { + return ( + lt(t) || + H(t) || + dt(t) || + !O(t) || + (j(t) && t.every(_)) || + (b(t) && Object.values(t).every(_)) + ); + } + function W(t) { + return _(t) ? t : void 0; + } + function D(t, e, n) { + return function (...s) { + try { + return t(...s); + } catch (o) { + return e ? e(o) : void 0; + } finally { + n?.(); + } + }; + } + function v(t, e, n) { + return async function (...s) { + try { + return await t(...s); + } catch (o) { + return e ? await e(o) : void 0; + } finally { + await n?.(); + } + }; + } + async function ft(t, e) { + let [n, s] = (t.name || '').split(' '); + if (!e || !n || !s) return {}; + let o, + r = '', + a = n, + i = s, + c = (l) => { + if (l) + return (l = j(l) ? l : [l]).find( + (f) => !f.condition || f.condition(t), + ); + }; + e[a] || (a = '*'); + let u = e[a]; + return ( + u && (u[i] || (i = '*'), (o = c(u[i]))), + o || ((a = '*'), (i = '*'), (o = c(e[a]?.[i]))), + o && (r = `${a} ${i}`), + { eventMapping: o, mappingKey: r } + ); + } + async function E(t, e = {}, n = {}) { + if (!O(t)) return; + let s = (b(t) && t.consent) || n.consent || n.collector?.consent, + o = j(e) ? e : [e]; + for (let r of o) { + let a = await v(Q)(t, r, { ...n, consent: s }); + if (O(a)) return a; + } + } + async function Q(t, e, n = {}) { + let { collector: s, consent: o } = n; + return (j(e) ? e : [e]).reduce( + async (r, a) => { + let i = await r; + if (i) return i; + let c = H(a) ? { key: a } : a; + if (!Object.keys(c).length) return; + let { + condition: u, + consent: l, + fn: f, + key: d, + loop: g, + map: k, + set: x, + validate: w, + value: m, + } = c; + if (u && !(await v(u)(t, a, s))) return; + if (l && !$(l, o)) return m; + let p = O(m) ? m : t; + if ((f && (p = await v(f)(t, a, n)), d && (p = J(t, d, m)), g)) { + let [C, q] = g, + R = C === 'this' ? [t] : await E(t, C, n); + j(R) && (p = (await Promise.all(R.map((N) => E(N, q, n)))).filter(O)); + } else + k + ? (p = await Object.entries(k).reduce(async (C, [q, R]) => { + let N = await C, + U = await E(t, R, n); + return (O(U) && (N[q] = U), N); + }, Promise.resolve({}))) + : x && (p = await Promise.all(x.map((C) => Q(t, C, n)))); + w && !(await v(w)(p)) && (p = void 0); + let P = W(p); + return O(P) ? P : W(m); + }, + Promise.resolve(void 0), + ); + } + async function B(t, e, n) { + e.policy && + (await Promise.all( + Object.entries(e.policy).map(async ([a, i]) => { + let c = await E(t, i, { collector: n }); + t = z(t, a, c); + }), + )); + let { eventMapping: s, mappingKey: o } = await ft(t, e.mapping); + s?.policy && + (await Promise.all( + Object.entries(s.policy).map(async ([a, i]) => { + let c = await E(t, i, { collector: n }); + t = z(t, a, c); + }), + )); + let r = e.data && (await E(t, e.data, { collector: n })); + if (s) { + if (s.ignore) + return { event: t, data: r, mapping: s, mappingKey: o, ignore: !0 }; + if ((s.name && (t.name = s.name), s.data)) { + let a = s.data && (await E(t, s.data, { collector: n })); + r = b(r) && b(a) ? y(r, a) : a; + } + } + return { event: t, data: r, mapping: s, mappingKey: o, ignore: !1 }; + } + function Y(t, e = !1) { + e && console.dir(t, { depth: 4 }); + } + function S(t, e, n) { + return function (...s) { + let o, + r = 'post' + e, + a = n['pre' + e], + i = n[r]; + return ( + (o = a ? a({ fn: t }, ...s) : t(...s)), + i && (o = i({ fn: t, result: o }, ...s)), + o + ); + }; + } + var mt = { + Action: 'action', + Actions: 'actions', + Config: 'config', + Consent: 'consent', + Context: 'context', + Custom: 'custom', + Destination: 'destination', + Elb: 'elb', + Globals: 'globals', + Hook: 'hook', + Init: 'init', + Link: 'link', + On: 'on', + Prefix: 'data-elb', + Ready: 'ready', + Run: 'run', + Session: 'session', + User: 'user', + Walker: 'walker', + }, + h = { + Commands: mt, + Utils: { + Storage: { Cookie: 'cookie', Local: 'local', Session: 'session' }, + }, + }; + async function pt(t, e, n) { + let { code: s, config: o = {}, env: r = {} } = e, + a = n || o || { init: !1 }, + i = { ...s, config: a, env: M(s.env, r) }, + c = i.config.id; + if (!c) + do c = L(4); + while (t.destinations[c]); + return ( + (t.destinations[c] = i), + i.config.queue !== !1 && (i.queue = [...t.queue]), + V(t, void 0, { [c]: i }) + ); + } + async function V(t, e, n) { + let { allowed: s, consent: o, globals: r, user: a } = t; + if (!s) return A({ ok: !1 }); + (e && t.queue.push(e), n || (n = t.destinations)); + let i = await Promise.all( + Object.entries(n || {}).map(async ([f, d]) => { + let g = (d.queue || []).map((m) => ({ ...m, consent: o })); + if (((d.queue = []), e)) { + let m = T(e); + g.push(m); + } + if (!g.length) return { id: f, destination: d, skipped: !0 }; + let k = [], + x = g.filter((m) => { + let p = $(d.config.consent, o, m.consent); + return !p || ((m.consent = p), k.push(m), !1); + }); + if ((d.queue.concat(x), !k.length)) + return { id: f, destination: d, queue: g }; + if (!(await v(gt)(t, d))) return { id: f, destination: d, queue: g }; + let w = !1; + return ( + d.dlq || (d.dlq = []), + await Promise.all( + k.map( + async (m) => ( + (m.globals = y(r, m.globals)), + (m.user = y(a, m.user)), + await v( + yt, + (p) => ( + t.config.onError && t.config.onError(p, t), + (w = !0), + d.dlq.push([m, p]), + !1 + ), + )(t, d, m), + m + ), + ), + ), + { id: f, destination: d, error: w } + ); + }), + ), + c = [], + u = [], + l = []; + for (let f of i) { + if (f.skipped) continue; + let d = f.destination, + g = { id: f.id, destination: d }; + f.error + ? l.push(g) + : f.queue && f.queue.length + ? ((d.queue = (d.queue || []).concat(f.queue)), u.push(g)) + : c.push(g); + } + return A({ ok: !l.length, event: e, successful: c, queued: u, failed: l }); + } + async function gt(t, e) { + if (e.init && !e.config.init) { + let n = { collector: t, config: e.config, env: M(e.env, e.config.env) }, + s = await S(e.init, 'DestinationInit', t.hooks)(n); + if (s === !1) return s; + e.config = { ...(s || e.config), init: !0 }; + } + return !0; + } + async function yt(t, e, n) { + let { config: s } = e, + o = await B(n, s, t); + if (o.ignore) return !1; + let r = { + collector: t, + config: s, + data: o.data, + mapping: o.mapping, + env: M(e.env, s.env), + }, + a = o.mapping; + if (a?.batch && e.pushBatch) { + let i = a.batched || { key: o.mappingKey || '', events: [], data: [] }; + (i.events.push(o.event), + O(o.data) && i.data.push(o.data), + (a.batchFn = + a.batchFn || + X((c, u) => { + let l = { + collector: u, + config: s, + data: o.data, + mapping: a, + env: M(c.env, s.env), + }; + (S(c.pushBatch, 'DestinationPushBatch', u.hooks)(i, l), + (i.events = []), + (i.data = [])); + }, a.batch)), + (a.batched = i), + a.batchFn?.(e, t)); + } else await S(e.push, 'DestinationPush', t.hooks)(o.event, r); + return !0; + } + function A(t) { + return y( + { ok: !t?.failed?.length, successful: [], queued: [], failed: [] }, + t, + ); + } + async function ht(t, e = {}) { + let n = {}; + for (let [s, o] of Object.entries(e)) { + let { code: r, config: a = {}, env: i = {} } = o, + c = { ...r.config, ...a }, + u = M(r.env, i); + n[s] = { ...r, config: c, env: u }; + } + return n; + } + function M(t, e) { + return t || e ? (e ? (t && b(t) && b(e) ? { ...t, ...e } : e) : t) : {}; + } + function bt(t, e, n) { + let s = t.on, + o = s[e] || [], + r = j(n) ? n : [n]; + (r.forEach((a) => { + o.push(a); + }), + (s[e] = o), + I(t, e, r)); + } + function I(t, e, n, s) { + let o, + r = n || []; + switch ((n || (r = t.on[e] || []), e)) { + case h.Commands.Consent: + o = s || t.consent; + break; + case h.Commands.Session: + o = t.session; + break; + case h.Commands.Ready: + case h.Commands.Run: + default: + o = void 0; + } + if ( + (Object.values(t.sources).forEach((a) => { + a.on && D(a.on)(e, o); + }), + Object.values(t.destinations).forEach((a) => { + if (a.on) { + let i = a.on; + D(i)(e, o); + } + }), + r.length) + ) + switch (e) { + case h.Commands.Consent: + (function (a, i, c) { + let u = c || a.consent; + i.forEach((l) => { + Object.keys(u) + .filter((f) => f in l) + .forEach((f) => { + D(l[f])(a, u); + }); + }); + })(t, r, s); + break; + case h.Commands.Ready: + case h.Commands.Run: + (function (a, i) { + a.allowed && + i.forEach((c) => { + D(c)(a); + }); + })(t, r); + break; + case h.Commands.Session: + (function (a, i) { + a.session && + i.forEach((c) => { + D(c)(a, a.session); + }); + })(t, r); + } + } + async function vt(t, e) { + let { consent: n } = t, + s = !1, + o = {}; + return ( + Object.entries(e).forEach(([r, a]) => { + let i = !!a; + ((o[r] = i), (s = s || i)); + }), + (t.consent = y(n, o)), + I(t, 'consent', void 0, o), + s ? V(t) : A({ ok: !0 }) + ); + } + async function wt(t, e, n, s) { + let o; + switch (e) { + case h.Commands.Config: + b(n) && y(t.config, n, { shallow: !1 }); + break; + case h.Commands.Consent: + b(n) && (o = await vt(t, n)); + break; + case h.Commands.Custom: + b(n) && (t.custom = y(t.custom, n)); + break; + case h.Commands.Destination: + b(n) && G(n.push) && (o = await pt(t, { code: n }, s)); + break; + case h.Commands.Globals: + b(n) && (t.globals = y(t.globals, n)); + break; + case h.Commands.On: + H(n) && bt(t, n, s); + break; + case h.Commands.Ready: + I(t, 'ready'); + break; + case h.Commands.Run: + o = await xt(t, n); + break; + case h.Commands.Session: + I(t, 'session'); + break; + case h.Commands.User: + b(n) && y(t.user, n, { shallow: !1 }); + } + return o || { ok: !0, successful: [], queued: [], failed: [] }; + } + function kt(t, e) { + if (!e.name) throw new Error('Event name is required'); + let [n, s] = e.name.split(' '); + if (!n || !s) throw new Error('Event name is invalid'); + ++t.count; + let { + timestamp: o = Date.now(), + group: r = t.group, + count: a = t.count, + } = e, + { + name: i = `${n} ${s}`, + data: c = {}, + context: u = {}, + globals: l = t.globals, + custom: f = {}, + user: d = t.user, + nested: g = [], + consent: k = t.consent, + id: x = `${o}-${r}-${a}`, + trigger: w = '', + entity: m = n, + action: p = s, + timing: P = 0, + version: C = { source: t.version, tagging: t.config.tagging || 0 }, + source: q = { type: 'collector', id: '', previous_id: '' }, + } = e; + return { + name: i, + data: c, + context: u, + globals: l, + custom: f, + user: d, + nested: g, + consent: k, + id: x, + trigger: w, + entity: m, + action: p, + timestamp: o, + timing: P, + group: r, + count: a, + version: C, + source: q, + }; + } + async function xt(t, e) { + ((t.allowed = !0), + (t.count = 0), + (t.group = L()), + (t.timing = Date.now()), + e && + (e.consent && (t.consent = y(t.consent, e.consent)), + e.user && (t.user = y(t.user, e.user)), + e.globals && (t.globals = y(t.config.globalsStatic || {}, e.globals)), + e.custom && (t.custom = y(t.custom, e.custom))), + Object.values(t.destinations).forEach((s) => { + s.queue = []; + }), + (t.queue = []), + t.round++); + let n = await V(t); + return (I(t, 'run'), n); + } + function Ot(t, e) { + return S( + async (n, s = {}) => + await v( + async () => { + let o = n; + if (s.mapping) { + let i = await B(o, s.mapping, t); + if (i.ignore) return A({ ok: !0 }); + if ( + s.mapping.consent && + !$(s.mapping.consent, t.consent, i.event.consent) + ) + return A({ ok: !0 }); + o = i.event; + } + let r = e(o), + a = kt(t, r); + return await V(t, a); + }, + () => A({ ok: !1 }), + )(), + 'Push', + t.hooks, + ); + } + async function jt(t) { + let e = y( + { + globalsStatic: {}, + sessionStatic: {}, + tagging: 0, + verbose: !1, + onLog: n, + run: !0, + }, + t, + { merge: !1, extend: !1 }, + ); + function n(r, a) { + Y({ message: r }, a || e.verbose); + } + e.onLog = n; + let s = { ...e.globalsStatic, ...t.globals }, + o = { + allowed: !1, + config: e, + consent: t.consent || {}, + count: 0, + custom: t.custom || {}, + destinations: {}, + globals: s, + group: '', + hooks: {}, + on: {}, + queue: [], + round: 0, + session: void 0, + timing: Date.now(), + user: t.user || {}, + version: '0.3.1', + sources: {}, + push: void 0, + command: void 0, + }; + return ( + (o.push = Ot(o, (r) => ({ + timing: Math.round((Date.now() - o.timing) / 10) / 100, + source: { type: 'collector', id: '', previous_id: '' }, + ...r, + }))), + (o.command = (function (r, a) { + return S( + async (i, c, u) => + await v( + async () => await a(r, i, c, u), + () => A({ ok: !1 }), + )(), + 'Command', + r.hooks, + ); + })(o, wt)), + (o.destinations = await ht(0, t.destinations || {})), + o + ); + } + async function Ct(t, e = {}) { + let n = {}; + for (let [s, o] of Object.entries(e)) { + let { code: r, config: a = {}, env: i = {}, primary: c } = o, + u = { + push: (f, d = {}) => t.push(f, { ...d, mapping: a }), + command: t.command, + sources: t.sources, + elb: t.sources.elb.push, + ...i, + }, + l = await v(r)(a, u); + l && (c && (l.config = { ...l.config, primary: c }), (n[s] = l)); + } + return n; + } + async function Z(t) { + t = t || {}; + let e = await jt(t), + n = + ((s = e), + { + type: 'elb', + config: {}, + push: async (d, g, k, x, w, m) => { + if (typeof d == 'string' && d.startsWith('walker ')) { + let P = d.replace('walker ', ''); + return s.command(P, g, k); + } + let p; + if (typeof d == 'string') + ((p = { name: d }), + g && typeof g == 'object' && !Array.isArray(g) && (p.data = g)); + else { + if (!d || typeof d != 'object') + return { ok: !1, successful: [], queued: [], failed: [] }; + ((p = d), + g && + typeof g == 'object' && + !Array.isArray(g) && + (p.data = { ...(p.data || {}), ...g })); + } + return ( + x && typeof x == 'object' && (p.context = x), + w && Array.isArray(w) && (p.nested = w), + m && typeof m == 'object' && (p.custom = m), + s.push(p) + ); + }, + }); + var s; + e.sources.elb = n; + let o = await Ct(e, t.sources || {}); + Object.assign(e.sources, o); + let { consent: r, user: a, globals: i, custom: c } = t; + (r && (await e.command('consent', r)), + a && (await e.command('user', a)), + i && Object.assign(e.globals, i), + c && Object.assign(e.custom, c), + e.config.run && (await e.command('run'))); + let u = n.push, + l = Object.values(e.sources).filter((d) => d.type !== 'elb'), + f = l.find((d) => d.config.primary); + return ( + f ? (u = f.push) : l.length > 0 && (u = l[0].push), + { collector: e, elb: u } + ); + } + var St = Object.defineProperty, + tt = (t, e) => { + for (var n in e) St(t, n, { get: e[n], enumerable: !0 }); + }; + var Et = {}; + tt(Et, { env: () => et }); + var et = {}; + tt(et, { init: () => At, push: () => Pt, simulation: () => Dt }); + var F = async () => ({ ok: !0, successful: [], queued: [], failed: [] }), + At = void 0, + Pt = { push: F, command: F, elb: F }, + Dt = ['call:elb'], + nt = async (t, e) => { + let { elb: n } = e, + s = { ...t, settings: t?.settings || { events: [] } }; + return ( + (s.settings?.events || []).forEach((o) => { + let { delay: r, ...a } = o; + setTimeout(() => n(a), r || 0); + }), + { type: 'demo', config: s, push: n } + ); + }; + var qt = Object.defineProperty, + ot = (t, e) => { + for (var n in e) qt(t, n, { get: e[n], enumerable: !0 }); + }; + var Tt = {}; + ot(Tt, { env: () => st }); + var st = {}; + ot(st, { init: () => $t, push: () => Mt, simulation: () => It }); + var $t = { log: void 0 }, + Mt = { log: Object.assign(() => {}, {}) }, + It = ['call:log'], + at = { + type: 'demo', + config: { settings: { name: 'demo' } }, + init({ config: t, env: e }) { + (e?.log || console.log)( + `[${{ name: 'demo', ...t?.settings }.name}] initialized`, + ); + }, + push(t, { config: e, env: n }) { + let s = n?.log || console.log, + o = { name: 'demo', ...e?.settings }, + r = o.values + ? (function (a, i) { + let c = {}; + for (let u of i) { + let l = u.split('.').reduce((f, d) => f?.[d], a); + l !== void 0 && (c[u] = l); + } + return c; + })(t, o.values) + : t; + s(`[${o.name}] ${JSON.stringify(r, null, 2)}`); + }, + }; + var Rt = { merge: !0, shallow: !0, extend: !0 }; + function rt(t, e, n) { + return function (...s) { + try { + return t(...s); + } catch (o) { + return e ? e(o) : void 0; + } finally { + n?.(); + } + }; + } + function K(t) { + return t === void 0 || + (function (e, n) { + return typeof e == typeof n; + })(t, '') + ? t + : JSON.stringify(t); + } + function it(t = {}) { + return (function (e, n = {}, s = {}) { + s = { ...Rt, ...s }; + let o = Object.entries(n).reduce((r, [a, i]) => { + let c = e[a]; + return ( + s.merge && Array.isArray(c) && Array.isArray(i) + ? (r[a] = i.reduce( + (u, l) => (u.includes(l) ? u : [...u, l]), + [...c], + )) + : (s.extend || a in e) && (r[a] = i), + r + ); + }, {}); + return s.shallow ? { ...e, ...o } : (Object.assign(e, o), e); + })({ 'Content-Type': 'application/json; charset=utf-8' }, t); + } + function Nt(t, e, n = { transport: 'fetch' }) { + switch (n.transport || 'fetch') { + case 'beacon': + return (function (s, o) { + let r = K(o), + a = navigator.sendBeacon(s, r); + return { ok: a, error: a ? void 0 : 'Failed to send beacon' }; + })(t, e); + case 'xhr': + return (function (s, o, r = {}) { + let a = it(r.headers), + i = r.method || 'POST', + c = K(o); + return rt( + () => { + let u = new XMLHttpRequest(); + u.open(i, s, !1); + for (let f in a) u.setRequestHeader(f, a[f]); + u.send(c); + let l = u.status >= 200 && u.status < 300; + return { + ok: l, + data: rt(JSON.parse, () => u.response)(u.response), + error: l ? void 0 : `${u.status} ${u.statusText}`, + }; + }, + (u) => ({ ok: !1, error: u.message }), + )(); + })(t, e, n); + default: + return (async function (s, o, r = {}) { + let a = it(r.headers), + i = K(o); + return (function (c, u, l) { + return async function (...f) { + try { + return await c(...f); + } catch (d) { + return u ? await u(d) : void 0; + } finally { + await l?.(); + } + }; + })( + async () => { + let c = await fetch(s, { + method: r.method || 'POST', + headers: a, + keepalive: !0, + credentials: r.credentials || 'same-origin', + mode: r.noCors ? 'no-cors' : 'cors', + body: i, + }), + u = r.noCors ? '' : await c.text(); + return { ok: c.ok, data: u, error: c.ok ? void 0 : c.statusText }; + }, + (c) => ({ ok: !1, error: c.message }), + )(); + })(t, e, n); + } + } + var ct = { + type: 'api', + config: {}, + push(t, { config: e, mapping: n, data: s, env: o }) { + let { settings: r } = e, + { + url: a, + headers: i, + method: c, + transform: u, + transport: l = 'fetch', + } = r || {}; + if (!a) return; + let f = s !== void 0 ? s : t, + d = u ? u(f, e, n) : JSON.stringify(f); + (o?.sendWeb || Nt)(a, d, { headers: i, method: c, transport: l }); + }, + }; + (async () => { + let t = typeof globalThis.window < 'u' ? globalThis.window : void 0, + e = typeof globalThis.document < 'u' ? globalThis.document : void 0, + n = { + sources: { + demo: { + code: nt, + config: { + settings: { + events: [ + { + name: 'page view', + data: { title: 'Home', path: '/' }, + delay: 0, + }, + { + name: 'product view', + data: { id: 'P123', name: 'Test Product', price: 99.99 }, + delay: 100, + }, + ], + }, + }, + }, + }, + destinations: { + demo: { code: at, config: { settings: { name: 'demo' } } }, + api: { + code: ct, + config: { settings: { url: 'http://localhost:8080/collect' } }, + }, + }, + run: !0, + globals: { language: 'en' }, + }, + { collector: s, elb: o } = await Z(n); + typeof t < 'u' && ((t.collector = s), (t.elb = o)); + })(); +})(); diff --git a/packages/collector/CHANGELOG.md b/packages/collector/CHANGELOG.md index 7b92621f6..b3d61e3da 100644 --- a/packages/collector/CHANGELOG.md +++ b/packages/collector/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/collector +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/collector/package.json b/packages/collector/package.json index 59a519240..aaede4db1 100644 --- a/packages/collector/package.json +++ b/packages/collector/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/collector", "description": "Unified platform-agnostic collector for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", @@ -9,6 +9,18 @@ "files": [ "dist/**" ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" + } + }, "scripts": { "build": "tsup --silent", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", @@ -18,7 +30,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/collector/src/dev.ts b/packages/collector/src/dev.ts new file mode 100644 index 000000000..197f1788e --- /dev/null +++ b/packages/collector/src/dev.ts @@ -0,0 +1 @@ +export * as schemas from './schemas'; diff --git a/packages/collector/src/index.ts b/packages/collector/src/index.ts index 64bc38461..fba86d3ca 100644 --- a/packages/collector/src/index.ts +++ b/packages/collector/src/index.ts @@ -2,8 +2,6 @@ export * from './types'; export * from './constants'; -// Export schemas -export * as schemas from './schemas'; export * from './consent'; export * from './flow'; export * from './push'; diff --git a/packages/collector/src/schemas.ts b/packages/collector/src/schemas.ts index 4345240f2..cecc3386c 100644 --- a/packages/collector/src/schemas.ts +++ b/packages/collector/src/schemas.ts @@ -1,6 +1,6 @@ import type { RJSFSchema } from '@rjsf/utils'; -export const settingsSchema: RJSFSchema = { +export const settings: RJSFSchema = { type: 'object', properties: { run: { @@ -37,6 +37,5 @@ export const settingsSchema: RJSFSchema = { }, }; -export const schemas = { - settings: settingsSchema, -}; +// Backward compatibility alias +export const settingsSchema = settings; diff --git a/packages/collector/tsup.config.ts b/packages/collector/tsup.config.ts index d5c3d722a..db969c386 100644 --- a/packages/collector/tsup.config.ts +++ b/packages/collector/tsup.config.ts @@ -1,3 +1,10 @@ import { defineConfig, buildModules } from '@walkeros/config/tsup'; -export default defineConfig([buildModules()]); +export default defineConfig([ + buildModules(), + + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), +]); diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 3d649f500..fd40d6e28 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @walkeros/core +## 0.4.1 + +### Patch Changes + +- dev entry + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + ## 0.3.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 53f0d04bf..332435314 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/core", "description": "Core types and platform-agnostic utilities for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", @@ -9,6 +9,18 @@ "files": [ "dist/**" ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" + } + }, "scripts": { "build": "tsup --silent", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", diff --git a/packages/core/src/dev.ts b/packages/core/src/dev.ts new file mode 100644 index 000000000..f405abd13 --- /dev/null +++ b/packages/core/src/dev.ts @@ -0,0 +1,3 @@ +export * as schemas from './schemas'; + +export { zodToSchema, z, type JSONSchema } from './schemas'; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 7053f1955..03bafeb2e 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,5 +1,4 @@ export * from './types'; -export * from './schemas'; export * from './anonymizeIP'; export * from './assign'; diff --git a/packages/core/src/schemas/README.md b/packages/core/src/schemas/README.md index fdaa6c4f1..4084d3e08 100644 --- a/packages/core/src/schemas/README.md +++ b/packages/core/src/schemas/README.md @@ -242,9 +242,9 @@ export const SourceTypeSchema = z.enum([...]); ### JSON Schemas (camelCase + "JsonSchema") ```typescript -export const eventJsonSchema = zodToJsonSchema(EventSchema, ...); -export const userJsonSchema = zodToJsonSchema(UserSchema, ...); -export const sourceTypeJsonSchema = zodToJsonSchema(SourceTypeSchema, ...); +export const eventJsonSchema = toJsonSchema(EventSchema, ...); +export const userJsonSchema = toJsonSchema(UserSchema, ...); +export const sourceTypeJsonSchema = toJsonSchema(SourceTypeSchema, ...); ``` **Pattern**: `{typeName}JsonSchema` diff --git a/packages/core/src/schemas/flow.ts b/packages/core/src/schemas/flow.ts index a2a4bca7a..9689835ec 100644 --- a/packages/core/src/schemas/flow.ts +++ b/packages/core/src/schemas/flow.ts @@ -14,7 +14,7 @@ * @packageDocumentation */ -import { z, toJsonSchema, zodToJsonSchema } from './validation'; +import { z, toJsonSchema } from './validation'; // ======================================== // Primitive Type Schemas @@ -205,7 +205,7 @@ export const SetupSchema = z * * @example * ```typescript - * import { parseSetup } from '@walkeros/core/schemas'; + * import { parseSetup } from '@walkeros/core/dev'; * import { readFileSync } from 'fs'; * * const raw = JSON.parse(readFileSync('walkeros.config.json', 'utf8')); @@ -225,7 +225,7 @@ export function parseSetup(data: unknown): z.infer { * * @example * ```typescript - * import { safeParseSetup } from '@walkeros/core/schemas'; + * import { safeParseSetup } from '@walkeros/core/dev'; * * const result = safeParseSetup(rawData); * if (result.success) { @@ -248,7 +248,7 @@ export function safeParseSetup(data: unknown) { * * @example * ```typescript - * import { parseConfig } from '@walkeros/core/schemas'; + * import { parseConfig } from '@walkeros/core/dev'; * * const envConfig = parseConfig(rawEnvData); * console.log(`Platform: ${envConfig.platform}`); @@ -283,7 +283,7 @@ export function safeParseConfig(data: unknown) { * * @example * ```typescript - * import { setupJsonSchema } from '@walkeros/core/schemas'; + * import { setupJsonSchema } from '@walkeros/core/dev'; * import { writeFileSync } from 'fs'; * * writeFileSync( diff --git a/packages/core/src/schemas/index.ts b/packages/core/src/schemas/index.ts index 6359f9210..e2044992c 100644 --- a/packages/core/src/schemas/index.ts +++ b/packages/core/src/schemas/index.ts @@ -23,7 +23,7 @@ * Import strategy: * Due to overlapping schema names across domains (ConfigSchema, InstanceSchema, etc.), * schemas are organized into namespaces. Import either: - * 1. From namespaces: import { WalkerOSSchemas, MappingSchemas } from '@walkeros/core/schemas' + * 1. From namespaces: import { WalkerOSSchemas, MappingSchemas } from '@walkeros/core/dev' * 2. Direct from files: import { EventSchema } from '@walkeros/core/schemas/walkeros' */ @@ -170,12 +170,12 @@ export * from './schema-builder'; * duplicate dependencies in the monorepo. * * Usage in destinations: - * import { z, zodToJsonSchema, zodToSchema } from '@walkeros/core'; + * import { z, zodToSchema } from '@walkeros/core/dev'; */ -export { z, zodToJsonSchema } from './validation'; +export { z } from './validation'; import type { zod } from './validation'; -import { z, zodToJsonSchema } from './validation'; +import { z } from './validation'; /** * JSONSchema type for JSON Schema Draft 7 objects @@ -192,7 +192,7 @@ export type JSONSchema = Record; * - target: 'draft-7' (JSON Schema Draft 7 format) * * Usage in destinations: - * import { zodToSchema } from '@walkeros/core'; + * import { zodToSchema } from '@walkeros/core/dev'; * export const settings = zodToSchema(SettingsSchema); * * @param schema - Zod schema to convert diff --git a/packages/core/src/schemas/schema-builder.ts b/packages/core/src/schemas/schema-builder.ts index 2ffe0e33d..2d9de8ae0 100644 --- a/packages/core/src/schemas/schema-builder.ts +++ b/packages/core/src/schemas/schema-builder.ts @@ -18,7 +18,7 @@ export type JSONSchema = Record; * * @example * // In destination package (NO Zod needed!) - * import { createObjectSchema, createArraySchema } from '@walkeros/core/schemas'; + * import { createObjectSchema, createArraySchema } from '@walkeros/core/dev'; * * export const settingsSchema = createObjectSchema({ * pixelId: { diff --git a/packages/core/src/schemas/validation.ts b/packages/core/src/schemas/validation.ts index e2b444d03..c63561f4f 100644 --- a/packages/core/src/schemas/validation.ts +++ b/packages/core/src/schemas/validation.ts @@ -32,25 +32,3 @@ export function toJsonSchema( target, }); } - -/** - * Legacy alias for backward compatibility - * @deprecated Use toJsonSchema() instead - */ -export function zodToJsonSchema( - schema: z.ZodTypeAny, - options?: { - target?: string; - name?: string; - $refStrategy?: string; - definitions?: Record; - }, -) { - const target = - options?.target === 'jsonSchema7' - ? 'draft-7' - : (options?.target as 'draft-7' | 'draft-2020-12' | 'openapi-3.0'); - return z.toJSONSchema(schema, { - target: target || 'draft-7', - }); -} diff --git a/packages/core/src/types/destination.ts b/packages/core/src/types/destination.ts index 57826c644..c6a6918b7 100644 --- a/packages/core/src/types/destination.ts +++ b/packages/core/src/types/destination.ts @@ -24,10 +24,11 @@ export interface BaseEnv { /** * Type bundle for destination generics. - * Groups Settings, Mapping, and Env into a single type parameter. + * Groups Settings, InitSettings, Mapping, and Env into a single type parameter. */ -export interface Types { +export interface Types { settings: S; + initSettings: I; mapping: M; env: E; } @@ -35,12 +36,18 @@ export interface Types { /** * Generic constraint for Types - ensures T has required properties for indexed access */ -export type TypesGeneric = { settings: any; mapping: any; env: any }; +export type TypesGeneric = { + settings: any; + initSettings: any; + mapping: any; + env: any; +}; /** * Type extractors for consistent usage with Types bundle */ export type Settings = T['settings']; +export type InitSettings = T['initSettings']; export type Mapping = T['mapping']; export type Env = T['env']; @@ -63,7 +70,7 @@ export interface Instance { export interface Config { consent?: WalkerOS.Consent; - settings?: Settings; + settings?: InitSettings; data?: WalkerOSMapping.Value | WalkerOSMapping.Values; env?: Env; id?: string; diff --git a/packages/core/src/types/source.ts b/packages/core/src/types/source.ts index a2d26880e..b2cd749e5 100644 --- a/packages/core/src/types/source.ts +++ b/packages/core/src/types/source.ts @@ -23,15 +23,23 @@ export interface BaseEnv { /** * Type bundle for source generics. - * Groups Settings, Mapping, Push, and Env into a single type parameter. + * Groups Settings, Mapping, Push, Env, and InitSettings into a single type parameter. * * @template S - Settings configuration type * @template M - Mapping configuration type * @template P - Push function signature (flexible to support HTTP handlers, etc.) * @template E - Environment dependencies type + * @template I - InitSettings configuration type (user input) */ -export interface Types { +export interface Types< + S = unknown, + M = unknown, + P = Elb.Fn, + E = BaseEnv, + I = S, +> { settings: S; + initSettings: I; mapping: M; push: P; env: E; @@ -40,12 +48,19 @@ export interface Types { /** * Generic constraint for Types - ensures T has required properties for indexed access */ -export type TypesGeneric = { settings: any; mapping: any; push: any; env: any }; +export type TypesGeneric = { + settings: any; + initSettings: any; + mapping: any; + push: any; + env: any; +}; /** * Type extractors for consistent usage with Types bundle */ export type Settings = T['settings']; +export type InitSettings = T['initSettings']; export type Mapping = T['mapping']; export type Push = T['push']; export type Env = T['env']; @@ -57,7 +72,7 @@ export type TypesOf = I extends Instance ? T : never; export interface Config extends WalkerOSMapping.Config> { - settings?: Settings; + settings?: InitSettings; env?: Env; id?: string; onError?: Handler.Error; diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index d5c3d722a..db969c386 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -1,3 +1,10 @@ import { defineConfig, buildModules } from '@walkeros/config/tsup'; -export default defineConfig([buildModules()]); +export default defineConfig([ + buildModules(), + + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), +]); diff --git a/packages/docker/CHANGELOG.md b/packages/docker/CHANGELOG.md index ab6fe5aa6..c28e78830 100644 --- a/packages/docker/CHANGELOG.md +++ b/packages/docker/CHANGELOG.md @@ -1,5 +1,42 @@ # @walkeros/docker +## 0.2.1 + +### Patch Changes + +- dev entry + +## 0.2.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +## 0.1.5 + +### Patch Changes + +- port path and name + +## 0.1.4 + +### Patch Changes + +- cli usage + +## 0.1.3 + +### Patch Changes + +- Fix serve mode health endpoint by moving route before static middleware to + prevent permission errors + +## 0.1.2 + +### Patch Changes + +- walkeros cli with docker + ## 0.1.1 ### Patch Changes diff --git a/packages/docker/Dockerfile b/packages/docker/Dockerfile index 24aa0201d..50b99de87 100644 --- a/packages/docker/Dockerfile +++ b/packages/docker/Dockerfile @@ -1,10 +1,9 @@ # walkerOS Docker Container -# Pure runtime container for executing pre-built flows -# Includes minimal demo bundles for quick-start testing +# Runtime container with baked-in web bundle and demo bundles # Multi-stage build for optimized production images # ============================================================================ -# Stage 1: Build +# Stage 1: Build Docker Runtime # ============================================================================ FROM node:22-alpine AS builder @@ -43,10 +42,16 @@ COPY packages/docker/package.json ./packages/docker/ # Copy only the Docker runtime (no build tools, no other packages) COPY --from=builder /app/packages/docker/dist ./packages/docker/dist -# Copy demo bundles for quick-start examples +# Copy pre-built web bundle (checked into repo) +COPY packages/cli/examples/web-serve.js /app/web-serve.js + +# Copy demo bundles for quick-start testing +# Note: Demo bundles are self-contained (only use express/cors at runtime) COPY packages/docker/demos /app/demos -# Install minimal production dependencies (express, cors, zod) +# Install production dependencies +# - Workspace install: For runtime code (packages/docker/dist) +# After Phase 1, demo bundles are self-contained (no @walkeros/core needed) RUN npm ci --production --workspace=@walkeros/docker # Create non-root user diff --git a/packages/docker/README.md b/packages/docker/README.md index 00f98b37f..689329fbd 100644 --- a/packages/docker/README.md +++ b/packages/docker/README.md @@ -1,20 +1,22 @@ # @walkeros/docker -Pure runtime Docker container for walkerOS - executes pre-built flow bundles -with instant startup and minimal footprint. +Runtime Docker container for walkerOS - executes pre-built flow bundles with +instant startup and includes working demos for quick testing. ## Overview -This is a **runtime-only** container designed for production deployment. It does -NOT bundle or build flows - it only executes pre-built `.mjs` bundles. +This is a **demo-enabled runtime container** designed for both testing and +production deployment. It executes pre-built `.mjs` bundles and includes +ready-to-run demo flows for instant exploration. **Key Characteristics:** - ⚡ **<1s startup** - No npm downloads or build steps at runtime -- 📦 **~50MB image** - Only runtime dependencies (express, cors, zod) +- 📦 **~199MB image** - Runtime dependencies + demo bundles for instant testing +- 🎯 **Dual-purpose** - Test with included demos OR deploy your own flows - 🔒 **Secure** - No build tools or package managers in production - ☁️ **Cloud-optimized** - Perfect for GCP Cloud Run, Kubernetes, ECS -- 🎯 **Single responsibility** - Execute flows, nothing else +- 🚀 **Try instantly** - Pre-built demos work out-of-the-box ## Architecture @@ -28,8 +30,8 @@ CLI bundles Docker imports & runs flow.mjs ──────────────→ Running collector ``` -**What's included:** Express server, flow executor, graceful shutdown **What's -NOT included:** CLI, bundler, npm, build tools +**What's included:** Express server, flow executor, graceful shutdown, demo +bundles **What's NOT included:** CLI, bundler, npm, build tools See [docs/CAPABILITIES.md](./docs/CAPABILITIES.md) for detailed architecture documentation. @@ -405,15 +407,15 @@ docker pull walkeros/docker:0.1.0 ## What's Different from CLI? -| Feature | @walkeros/docker | @walkeros/cli | -| ------------------- | --------------------- | --------------------------- | -| **Purpose** | Runtime execution | Build + orchestration | -| **Bundling** | ❌ No | ✅ Yes | -| **Dependencies** | 3 (runtime only) | 10 (includes Docker) | -| **Image Size** | ~50MB | N/A | -| **Startup** | <1s | N/A | -| **Docker Required** | For containerization | No (uses Docker as library) | -| **Use Case** | Production deployment | Development + build | +| Feature | @walkeros/docker | @walkeros/cli | +| ------------------- | -------------------- | --------------------------- | +| **Purpose** | Runtime execution | Build + orchestration | +| **Bundling** | ❌ No | ✅ Yes | +| **Dependencies** | Runtime + demos | 10 (includes Docker) | +| **Image Size** | ~199MB | N/A | +| **Startup** | <1s | N/A | +| **Docker Required** | For containerization | No (uses Docker as library) | +| **Use Case** | Testing + Production | Development + build | ## Version & Status @@ -422,11 +424,12 @@ changes) ### Production Ready ✅ -- ✅ Pure runtime architecture - zero build dependencies +- ✅ Demo-enabled runtime architecture - zero build dependencies +- ✅ Included demo bundles for instant testing - ✅ Library exports for CLI integration - ✅ Collect and serve modes - ✅ <1s startup time -- ✅ ~50MB Docker image +- ✅ ~199MB Docker image - ✅ Graceful shutdown handling - ✅ GCP Cloud Run optimized diff --git a/packages/docker/demos/README.md b/packages/docker/demos/README.md index 1c77a633b..0b65e7034 100644 --- a/packages/docker/demos/README.md +++ b/packages/docker/demos/README.md @@ -1,27 +1,19 @@ -# WalkerOS Docker Demo Bundles +# walkerOS Docker Demos -## Overview +This directory contains **pre-built demo bundles** ready to use immediately with +the walkerOS Docker image. No CLI setup or bundling required - just run and +test! -This directory contains pre-built demo bundles for quickly testing walkerOS -Docker functionality. These bundles are **static files**, manually created from -CLI examples and committed to the repository. +## Included Demo Bundles -## Available Demos +This directory contains two ready-to-run demo bundles: -### demo-collect.mjs +### 1. `demo-collect.mjs` (~96KB) -**Purpose**: Minimal server-side event collection endpoint +Server-side event collection demo. Starts an HTTP server that receives and +processes events. -**Source**: Built from `@walkeros/cli/examples/server-collect.json` - -**What it does**: - -- Starts Express server on configured port (default: 8080) -- Listens for POST requests at `/collect` -- Logs received events to console -- Returns `{"success": true}` response - -**Usage**: +**Run instantly:** ```bash docker run -p 8080:8080 \ @@ -30,28 +22,19 @@ docker run -p 8080:8080 \ walkeros/docker:latest ``` -**Test**: +**Test it:** ```bash curl -X POST http://localhost:8080/collect \ -H "Content-Type: application/json" \ - -d '{"name":"page view","data":{"title":"Test"}}' + -d '{"name":"page view","data":{"title":"Test Page"}}' ``` -### demo-serve.mjs - -**Purpose**: Browser bundle that sends events to collector +### 2. `demo-serve.mjs` (~376KB) -**Source**: Built from `@walkeros/cli/examples/web-serve.json` +Web bundle demo with automatic browser event tracking. -**What it does**: - -- Serves a web bundle with walker.js -- Includes demo event source (generates automatic test events) -- Sends events to console (browser) -- Sends events to API destination at `http://localhost:8080/collect` - -**Usage**: +**Run instantly:** ```bash docker run -p 3000:8080 \ @@ -60,13 +43,13 @@ docker run -p 3000:8080 \ walkeros/docker:latest ``` -**Access**: Open http://localhost:3000 in your browser +**Open in browser:** http://localhost:3000 -## Full Demo Loop +## Complete Demo Flow -Run both demos together to see the complete event flow: +Run both demos together to see the full event pipeline (browser → collector): -**Terminal 1 - Start Collector**: +**Terminal 1 - Start Collector:** ```bash docker run -p 8080:8080 \ @@ -76,7 +59,7 @@ docker run -p 8080:8080 \ walkeros/docker:latest ``` -**Terminal 2 - Start Web Serve**: +**Terminal 2 - Start Web Bundle:** ```bash docker run -p 3000:8080 \ @@ -86,84 +69,77 @@ docker run -p 3000:8080 \ walkeros/docker:latest ``` -**Test the Flow**: - -1. Open http://localhost:3000 in your browser -2. Check browser console for walker events -3. Check Terminal 1 for collector receiving those events -4. Events flow: Browser → http://localhost:8080/collect → Console logs +Open http://localhost:3000 and watch events flow to Terminal 1. -**Cleanup**: +**Cleanup:** ```bash -docker stop walker-collector walker-web -docker rm walker-collector walker-web +docker stop walker-collector walker-web && docker rm walker-collector walker-web ``` -## How These Were Built +## Custom Production Deployment -These bundles were manually created using the walkerOS CLI: +For production, bundle your own flow configuration: + +**Step 1: Bundle your flow** ```bash -# Install CLI npm install -g @walkeros/cli - -# Bundle from JSON configs -walkeros bundle examples/server-collect.json -o server-collect.mjs -walkeros bundle examples/web-serve.json -o web-serve.mjs - -# Copy to Docker package -cp server-collect.mjs packages/docker/demos/demo-collect.mjs -cp web-serve.mjs packages/docker/demos/demo-serve.mjs +walkeros bundle --config my-flow.json --output my-flow.mjs ``` -## Creating Custom Bundles +**Step 2: Deploy to Docker** -To create your own bundles: +```bash +docker run -p 8080:8080 \ + -v $(pwd)/my-flow.mjs:/app/flow.mjs \ + -e MODE=collect \ + -e FLOW=/app/flow.mjs \ + walkeros/docker:latest +``` -1. **Create flow config** (`my-flow.json`): +Or build a custom image: -```json -{ - "flow": { - "platform": "server", - "sources": { ... }, - "destinations": { ... } - }, - "build": { - "packages": { ... }, - "output": "my-flow.mjs" - } -} +```dockerfile +FROM walkeros/docker:latest +COPY my-flow.mjs /app/flow.mjs +ENV MODE=collect +ENV FLOW=/app/flow.mjs ``` -2. **Bundle it**: +## Rebuilding Demo Bundles + +These demos are built from the CLI examples. To rebuild: ```bash -walkeros bundle my-flow.json -``` +cd packages/cli -3. **Run with Docker**: +# Rebuild collector demo +node dist/index.mjs bundle --config examples/server-collect.json --local +cp server-collect.mjs ../docker/demos/demo-collect.mjs -```bash -docker run -p 8080:8080 \ - -v $(pwd)/my-flow.mjs:/app/flow.mjs \ - -e MODE=collect \ - -e FLOW=/app/flow.mjs \ - walkeros/docker:latest +# Rebuild serve demo +node dist/index.mjs bundle --config examples/web-serve.json --local +cp web-serve.js ../docker/demos/demo-serve.js ``` -## Bundle Details +## Documentation + +- [Docker Package README](../README.md) - Full Docker documentation +- [CLI Documentation](../../cli/README.md) - Building custom flows +- [walkerOS Documentation](https://github.com/elbwalker/walkerOS) - Complete + guide + +## Why Include Pre-built Demos? -| File | Size | Dependencies | Purpose | -| ---------------- | ------ | ------------------------------------------------------------------------------------------- | ------------------------- | -| demo-collect.mjs | ~54KB | @walkeros/server-source-express, @walkeros/destination-demo | Event collection endpoint | -| demo-serve.mjs | ~376KB | @walkeros/web-source-demo, @walkeros/web-destination-console, @walkeros/web-destination-api | Browser event tracking | +The walkerOS Docker image includes demos for optimal user experience: -## Notes +- **Instant Testing**: Try walkerOS in 30 seconds without any setup +- **Working Examples**: See real event collection and tracking in action +- **No Bloat for Production**: 199MB image size is reasonable for cloud + deployments +- **Onboarding**: New users can validate functionality immediately +- **Documentation**: Demos serve as executable documentation -- These bundles are **static files** committed to git -- They are NOT generated during Docker build -- They are version-controlled alongside the runtime code -- Update them manually when examples change (infrequent) -- Keep them minimal for quick startup and testing +The demos don't interfere with production usage - simply mount your own flow +bundle and the container ignores the demos entirely. diff --git a/packages/docker/demos/demo-collect.mjs b/packages/docker/demos/demo-collect.mjs index 2d0781425..445b2dd3b 100644 --- a/packages/docker/demos/demo-collect.mjs +++ b/packages/docker/demos/demo-collect.mjs @@ -1,1799 +1,13060 @@ -// node_modules/@walkeros/core/dist/index.mjs -import { z as f } from "zod"; -import { z as k } from "zod"; -import { z } from "zod"; - -// node_modules/zod-to-json-schema/dist/esm/Options.js -var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); -var defaultOptions = { - name: void 0, - $refStrategy: "root", - basePath: ["#"], - effectStrategy: "input", - pipeStrategy: "all", - dateStrategy: "format:date-time", - mapStrategy: "entries", - removeAdditionalStrategy: "passthrough", - allowedAdditionalProperties: true, - rejectedAdditionalProperties: false, - definitionPath: "definitions", - target: "jsonSchema7", - strictUnions: false, - definitions: {}, - errorMessages: false, - markdownDescription: false, - patternStrategy: "escape", - applyRegexFlags: false, - emailStrategy: "format:email", - base64Strategy: "contentEncoding:base64", - nameStrategy: "ref", - openAiAnyTypeName: "OpenAiAnyType" -}; -var getDefaultOptions = (options) => typeof options === "string" ? { - ...defaultOptions, - name: options -} : { - ...defaultOptions, - ...options -}; - -// node_modules/zod-to-json-schema/dist/esm/Refs.js -var getRefs = (options) => { - const _options = getDefaultOptions(options); - const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint2, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + decode: () => decode2, + decodeAsync: () => decodeAsync2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode2, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2 +}); + +// node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + clone: () => clone, + config: () => config, + decode: () => decode, + decodeAsync: () => decodeAsync, + encode: () => encode, + encodeAsync: () => encodeAsync, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version +}); + +// node_modules/zod/v4/core/core.js +var NEVER = Object.freeze({ + status: "aborted" +}); +// @__NO_SIDE_EFFECTS__ +function $constructor(name, initializer3, params) { + function init(inst, def) { + var _a; + Object.defineProperty(inst, "_zod", { + value: inst._zod ?? {}, + enumerable: false + }); + (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); + inst._zod.traits.add(name); + initializer3(inst, def); + for (const k3 in _3.prototype) { + if (!(k3 in inst)) + Object.defineProperty(inst, k3, { value: _3.prototype[k3].bind(inst) }); + } + inst._zod.constr = _3; + inst._zod.def = def; + } + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _3(def) { + var _a; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a = inst._zod).deferred ?? (_a.deferred = []); + for (const fn2 of inst._zod.deferred) { + fn2(); + } + return inst; + } + Object.defineProperty(_3, "init", { value: init }); + Object.defineProperty(_3, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_3, "name", { value: name }); + return _3; +} +var $brand = Symbol("zod_brand"); +var $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } +}; +var $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; +var globalConfig = {}; +function config(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} + +// node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject, + isPlainObject: () => isPlainObject, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x) { + throw new Error(); +} +function assert(_3) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v3) => typeof v3 === "number"); + const values = Object.entries(entries).filter(([k3, _3]) => numericValues.indexOf(+k3) === -1).map(([_3, v3]) => v3); + return values; +} +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_3, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set2 = false; return { - ..._options, - flags: { hasReferencedOpenAiAnyType: false }, - currentPath, - propertyPath: void 0, - seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ - def._def, - { - def: def._def, - path: [..._options.basePath, _options.definitionPath, name], - // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. - jsonSchema: void 0 + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; } - ])) + throw new Error("cached value already set"); + } }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match = stepString.match(/\d?e-(\d?)/); + if (match?.[1]) { + stepDecCount = Number.parseInt(match[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +var EVALUATING = Symbol("evaluating"); +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; + } + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v3) { + Object.defineProperty(object2, key, { + value: v3 + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i2 = 0; i2 < keys.length; i2++) { + resolvedObj[keys[i2]] = results[i2]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i2 = 0; i2 < length; i2++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { }; - -// node_modules/zod-to-json-schema/dist/esm/errorMessages.js -function addErrorMessage(res, key, errorMessage, refs) { - if (!refs?.errorMessages) - return; - if (errorMessage) { - res.errorMessage = { - ...res.errorMessage, - [key]: errorMessage - }; +function isObject(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +var allowsEval = cached(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F2 = Function; + new F2(""); + return true; + } catch (_3) { + return false; } +}); +function isPlainObject(o3) { + if (isObject(o3) === false) + return false; + const ctor = o3.constructor; + if (ctor === void 0) + return true; + const prot = ctor.prototype; + if (isObject(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; } -function setResponseValueAndErrors(res, key, value, errorMessage, refs) { - res[key] = value; - addErrorMessage(res, key, errorMessage, refs); +function shallowClone(o3) { + if (isPlainObject(o3)) + return { ...o3 }; + if (Array.isArray(o3)) + return [...o3]; + return o3; } - -// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js -var getRelativePath = (pathA, pathB) => { - let i2 = 0; - for (; i2 < pathA.length && i2 < pathB.length; i2++) { - if (pathA[i2] !== pathB[i2]) - break; +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +var getParsedType = (data) => { + const t3 = typeof data; + switch (t3) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t3}`); } - return [(pathA.length - i2).toString(), ...pathB.slice(i2)].join("/"); }; - -// node_modules/zod-to-json-schema/dist/esm/selectParser.js -import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind3 } from "zod"; - -// node_modules/zod-to-json-schema/dist/esm/parsers/any.js -function parseAnyDef(refs) { - if (refs.target !== "openAi") { +var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; +} +function normalizeParams(_params) { + const params = _params; + if (!params) return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; } - const anyDefinitionPath = [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ]; - refs.flags.hasReferencedOpenAiAnyType = true; - return { - $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") - }; + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/array.js -import { ZodFirstPartyTypeKind } from "zod"; -function parseArrayDef(def, refs) { - const res = { - type: "array" +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_3, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_3, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_3, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_3, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_3) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_3, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_3, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k3) => { + return shape[k3]._zod.optin === "optional" && shape[k3]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] +}; +var BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick(schema, mask) { + const currDef = schema._zod.def; + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead."); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: [] + }); + return clone(schema, def); +} +function safeExtend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = { + ...schema._zod.def, + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: schema._zod.def.checks }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) { - res.items = parseDef(def.type._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); + return clone(schema, def); +} +function merge(a4, b) { + const def = mergeDefs(a4._zod.def, { + get shape() { + const _shape = { ...a4._zod.def.shape, ...b._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a4, def); +} +function partial(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function aborted(x2, startIndex = 0) { + if (x2.aborted === true) + return true; + for (let i2 = startIndex; i2 < x2.issues.length; i2++) { + if (x2.issues[i2]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a; + (_a = iss).path ?? (_a.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message) { + return typeof message === "string" ? message : message?.message; +} +function finalizeIssue(iss, ctx, config2) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input"; + full.message = message; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k3, _3]) => { + return Number.isNaN(Number.parseInt(k3, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i2 = 0; i2 < binaryString.length; i2++) { + bytes[i2] = binaryString.charCodeAt(i2); } - if (def.minLength) { - setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i2 = 0; i2 < bytes.length; i2++) { + binaryString += String.fromCharCode(bytes[i2]); } - if (def.maxLength) { - setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); + return btoa(binaryString); +} +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); } - if (def.exactLength) { - setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); - setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs); + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i2 = 0; i2 < cleanHex.length; i2 += 2) { + bytes[i2 / 2] = Number.parseInt(cleanHex.slice(i2, i2 + 2), 16); } - return res; + return bytes; } +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} +var Class = class { + constructor(..._args) { + } +}; -// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js -function parseBigintDef(def, refs) { - const res = { - type: "integer", - format: "int64" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); +// node_modules/zod/v4/core/errors.js +var initializer = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); +}; +var $ZodError = $constructor("$ZodError", initializer); +var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); +function flattenError(error46, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error46.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error46, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = (error47) => { + for (const issue2 of error47.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i2 = 0; + while (i2 < issue2.path.length) { + const el = issue2.path[i2]; + const terminal = i2 === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); + curr = curr[el]; + i2++; } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); + } + } + }; + processError(error46); + return fieldErrors; +} +function treeifyError(error46, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = (error47, path = []) => { + var _a, _b; + for (const issue2 of error47.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i2 = 0; + while (i2 < fullpath.length) { + const el = fullpath[i2]; + const terminal = i2 === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a = curr.properties)[el] ?? (_a[el] = { errors: [] }); + curr = curr.properties[el]; } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; + if (terminal) { + curr.errors.push(mapper(issue2)); } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); + i2++; } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; + } } - } - return res; -} - -// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js -function parseBooleanDef() { - return { - type: "boolean" }; + processError(error46); + return result; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js -function parseBrandedDef(_def, refs) { - return parseDef(_def.type._def, refs); +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error46) { + const lines = []; + const issues = [...error46.issues].sort((a4, b) => (a4.path ?? []).length - (b.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); } -// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js -var parseCatchDef = (def, refs) => { - return parseDef(def.innerType._def, refs); +// node_modules/zod/v4/core/parse.js +var _parse = (_Err) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e5 = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e5, _params?.callee); + throw e5; + } + return result.value; }; - -// node_modules/zod-to-json-schema/dist/esm/parsers/date.js -function parseDateDef(def, refs, overrideDateStrategy) { - const strategy = overrideDateStrategy ?? refs.dateStrategy; - if (Array.isArray(strategy)) { - return { - anyOf: strategy.map((item, i2) => parseDateDef(def, refs, item)) - }; +var parse = /* @__PURE__ */ _parse($ZodRealError); +var _parseAsync = (_Err) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e5 = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e5, params?.callee); + throw e5; } - switch (strategy) { - case "string": - case "format:date-time": - return { - type: "string", - format: "date-time" - }; - case "format:date": - return { - type: "string", - format: "date" - }; - case "integer": - return integerDateParser(def, refs); - } -} -var integerDateParser = (def, refs) => { - const res = { - type: "integer", - format: "unix-time" - }; - if (refs.target === "openApi3") { - return res; - } - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors( - res, - "minimum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - case "max": - setResponseValueAndErrors( - res, - "maximum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - } + return result.value; +}; +var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); +var _safeParse = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); } - return res; + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); +var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err)(schema, value, ctx); +}; +var encode = /* @__PURE__ */ _encode($ZodRealError); +var _decode = (_Err) => (schema, value, _ctx) => { + return _parse(_Err)(schema, value, _ctx); +}; +var decode = /* @__PURE__ */ _decode($ZodRealError); +var _encodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err)(schema, value, ctx); }; +var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); +var _decodeAsync = (_Err) => async (schema, value, _ctx) => { + return _parseAsync(_Err)(schema, value, _ctx); +}; +var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); +var _safeEncode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err)(schema, value, ctx); +}; +var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); +var _safeDecode = (_Err) => (schema, value, _ctx) => { + return _safeParse(_Err)(schema, value, _ctx); +}; +var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); +var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err)(schema, value, ctx); +}; +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); +var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err)(schema, value, _ctx); +}; +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); -// node_modules/zod-to-json-schema/dist/esm/parsers/default.js -function parseDefaultDef(_def, refs) { - return { - ...parseDef(_def.innerType._def, refs), - default: _def.defaultValue() - }; +// node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date, + datetime: () => datetime, + domain: () => domain, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +var cuid = /^[cC][^\s-]{8,}$/; +var cuid2 = /^[0-9a-z]+$/; +var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid = /^[0-9a-vA-V]{20}$/; +var ksuid = /^[A-Za-z0-9]{27}$/; +var nanoid = /^[a-zA-Z0-9_-]{21}$/; +var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; +var uuid = (version2) => { + if (!version2) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}; +var uuid4 = /* @__PURE__ */ uuid(4); +var uuid6 = /* @__PURE__ */ uuid(6); +var uuid7 = /* @__PURE__ */ uuid(7); +var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; +var idnEmail = unicodeEmail; +var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji() { + return new RegExp(_emoji, "u"); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js -function parseEffectsDef(_def, refs) { - return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); +var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; +var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url = /^[A-Za-z0-9_-]*$/; +var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; +var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; +var e164 = /^\+(?:[0-9]){6,14}[0-9]$/; +var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; +var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +function time(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time3 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time3}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +var string = (params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); +}; +var bigint = /^-?\d+n?$/; +var integer = /^-?\d+$/; +var number = /^-?\d+(?:\.\d+)?/; +var boolean = /^(?:true|false)$/i; +var _null = /^null$/i; +var _undefined = /^undefined$/i; +var lowercase = /^[^A-Z]*$/; +var uppercase = /^[^a-z]*$/; +var hex = /^[0-9a-fA-F]*$/; +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); } +var md5_hex = /^[0-9a-fA-F]{32}$/; +var md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); +var md5_base64url = /* @__PURE__ */ fixedBase64url(22); +var sha1_hex = /^[0-9a-fA-F]{40}$/; +var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); +var sha1_base64url = /* @__PURE__ */ fixedBase64url(27); +var sha256_hex = /^[0-9a-fA-F]{64}$/; +var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); +var sha256_base64url = /* @__PURE__ */ fixedBase64url(43); +var sha384_hex = /^[0-9a-fA-F]{96}$/; +var sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); +var sha384_base64url = /* @__PURE__ */ fixedBase64url(64); +var sha512_hex = /^[0-9a-fA-F]{128}$/; +var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); +var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); -// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js -function parseEnumDef(def) { - return { - type: "string", - enum: Array.from(def.values) +// node_modules/zod/v4/core/checks.js +var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a = inst._zod).onattach ?? (_a.onattach = []); +}); +var numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_big", + maximum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_small", + minimum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a; + (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); }; +}); +var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inst + }); + } + }; +}); +var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inst + }); + } + }; +}); +var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a; + $ZodCheck.init(inst, def); + (_a = inst._zod.def).when ?? (_a.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a = inst._zod).check ?? (_a.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); +}); +var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; +}); +var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; +}); + +// node_modules/zod/v4/core/doc.js +var Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn2) { + this.indent += 1; + fn2(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split("\n").filter((x2) => x2); + const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length)); + const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F2 = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x2) => ` ${x2}`)]; + return new F2(...args, lines.join("\n")); + } +}; + +// node_modules/zod/v4/core/versions.js +var version = { + major: 4, + minor: 1, + patch: 12 +}; + +// node_modules/zod/v4/core/schemas.js +var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch of checks) { + for (const fn2 of ch._zod.onattach) { + fn2(inst); + } + } + if (checks.length === 0) { + (_a = inst._zod).deferred ?? (_a.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _3 = ch._zod.check(payload); + if (_3 instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _3 instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _3; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }; + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + inst["~standard"] = { + validate: (value) => { + try { + const r2 = safeParse(inst, value); + return r2.success ? { value: r2.data } : { issues: r2.error?.issues }; + } catch (_3) { + return safeParseAsync(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues }); + } + }, + vendor: "zod", + version: 1 + }; +}); +var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _3) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_4) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); +}); +var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); +}); +var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v3 = versionMap[def.version]; + if (v3 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v3)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); +}); +var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); +}); +var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_3) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); +}); +var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); +}); +var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); +}); +var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); +}); +var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date); + $ZodStringFormat.init(inst, def); +}); +var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); +}); +var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = `ipv4`; + }); +}); +var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = `ipv6`; + }); + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); +}); +var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.contentEncoding = "base64"; + }); + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.contentEncoding = "base64url"; + }); + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); +}); +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_3) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; +}); +var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); +}); +var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_3) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_3) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); +}); +var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate = input instanceof Date; + const isValidDate = isDate && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; +}); +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i2 = 0; i2 < input.length; i2++) { + const item = input[i2]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i2))); + } else { + handleArrayResult(result, payload, i2); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +function handlePropertyResult(result, final, key, input) { + if (result.issues.length) { + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k3 of keys) { + if (!def.shape?.[k3]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k3}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t3 = _catchall.def.type; + for (const key of Object.keys(input)) { + if (keySet.has(key)) + continue; + if (t3 === "never") { + unrecognized.push(key); + continue; + } + const r2 = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input))); + } else { + handlePropertyResult(r2, payload, key, input); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v3 of field.values) + propValues[key].add(v3); + } + } + return propValues; + }); + const isObject2 = isObject; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const r2 = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input))); + } else { + handlePropertyResult(r2, payload, key, input); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; +}); +var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = (shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k3 = esc(key); + return `shape[${k3}]._zod.run({ value: input[${k3}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k3 = esc(key); + doc.write(`const ${id} = ${parseStr(key)};`); + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k3}, ...iss.path] : [${k3}] + }))); + } + + + if (${id}.value === undefined) { + if (${k3} in input) { + newResult[${k3}] = undefined; + } + } else { + newResult[${k3}] = ${id}.value; + } + + `); + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn2 = doc.compile(); + return (payload, ctx) => fn2(shape, payload, ctx); + }; + let fastpass; + const isObject2 = isObject; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; +}); +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r2) => !aborted(r2)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + }); + return final; +} +var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o3) => o3._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o3) => o3._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o3) => o3._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o3) => o3._zod.pattern)) { + const patterns = def.options.map((o3) => o3._zod.pattern); + return new RegExp(`^(${patterns.map((p2) => cleanRegex(p2.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k3, v3] of Object.entries(pv)) { + if (!propValues[k3]) + propValues[k3] = /* @__PURE__ */ new Set(); + for (const val of v3) { + propValues[k3].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o3 of opts) { + const values = o3._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o3)}"`); + for (const v3 of values) { + if (map2.has(v3)) { + throw new Error(`Duplicate discriminator value "${String(v3)}"`); + } + map2.set(v3, o3); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; +}); +function mergeValues(a4, b) { + if (a4 === b) { + return { valid: true, data: a4 }; + } + if (a4 instanceof Date && b instanceof Date && +a4 === +b) { + return { valid: true, data: a4 }; + } + if (isPlainObject(a4) && isPlainObject(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a4).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a4, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a4[key], b[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a4) && Array.isArray(b)) { + if (a4.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a4.length; index++) { + const itemA = a4[index]; + const itemB = b[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + if (left.issues.length) { + result.issues.push(...left.issues); + } + if (right.issues.length) { + result.issues.push(...right.issues); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i2 = -1; + for (const item of items) { + i2++; + if (i2 >= input.length) { + if (i2 >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i2], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i2++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + if (def.keyType._zod.values) { + const values = def.keyType._zod.values; + payload.value = {}; + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!values.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (keyResult.issues.length) { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), + input: key, + path: [key], + inst + }); + payload.value[keyResult.value] = keyResult.value; + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k3) => propertyKeyTypes.has(typeof k3)).map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; +}); +var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + inst._zod.values = new Set(def.values); + inst._zod.pattern = new RegExp(`^(${def.values.map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3 ? escapeRegex(o3.toString()) : String(o3)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (inst._zod.values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; +}); +var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; +}); +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r2) => handleOptionalResult(r2, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; +}); +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v3 = def.innerType._zod.values; + return v3 ? new Set([...v3].filter((x2) => x2 !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; +}); +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; +}); +var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; +}); +var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; +}); +var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; +}); +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; +}); +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; +}); +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "template_literal", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; +}); +var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F2 = inst.constructor; + if (Array.isArray(args[0])) { + return new F2({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F2({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F2 = inst.constructor; + return new F2({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; +}); +var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; +}); +var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; +}); +var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _3) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r2 = def.fn(input); + if (r2 instanceof Promise) { + return r2.then((r3) => handleRefineResult(r3, payload, input, inst)); + } + handleRefineResult(r2, payload, input, inst); + return; + }; +}); +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} + +// node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); + +// node_modules/zod/v4/locales/ar.js +var error = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; +}; +function ar_default() { + return { + localeError: error() + }; +} + +// node_modules/zod/v4/locales/az.js +var error2 = () => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; +}; +function az_default() { + return { + localeError: error2() + }; +} + +// node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +var error3 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u043B\u0456\u043A"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0456\u045E"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; +}; +function be_default() { + return { + localeError: error3() + }; +} + +// node_modules/zod/v4/locales/bg.js +var parsedType = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error4 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${parsedType(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; +}; +function bg_default() { + return { + localeError: error4() + }; +} + +// node_modules/zod/v4/locales/ca.js +var error5 = () => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; +}; +function ca_default() { + return { + localeError: error5() + }; +} + +// node_modules/zod/v4/locales/cs.js +var error6 = () => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u010D\xEDslo"; + } + case "string": { + return "\u0159et\u011Bzec"; + } + case "boolean": { + return "boolean"; + } + case "bigint": { + return "bigint"; + } + case "function": { + return "funkce"; + } + case "symbol": { + return "symbol"; + } + case "undefined": { + return "undefined"; + } + case "object": { + if (Array.isArray(data)) { + return "pole"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; +}; +function cs_default() { + return { + localeError: error6() + }; +} + +// node_modules/zod/v4/locales/da.js +var error7 = () => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + const TypeNames = { + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + function getTypeName(type) { + return TypeNames[type] ?? type; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "tal"; + } + case "object": { + if (Array.isArray(data)) { + return "liste"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + return "objekt"; + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ugyldigt input: forventede ${getTypeName(issue2.expected)}, fik ${getTypeName(parsedType8(issue2.input))}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) + return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) { + return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; +}; +function da_default() { + return { + localeError: error7() + }; +} + +// node_modules/zod/v4/locales/de.js +var error8 = () => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "Zahl"; + } + case "object": { + if (Array.isArray(data)) { + return "Array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; +}; +function de_default() { + return { + localeError: error8() + }; +} + +// node_modules/zod/v4/locales/en.js +var parsedType2 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error9 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Invalid input: expected ${issue2.expected}, received ${parsedType2(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; +}; +function en_default() { + return { + localeError: error9() + }; +} + +// node_modules/zod/v4/locales/eo.js +var parsedType3 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombro"; + } + case "object": { + if (Array.isArray(data)) { + return "tabelo"; + } + if (data === null) { + return "senvalora"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error10 = () => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType3(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; +}; +function eo_default() { + return { + localeError: error10() + }; +} + +// node_modules/zod/v4/locales/es.js +var error11 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + const TypeNames = { + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + function getTypeName(type) { + return TypeNames[type] ?? type; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype) { + return data.constructor.name; + } + return "object"; + } + } + return t3; + }; + const Nouns = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entrada inv\xE1lida: se esperaba ${getTypeName(issue2.expected)}, recibido ${getTypeName(parsedType8(issue2.input))}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) + return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin = getTypeName(issue2.origin); + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${getTypeName(issue2.origin)}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${getTypeName(issue2.origin)}`; + default: + return `Entrada inv\xE1lida`; + } + }; +}; +function es_default() { + return { + localeError: error11() + }; +} + +// node_modules/zod/v4/locales/fa.js +var error12 = () => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0622\u0631\u0627\u06CC\u0647"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType8(issue2.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; +}; +function fa_default() { + return { + localeError: error12() + }; +} + +// node_modules/zod/v4/locales/fi.js +var error13 = () => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; +}; +function fi_default() { + return { + localeError: error13() + }; +} + +// node_modules/zod/v4/locales/fr.js +var error14 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombre"; + } + case "object": { + if (Array.isArray(data)) { + return "tableau"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType8(issue2.input)} re\xE7u`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_default() { + return { + localeError: error14() + }; +} + +// node_modules/zod/v4/locales/fr-CA.js +var error15 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_CA_default() { + return { + localeError: error15() + }; +} + +// node_modules/zod/v4/locales/he.js +var error16 = () => { + const Sizable = { + string: { unit: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u05E7\u05DC\u05D8", + email: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", + url: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", + emoji: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", + date: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", + time: "\u05D6\u05DE\u05DF ISO", + duration: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", + ipv4: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", + ipv6: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", + cidrv4: "\u05D8\u05D5\u05D5\u05D7 IPv4", + cidrv6: "\u05D8\u05D5\u05D5\u05D7 IPv6", + base64: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", + base64url: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", + json_string: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", + e164: "\u05DE\u05E1\u05E4\u05E8 E.164", + jwt: "JWT", + template_literal: "\u05E7\u05DC\u05D8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue2.values[0])}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; +}; +function he_default() { + return { + localeError: error16() + }; +} + +// node_modules/zod/v4/locales/hu.js +var error17 = () => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "sz\xE1m"; + } + case "object": { + if (Array.isArray(data)) { + return "t\xF6mb"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; +}; +function hu_default() { + return { + localeError: error17() + }; +} + +// node_modules/zod/v4/locales/id.js +var error18 = () => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; +}; +function id_default() { + return { + localeError: error18() + }; +} + +// node_modules/zod/v4/locales/is.js +var parsedType4 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\xFAmer"; + } + case "object": { + if (Array.isArray(data)) { + return "fylki"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error19 = () => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${parsedType4(issue2.input)} \xFEar sem \xE1 a\xF0 vera ${issue2.expected}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; +}; +function is_default() { + return { + localeError: error19() + }; +} + +// node_modules/zod/v4/locales/it.js +var error20 = () => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "numero"; + } + case "object": { + if (Array.isArray(data)) { + return "vettore"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; +}; +function it_default() { + return { + localeError: error20() + }; +} + +// node_modules/zod/v4/locales/ja.js +var error21 = () => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u6570\u5024"; + } + case "object": { + if (Array.isArray(data)) { + return "\u914D\u5217"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u7121\u52B9\u306A\u5165\u529B: ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType8(issue2.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; +}; +function ja_default() { + return { + localeError: error21() + }; +} + +// node_modules/zod/v4/locales/ka.js +var parsedType5 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8"; + } + case "object": { + if (Array.isArray(data)) { + return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + const typeMap = { + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + undefined: "undefined", + bigint: "bigint", + symbol: "symbol", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0" + }; + return typeMap[t3] ?? t3; +}; +var error22 = () => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${parsedType5(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; +}; +function ka_default() { + return { + localeError: error22() + }; +} + +// node_modules/zod/v4/locales/km.js +var error23 = () => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)" : "\u179B\u17C1\u1781"; + } + case "object": { + if (Array.isArray(data)) { + return "\u17A2\u17B6\u179A\u17C1 (Array)"; + } + if (data === null) { + return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; +}; +function km_default() { + return { + localeError: error23() + }; +} + +// node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} + +// node_modules/zod/v4/locales/ko.js +var error24 = () => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType8(issue2.input)}\uC785\uB2C8\uB2E4`; + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; +}; +function ko_default() { + return { + localeError: error24() + }; +} + +// node_modules/zod/v4/locales/lt.js +var parsedType6 = (data) => { + const t3 = typeof data; + return parsedTypeFromType(t3, data); +}; +var parsedTypeFromType = (t3, data = void 0) => { + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "skai\u010Dius"; + } + case "bigint": { + return "sveikasis skai\u010Dius"; + } + case "string": { + return "eilut\u0117"; + } + case "boolean": { + return "login\u0117 reik\u0161m\u0117"; + } + case "undefined": + case "void": { + return "neapibr\u0117\u017Eta reik\u0161m\u0117"; + } + case "function": { + return "funkcija"; + } + case "symbol": { + return "simbolis"; + } + case "object": { + if (data === void 0) + return "ne\u017Einomas objektas"; + if (data === null) + return "nulin\u0117 reik\u0161m\u0117"; + if (Array.isArray(data)) + return "masyvas"; + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + return "objektas"; + } + case "null": { + return "nulin\u0117 reik\u0161m\u0117"; + } + } + return t3; +}; +var capitalizeFirstCharacter = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1); +}; +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +var error25 = () => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + const Nouns = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Gautas tipas ${parsedType6(issue2.input)}, o tik\u0117tasi - ${parsedTypeFromType(issue2.expected)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin = parsedTypeFromType(issue2.origin); + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin = parsedTypeFromType(issue2.origin); + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin = parsedTypeFromType(issue2.origin); + return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; +}; +function lt_default() { + return { + localeError: error25() + }; +} + +// node_modules/zod/v4/locales/mk.js +var error26 = () => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0431\u0440\u043E\u0458"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043D\u0438\u0437\u0430"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; +}; +function mk_default() { + return { + localeError: error26() + }; +} + +// node_modules/zod/v4/locales/ms.js +var error27 = () => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "nombor"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; +}; +function ms_default() { + return { + localeError: error27() + }; +} + +// node_modules/zod/v4/locales/nl.js +var error28 = () => { + const Sizable = { + string: { unit: "tekens" }, + file: { unit: "bytes" }, + array: { unit: "elementen" }, + set: { unit: "elementen" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "getal"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; + return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} bevat`; + } + return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; +}; +function nl_default() { + return { + localeError: error28() + }; +} + +// node_modules/zod/v4/locales/no.js +var error29 = () => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "tall"; + } + case "object": { + if (Array.isArray(data)) { + return "liste"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; +}; +function no_default() { + return { + localeError: error29() + }; +} + +// node_modules/zod/v4/locales/ota.js +var error30 = () => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "numara"; + } + case "object": { + if (Array.isArray(data)) { + return "saf"; + } + if (data === null) { + return "gayb"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; +}; +function ota_default() { + return { + localeError: error30() + }; +} + +// node_modules/zod/v4/locales/ps.js +var error31 = () => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0627\u0631\u06D0"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType8(issue2.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; +}; +function ps_default() { + return { + localeError: error31() + }; +} + +// node_modules/zod/v4/locales/pl.js +var error32 = () => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "liczba"; + } + case "object": { + if (Array.isArray(data)) { + return "tablica"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; +}; +function pl_default() { + return { + localeError: error32() + }; +} + +// node_modules/zod/v4/locales/pt.js +var error33 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\xFAmero"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "nulo"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; +}; +function pt_default() { + return { + localeError: error33() + }; +} + +// node_modules/zod/v4/locales/ru.js +function getRussianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +var error34 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; +}; +function ru_default() { + return { + localeError: error34() + }; +} + +// node_modules/zod/v4/locales/sl.js +var error35 = () => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0161tevilo"; + } + case "object": { + if (Array.isArray(data)) { + return "tabela"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; +}; +function sl_default() { + return { + localeError: error35() + }; +} + +// node_modules/zod/v4/locales/sv.js +var error36 = () => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "antal"; + } + case "object": { + if (Array.isArray(data)) { + return "lista"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; +}; +function sv_default() { + return { + localeError: error36() + }; +} + +// node_modules/zod/v4/locales/ta.js +var error37 = () => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1" : "\u0B8E\u0BA3\u0BCD"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0B85\u0BA3\u0BBF"; + } + if (data === null) { + return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; +}; +function ta_default() { + return { + localeError: error37() + }; +} + +// node_modules/zod/v4/locales/th.js +var error38 = () => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)"; + } + if (data === null) { + return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; +}; +function th_default() { + return { + localeError: error38() + }; +} + +// node_modules/zod/v4/locales/tr.js +var parsedType7 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; +}; +var error39 = () => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType7(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; +}; +function tr_default() { + return { + localeError: error39() + }; +} + +// node_modules/zod/v4/locales/uk.js +var error40 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; + } + case "object": { + if (Array.isArray(data)) { + return "\u043C\u0430\u0441\u0438\u0432"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; +}; +function uk_default() { + return { + localeError: error40() + }; +} + +// node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} + +// node_modules/zod/v4/locales/ur.js +var error41 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "\u0646\u0645\u0628\u0631"; + } + case "object": { + if (Array.isArray(data)) { + return "\u0622\u0631\u06D2"; + } + if (data === null) { + return "\u0646\u0644"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType8(issue2.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; +}; +function ur_default() { + return { + localeError: error41() + }; +} + +// node_modules/zod/v4/locales/vi.js +var error42 = () => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "s\u1ED1"; + } + case "object": { + if (Array.isArray(data)) { + return "m\u1EA3ng"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${Nouns[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; +}; +function vi_default() { + return { + localeError: error42() + }; +} + +// node_modules/zod/v4/locales/zh-CN.js +var error43 = () => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "\u975E\u6570\u5B57(NaN)" : "\u6570\u5B57"; + } + case "object": { + if (Array.isArray(data)) { + return "\u6570\u7EC4"; + } + if (data === null) { + return "\u7A7A\u503C(null)"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; +}; +function zh_CN_default() { + return { + localeError: error43() + }; +} + +// node_modules/zod/v4/locales/zh-TW.js +var error44 = () => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; +}; +function zh_TW_default() { + return { + localeError: error44() + }; +} + +// node_modules/zod/v4/locales/yo.js +var error45 = () => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const parsedType8 = (data) => { + const t3 = typeof data; + switch (t3) { + case "number": { + return Number.isNaN(data) ? "NaN" : "n\u1ECD\u0301mb\xE0"; + } + case "object": { + if (Array.isArray(data)) { + return "akop\u1ECD"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t3; + }; + const Nouns = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${parsedType8(issue2.input)}`; + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${Nouns[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; +}; +function yo_default() { + return { + localeError: error45() + }; +} + +// node_modules/zod/v4/core/registries.js +var $output = Symbol("ZodOutput"); +var $input = Symbol("ZodInput"); +var $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta = _meta[0]; + this._map.set(schema, meta); + if (meta && typeof meta === "object" && "id" in meta) { + if (this._idmap.has(meta.id)) { + throw new Error(`ID ${meta.id} already exists in the registry`); + } + this._idmap.set(meta.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta = this._map.get(schema); + if (meta && typeof meta === "object" && "id" in meta) { + this._idmap.delete(meta.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p2 = schema._zod.parent; + if (p2) { + const pm = { ...this.get(p2) ?? {} }; + delete pm.id; + const f = { ...pm, ...this._map.get(schema) }; + return Object.keys(f).length ? f : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } +}; +function registry() { + return new $ZodRegistry(); +} +var globalRegistry = /* @__PURE__ */ registry(); + +// node_modules/zod/v4/core/api.js +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +var TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 +}; +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _positive(params) { + return _gt(0, params); +} +function _negative(params) { + return _lt(0, params); +} +function _nonpositive(params) { + return _lte(0, params); +} +function _nonnegative(params) { + return _gte(0, params); +} +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +function _maxLength(maximum, params) { + const ch = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +function _transform(Class2, fn2) { + return new Class2({ + type: "transform", + transform: fn2 + }); +} +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +function _custom(Class2, fn2, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn: fn2, + ...norm + }); + return schema; +} +function _refine(Class2, fn2, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn: fn2, + ...normalizeParams(_params) + }); + return schema; +} +function _superRefine(fn2) { + const ch = _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn2(payload.value, payload); + }); + return ch; +} +function _check(fn2, params) { + const ch = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch._zod.check = fn2; + return ch; +} +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + falsyArray = falsyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: (input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }, + reverseTransform: (input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }, + error: params.error + }); + return codec2; +} +function _stringFormat(Class2, format, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} + +// node_modules/zod/v4/core/to-json-schema.js +var JSONSchemaGenerator = class { + constructor(params) { + this.counter = 0; + this.metadataRegistry = params?.metadata ?? globalRegistry; + this.target = params?.target ?? "draft-2020-12"; + this.unrepresentable = params?.unrepresentable ?? "throw"; + this.override = params?.override ?? (() => { + }); + this.io = params?.io ?? "output"; + this.seen = /* @__PURE__ */ new Map(); + } + process(schema, _params = { path: [], schemaPath: [] }) { + var _a; + const def = schema._zod.def; + const formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + const seen = this.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + this.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + const parent = schema._zod.parent; + if (parent) { + result.ref = parent; + this.process(parent, params); + this.seen.get(parent).isParent = true; + } else { + const _json = result.schema; + switch (def.type) { + case "string": { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format) { + json2.format = formatMap[format] ?? format; + if (json2.format === "") + delete json2.format; + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + result.schema.allOf = [ + ...regexes.map((regex) => ({ + ...this.target === "draft-7" || this.target === "draft-4" || this.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } + break; + } + case "number": { + const json2 = _json; + const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format === "string" && format.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && this.target !== "draft-4") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && this.target !== "draft-4") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; + break; + } + case "boolean": { + const json2 = _json; + json2.type = "boolean"; + break; + } + case "bigint": { + if (this.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + break; + } + case "symbol": { + if (this.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + break; + } + case "null": { + if (this.target === "openapi-3.0") { + _json.type = "string"; + _json.nullable = true; + _json.enum = [null]; + } else + _json.type = "null"; + break; + } + case "any": { + break; + } + case "unknown": { + break; + } + case "undefined": { + if (this.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + break; + } + case "void": { + if (this.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + break; + } + case "never": { + _json.not = {}; + break; + } + case "date": { + if (this.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + break; + } + case "array": { + const json2 = _json; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = this.process(def.element, { ...params, path: [...params.path, "items"] }); + break; + } + case "object": { + const json2 = _json; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = this.process(shape[key], { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v3 = def.shape[key]._zod; + if (this.io === "input") { + return v3.optin === void 0; + } else { + return v3.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (this.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = this.process(def.catchall, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + break; + } + case "union": { + const json2 = _json; + const options = def.options.map((x2, i2) => this.process(x2, { + ...params, + path: [...params.path, "anyOf", i2] + })); + json2.anyOf = options; + break; + } + case "intersection": { + const json2 = _json; + const a4 = this.process(def.left, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b = this.process(def.right, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; + const allOf = [ + ...isSimpleIntersection(a4) ? a4.allOf : [a4], + ...isSimpleIntersection(b) ? b.allOf : [b] + ]; + json2.allOf = allOf; + break; + } + case "tuple": { + const json2 = _json; + json2.type = "array"; + const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x2, i2) => this.process(x2, { + ...params, + path: [...params.path, prefixPath, i2] + })); + const rest = def.rest ? this.process(def.rest, { + ...params, + path: [...params.path, restPath, ...this.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (this.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (this.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + break; + } + case "record": { + const json2 = _json; + json2.type = "object"; + if (this.target === "draft-7" || this.target === "draft-2020-12") { + json2.propertyNames = this.process(def.keyType, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = this.process(def.valueType, { + ...params, + path: [...params.path, "additionalProperties"] + }); + break; + } + case "map": { + if (this.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + break; + } + case "set": { + if (this.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + break; + } + case "enum": { + const json2 = _json; + const values = getEnumValues(def.entries); + if (values.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (values.every((v3) => typeof v3 === "string")) + json2.type = "string"; + json2.enum = values; + break; + } + case "literal": { + const json2 = _json; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (this.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (this.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (this.target === "draft-4" || this.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (vals.every((v3) => typeof v3 === "string")) + json2.type = "string"; + if (vals.every((v3) => typeof v3 === "boolean")) + json2.type = "string"; + if (vals.every((v3) => v3 === null)) + json2.type = "null"; + json2.enum = vals; + } + break; + } + case "file": { + const json2 = _json; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(json2, file2); + } else { + json2.anyOf = mime.map((m) => { + const mFile = { ...file2, contentMediaType: m }; + return mFile; + }); + } + } else { + Object.assign(json2, file2); + } + break; + } + case "transform": { + if (this.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + break; + } + case "nullable": { + const inner = this.process(def.innerType, params); + if (this.target === "openapi-3.0") { + result.ref = def.innerType; + _json.nullable = true; + } else { + _json.anyOf = [inner, { type: "null" }]; + } + break; + } + case "nonoptional": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "success": { + const json2 = _json; + json2.type = "boolean"; + break; + } + case "default": { + this.process(def.innerType, params); + result.ref = def.innerType; + _json.default = JSON.parse(JSON.stringify(def.defaultValue)); + break; + } + case "prefault": { + this.process(def.innerType, params); + result.ref = def.innerType; + if (this.io === "input") + _json._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + break; + } + case "catch": { + this.process(def.innerType, params); + result.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + _json.default = catchValue; + break; + } + case "nan": { + if (this.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + break; + } + case "template_literal": { + const json2 = _json; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + json2.type = "string"; + json2.pattern = pattern.source; + break; + } + case "pipe": { + const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + this.process(innerType, params); + result.ref = innerType; + break; + } + case "readonly": { + this.process(def.innerType, params); + result.ref = def.innerType; + _json.readOnly = true; + break; + } + case "promise": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "optional": { + this.process(def.innerType, params); + result.ref = def.innerType; + break; + } + case "lazy": { + const innerType = schema._zod.innerType; + this.process(innerType, params); + result.ref = innerType; + break; + } + case "custom": { + if (this.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + break; + } + case "function": { + if (this.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + break; + } + default: { + def; + } + } + } + } + const meta = this.metadataRegistry.get(schema); + if (meta) + Object.assign(result.schema, meta); + if (this.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (this.io === "input" && result.schema._prefault) + (_a = result.schema).default ?? (_a.default = result.schema._prefault); + delete result.schema._prefault; + const _result = this.seen.get(schema); + return _result.schema; + } + emit(schema, _params) { + const params = { + cycles: _params?.cycles ?? "ref", + reused: _params?.reused ?? "inline", + // unrepresentable: _params?.unrepresentable ?? "throw", + // uri: _params?.uri ?? ((id) => `${id}`), + external: _params?.external ?? void 0 + }; + const root = this.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const makeURI = (entry) => { + const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions"; + if (params.external) { + const externalId = params.external.registry.get(entry[0])?.id; + const uriGenerator = params.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${this.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }; + const extractToDef = (entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; + }; + if (params.cycles === "throw") { + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (params.external) { + const ext = params.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = this.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (params.reused === "ref") { + extractToDef(entry); + continue; + } + } + } + const flattenRef = (zodSchema, params2) => { + const seen = this.seen.get(zodSchema); + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + if (seen.ref === null) { + return; + } + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref, params2); + const refSchema = this.seen.get(ref).schema; + if (refSchema.$ref && (params2.target === "draft-7" || params2.target === "draft-4" || params2.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + Object.assign(schema2, _cached); + } + } + if (!seen.isParent) + this.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }; + for (const entry of [...this.seen.entries()].reverse()) { + flattenRef(entry[0], { target: this.target }); + } + const result = {}; + if (this.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (this.target === "draft-7") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (this.target === "draft-4") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (this.target === "openapi-3.0") { + } else { + console.warn(`Invalid target: ${this.target}`); + } + if (params.external?.uri) { + const id = params.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = params.external.uri(id); + } + Object.assign(result, root.def); + const defs = params.external?.defs ?? {}; + for (const entry of this.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (params.external) { + } else { + if (Object.keys(defs).length > 0) { + if (this.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + return JSON.parse(JSON.stringify(result)); + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } + } +}; +function toJSONSchema(input, _params) { + if (input instanceof $ZodRegistry) { + const gen2 = new JSONSchemaGenerator(_params); + const defs = {}; + for (const entry of input._idmap.entries()) { + const [_3, schema] = entry; + gen2.process(schema); + } + const schemas = {}; + const external = { + registry: input, + uri: _params?.uri, + defs + }; + for (const entry of input._idmap.entries()) { + const [key, schema] = entry; + schemas[key] = gen2.emit(schema, { + ..._params, + external + }); + } + if (Object.keys(defs).length > 0) { + const defsSegment = gen2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const gen = new JSONSchemaGenerator(_params); + gen.process(input); + return gen.emit(input, _params); +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const schema = _schema; + const def = schema._zod.def; + switch (def.type) { + case "string": + case "number": + case "bigint": + case "boolean": + case "date": + case "symbol": + case "undefined": + case "null": + case "any": + case "unknown": + case "never": + case "void": + case "literal": + case "enum": + case "nan": + case "file": + case "template_literal": + return false; + case "array": { + return isTransforming(def.element, ctx); + } + case "object": { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + case "union": { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + case "intersection": { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + case "tuple": { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + case "record": { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + case "map": { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + case "set": { + return isTransforming(def.valueType, ctx); + } + case "promise": + case "optional": + case "nonoptional": + case "nullable": + case "readonly": + return isTransforming(def.innerType, ctx); + case "lazy": + return isTransforming(def.getter(), ctx); + case "default": { + return isTransforming(def.innerType, ctx); + } + case "prefault": { + return isTransforming(def.innerType, ctx); + } + case "custom": { + return false; + } + case "transform": { + return true; + } + case "pipe": { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + case "success": { + return false; + } + case "catch": { + return false; + } + case "function": { + return false; + } + default: + def; + } + throw new Error(`Unknown schema type: ${def.type}`); +} + +// node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; + +// node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date2, + datetime: () => datetime2, + duration: () => duration2, + time: () => time2 +}); +var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function date2(params) { + return _isoDate(ZodISODate, params); +} +var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function time2(params) { + return _isoTime(ZodISOTime, params); +} +var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} + +// node_modules/zod/v4/classic/errors.js +var initializer2 = (inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); +}; +var ZodError = $constructor("ZodError", initializer2); +var ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error +}); + +// node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); +var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); +var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode2 = /* @__PURE__ */ _encode(ZodRealError); +var decode2 = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + +// node_modules/zod/v4/classic/schemas.js +var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + })); + }; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta) => { + reg.add(inst, meta); + return inst; + }; + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode2(inst, data, params); + inst.decode = (data, params) => decode2(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check2, params) => inst.check(refine(check2, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn2) => inst.check(_overwrite(fn2)); + inst.optional = () => optional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl = inst.clone(); + globalRegistry.add(cl, args[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + return inst; +}); +var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); +}); +var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date2(params)); + inst.time = (params) => inst.check(time2(params)); + inst.duration = (params) => inst.check(duration2(params)); +}); +function string2(params) { + return _string(ZodString, params); +} +var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); +}); +var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function email2(params) { + return _email(ZodEmail, params); +} +var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function guid2(params) { + return _guid(ZodGUID, params); +} +var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function url(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid3(params) { + return _cuid(ZodCUID, params); +} +var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ulid2(params) { + return _ulid(ZodULID, params); +} +var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function xid2(params) { + return _xid(ZodXID, params); +} +var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base642(params) { + return _base64(ZodBase64, params); +} +var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function e1642(params) { + return _e164(ZodE164, params); +} +var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function jwt(params) { + return _jwt(ZodJWT, params); +} +var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function stringFormat(format, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params); +} +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format = `${alg}_${enc}`; + const regex = regexes_exports[format]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format}`); + return _stringFormat(ZodCustomStringFormat, format, regex, params); +} +var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number2(params) { + return _number(ZodNumber, params); +} +var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); +}); +function int(params) { + return _int(ZodNumberFormat, params); +} +function float32(params) { + return _float32(ZodNumberFormat, params); +} +function float64(params) { + return _float64(ZodNumberFormat, params); +} +function int32(params) { + return _int32(ZodNumberFormat, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); +}); +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; +}); +function bigint2(params) { + return _bigint(ZodBigInt, params); +} +var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); +}); +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); +}); +function symbol(params) { + return _symbol(ZodSymbol, params); +} +var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); +}); +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); +}); +function _null3(params) { + return _null2(ZodNull, params); +} +var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); +}); +function any() { + return _any(ZodAny); +} +var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); +}); +function unknown() { + return _unknown(ZodUnknown); +} +var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); +}); +function never(params) { + return _never(ZodNever, params); +} +var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); +}); +function _void2(params) { + return _void(ZodVoid, params); +} +var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c2 = inst._zod.bag; + inst.minDate = c2.minimum ? new Date(c2.minimum) : null; + inst.maxDate = c2.maximum ? new Date(c2.maximum) : null; +}); +function date3(params) { + return _date(ZodDate, params); +} +var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; +}); +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); +}); +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst.options = def.options; +}); +function union(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); +}); +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); +}); +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); +}); +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js -var isJsonSchema7AllOfType = (type) => { - if ("type" in type && type.type === "string") - return false; - return "allOf" in type; -}; -function parseIntersectionDef(def, refs) { - const allOf = [ - parseDef(def.left._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }), - parseDef(def.right._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "1"] - }) - ].filter((x2) => !!x2); - let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0; - const mergedAllOf = []; - allOf.forEach((schema) => { - if (isJsonSchema7AllOfType(schema)) { - mergedAllOf.push(...schema.allOf); - if (schema.unevaluatedProperties === void 0) { - unevaluatedProperties = void 0; - } - } else { - let nestedSchema = schema; - if ("additionalProperties" in schema && schema.additionalProperties === false) { - const { additionalProperties, ...rest } = schema; - nestedSchema = rest; - } else { - unevaluatedProperties = void 0; - } - mergedAllOf.push(nestedSchema); - } +var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) }); - return mergedAllOf.length ? { - allOf: mergedAllOf, - ...unevaluatedProperties - } : void 0; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js -function parseLiteralDef(def, refs) { - const parsedType = typeof def.value; - if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") { - return { - type: Array.isArray(def.value) ? "array" : "object" - }; - } - if (refs.target === "openApi3") { - return { - type: parsedType === "bigint" ? "integer" : parsedType, - enum: [def.value] - }; - } - return { - type: parsedType === "bigint" ? "integer" : parsedType, - const: def.value - }; -} - -// node_modules/zod-to-json-schema/dist/esm/parsers/record.js -import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind2 } from "zod"; - -// node_modules/zod-to-json-schema/dist/esm/parsers/string.js -var emojiRegex = void 0; -var zodPatterns = { - /** - * `c` was changed to `[cC]` to replicate /i flag - */ - cuid: /^[cC][^\s-]{8,}$/, - cuid2: /^[0-9a-z]+$/, - ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, - /** - * `a-z` was added to replicate /i flag - */ - email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, - /** - * Constructed a valid Unicode RegExp - * - * Lazily instantiate since this type of regex isn't supported - * in all envs (e.g. React Native). - * - * See: - * https://github.com/colinhacks/zod/issues/2433 - * Fix in Zod: - * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b - */ - emoji: () => { - if (emojiRegex === void 0) { - emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); - } - return emojiRegex; - }, - /** - * Unused - */ - uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, - /** - * Unused - */ - ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, - ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, - /** - * Unused - */ - ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, - ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, - base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, - base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, - nanoid: /^[a-zA-Z0-9_-]{21}$/, - jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ -}; -function parseStringDef(def, refs) { - const res = { - type: "string" - }; - if (def.checks) { - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "email": - switch (refs.emailStrategy) { - case "format:email": - addFormat(res, "email", check.message, refs); - break; - case "format:idn-email": - addFormat(res, "idn-email", check.message, refs); - break; - case "pattern:zod": - addPattern(res, zodPatterns.email, check.message, refs); - break; - } - break; - case "url": - addFormat(res, "uri", check.message, refs); - break; - case "uuid": - addFormat(res, "uuid", check.message, refs); - break; - case "regex": - addPattern(res, check.regex, check.message, refs); - break; - case "cuid": - addPattern(res, zodPatterns.cuid, check.message, refs); - break; - case "cuid2": - addPattern(res, zodPatterns.cuid2, check.message, refs); - break; - case "startsWith": - addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs); - break; - case "endsWith": - addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs); - break; - case "datetime": - addFormat(res, "date-time", check.message, refs); - break; - case "date": - addFormat(res, "date", check.message, refs); - break; - case "time": - addFormat(res, "time", check.message, refs); - break; - case "duration": - addFormat(res, "duration", check.message, refs); - break; - case "length": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "includes": { - addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs); - break; - } - case "ip": { - if (check.version !== "v6") { - addFormat(res, "ipv4", check.message, refs); - } - if (check.version !== "v4") { - addFormat(res, "ipv6", check.message, refs); - } - break; - } - case "base64url": - addPattern(res, zodPatterns.base64url, check.message, refs); - break; - case "jwt": - addPattern(res, zodPatterns.jwt, check.message, refs); - break; - case "cidr": { - if (check.version !== "v6") { - addPattern(res, zodPatterns.ipv4Cidr, check.message, refs); - } - if (check.version !== "v4") { - addPattern(res, zodPatterns.ipv6Cidr, check.message, refs); - } - break; - } - case "emoji": - addPattern(res, zodPatterns.emoji(), check.message, refs); - break; - case "ulid": { - addPattern(res, zodPatterns.ulid, check.message, refs); - break; - } - case "base64": { - switch (refs.base64Strategy) { - case "format:binary": { - addFormat(res, "binary", check.message, refs); - break; - } - case "contentEncoding:base64": { - setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs); - break; - } - case "pattern:zod": { - addPattern(res, zodPatterns.base64, check.message, refs); - break; - } - } - break; - } - case "nanoid": { - addPattern(res, zodPatterns.nanoid, check.message, refs); - } - case "toLowerCase": - case "toUpperCase": - case "trim": - break; - default: - /* @__PURE__ */ ((_3) => { - })(check); - } - } - } - return res; +function partialRecord(keyType, valueType, params) { + const k3 = clone(keyType); + k3._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k3, + valueType, + ...util_exports.normalizeParams(params) + }); } -function escapeLiteralCheckValue(literal, refs) { - return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal; +var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); } -var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); -function escapeNonAlphaNumeric(source) { - let result = ""; - for (let i2 = 0; i2 < source.length; i2++) { - if (!ALPHA_NUMERIC.has(source[i2])) { - result += "\\"; - } - result += source[i2]; - } - return result; +var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); +}); +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); } -function addFormat(schema, value, message, refs) { - if (schema.format || schema.anyOf?.some((x2) => x2.format)) { - if (!schema.anyOf) { - schema.anyOf = []; - } - if (schema.format) { - schema.anyOf.push({ - format: schema.format, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { format: schema.errorMessage.format } - } - }); - delete schema.format; - if (schema.errorMessage) { - delete schema.errorMessage.format; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } +var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); } - schema.anyOf.push({ - format: value, - ...message && refs.errorMessages && { errorMessage: { format: message } } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries }); - } else { - setResponseValueAndErrors(schema, "format", value, message, refs); - } -} -function addPattern(schema, regex, message, refs) { - if (schema.pattern || schema.allOf?.some((x2) => x2.pattern)) { - if (!schema.allOf) { - schema.allOf = []; - } - if (schema.pattern) { - schema.allOf.push({ - pattern: schema.pattern, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { pattern: schema.errorMessage.pattern } - } - }); - delete schema.pattern; - if (schema.errorMessage) { - delete schema.errorMessage.pattern; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); } - schema.allOf.push({ - pattern: stringifyRegExpWithFlags(regex, refs), - ...message && refs.errorMessages && { errorMessage: { pattern: message } } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries }); - } else { - setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs); - } -} -function stringifyRegExpWithFlags(regex, refs) { - if (!refs.applyRegexFlags || !regex.flags) { - return regex.source; - } - const flags = { - i: regex.flags.includes("i"), - m: regex.flags.includes("m"), - s: regex.flags.includes("s") - // `.` matches newlines - }; - const source = flags.i ? regex.source.toLowerCase() : regex.source; - let pattern = ""; - let isEscaped = false; - let inCharGroup = false; - let inCharRange = false; - for (let i2 = 0; i2 < source.length; i2++) { - if (isEscaped) { - pattern += source[i2]; - isEscaped = false; - continue; - } - if (flags.i) { - if (inCharGroup) { - if (source[i2].match(/[a-z]/)) { - if (inCharRange) { - pattern += source[i2]; - pattern += `${source[i2 - 2]}-${source[i2]}`.toUpperCase(); - inCharRange = false; - } else if (source[i2 + 1] === "-" && source[i2 + 2]?.match(/[a-z]/)) { - pattern += source[i2]; - inCharRange = true; - } else { - pattern += `${source[i2]}${source[i2].toUpperCase()}`; - } - continue; - } - } else if (source[i2].match(/[a-z]/)) { - pattern += `[${source[i2]}${source[i2].toUpperCase()}]`; - continue; - } - } - if (flags.m) { - if (source[i2] === "^") { - pattern += `(^|(?<=[\r -]))`; - continue; - } else if (source[i2] === "$") { - pattern += `($|(?=[\r -]))`; - continue; + }; +}); +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); } + return def.values[0]; } - if (flags.s && source[i2] === ".") { - pattern += inCharGroup ? `${source[i2]}\r -` : `[${source[i2]}\r -]`; - continue; - } - pattern += source[i2]; - if (source[i2] === "\\") { - isEscaped = true; - } else if (inCharGroup && source[i2] === "]") { - inCharGroup = false; - } else if (!inCharGroup && source[i2] === "[") { - inCharGroup = true; - } - } - try { - new RegExp(pattern); - } catch { - console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); - return regex.source; - } - return pattern; + }); +}); +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/record.js -function parseRecordDef(def, refs) { - if (refs.target === "openAi") { - console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); - } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { - return { - type: "object", - required: def.keyType._def.values, - properties: def.keyType._def.values.reduce((acc, key) => ({ - ...acc, - [key]: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", key] - }) ?? parseAnyDef(refs) - }), {}), - additionalProperties: refs.rejectedAdditionalProperties - }; - } - const schema = { - type: "object", - additionalProperties: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }) ?? refs.allowedAdditionalProperties - }; - if (refs.target === "openApi3") { - return schema; - } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.checks?.length) { - const { type, ...keyType } = parseStringDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { - return { - ...schema, - propertyNames: { - enum: def.keyType._def.values +var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); +}); +function file(params) { + return _file(ZodFile, params); +} +var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); } }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.type._def.checks?.length) { - const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } - return schema; -} - -// node_modules/zod-to-json-schema/dist/esm/parsers/map.js -function parseMapDef(def, refs) { - if (refs.mapStrategy === "record") { - return parseRecordDef(def, refs); - } - const keys = parseDef(def.keyType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "0"] - }) || parseAnyDef(refs); - const values = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "1"] - }) || parseAnyDef(refs); - return { - type: "array", - maxItems: 125, - items: { - type: "array", - items: [keys, values], - minItems: 2, - maxItems: 2 + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); } + payload.value = output; + return payload; }; +}); +function transform(fn2) { + return new ZodTransform({ + type: "transform", + transform: fn2 + }); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js -function parseNativeEnumDef(def) { - const object = def.values; - const actualKeys = Object.keys(def.values).filter((key) => { - return typeof object[object[key]] !== "number"; +var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType }); - const actualValues = actualKeys.map((key) => object[key]); - const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); - return { - type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"], - enum: actualValues - }; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/never.js -function parseNeverDef(refs) { - return refs.target === "openAi" ? void 0 : { - not: parseAnyDef({ - ...refs, - currentPath: [...refs.currentPath, "not"] - }) - }; +var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/null.js -function parseNullDef(refs) { - return refs.target === "openApi3" ? { - enum: ["null"], - nullable: true - } : { - type: "null" - }; +function nullish2(innerType) { + return optional(nullable(innerType)); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/union.js -var primitiveMappings = { - ZodString: "string", - ZodNumber: "number", - ZodBigInt: "integer", - ZodBoolean: "boolean", - ZodNull: "null" -}; -function parseUnionDef(def, refs) { - if (refs.target === "openApi3") - return asAnyOf(def, refs); - const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; - if (options.every((x2) => x2._def.typeName in primitiveMappings && (!x2._def.checks || !x2._def.checks.length))) { - const types = options.reduce((types2, x2) => { - const type = primitiveMappings[x2._def.typeName]; - return type && !types2.includes(type) ? [...types2, type] : types2; - }, []); - return { - type: types.length > 1 ? types : types[0] - }; - } else if (options.every((x2) => x2._def.typeName === "ZodLiteral" && !x2.description)) { - const types = options.reduce((acc, x2) => { - const type = typeof x2._def.value; - switch (type) { - case "string": - case "number": - case "boolean": - return [...acc, type]; - case "bigint": - return [...acc, "integer"]; - case "object": - if (x2._def.value === null) - return [...acc, "null"]; - case "symbol": - case "undefined": - case "function": - default: - return acc; - } - }, []); - if (types.length === options.length) { - const uniqueTypes = types.filter((x2, i2, a4) => a4.indexOf(x2) === i2); - return { - type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], - enum: options.reduce((acc, x2) => { - return acc.includes(x2._def.value) ? acc : [...acc, x2._def.value]; - }, []) - }; +var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } - } else if (options.every((x2) => x2._def.typeName === "ZodEnum")) { - return { - type: "string", - enum: options.reduce((acc, x2) => [ - ...acc, - ...x2._def.values.filter((x3) => !acc.includes(x3)) - ], []) - }; - } - return asAnyOf(def, refs); + }); } -var asAnyOf = (def, refs) => { - const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x2, i2) => parseDef(x2._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", `${i2}`] - })).filter((x2) => !!x2 && (!refs.strictUnions || typeof x2 === "object" && Object.keys(x2).length > 0)); - return anyOf.length ? { anyOf } : void 0; -}; - -// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js -function parseNullableDef(def, refs) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { - if (refs.target === "openApi3") { - return { - type: primitiveMappings[def.innerType._def.typeName], - nullable: true - }; +var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } - return { - type: [ - primitiveMappings[def.innerType._def.typeName], - "null" - ] - }; - } - if (refs.target === "openApi3") { - const base2 = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath] - }); - if (base2 && "$ref" in base2) - return { allOf: [base2], nullable: true }; - return base2 && { ...base2, nullable: true }; - } - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "0"] }); - return base && { anyOf: [base, { type: "null" }] }; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/number.js -function parseNumberDef(def, refs) { - const res = { - type: "number" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "int": - res.type = "integer"; - addErrorMessage(res, "type", check.message, refs); - break; - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; +var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/object.js -function parseObjectDef(def, refs) { - const forceOptionalIntoNullable = refs.target === "openAi"; - const result = { - type: "object", - properties: {} - }; - const required = []; - const shape = def.shape(); - for (const propName in shape) { - let propDef = shape[propName]; - if (propDef === void 0 || propDef._def === void 0) { - continue; - } - let propOptional = safeIsOptional(propDef); - if (propOptional && forceOptionalIntoNullable) { - if (propDef._def.typeName === "ZodOptional") { - propDef = propDef._def.innerType; - } - if (!propDef.isNullable()) { - propDef = propDef.nullable(); - } - propOptional = false; - } - const parsedDef = parseDef(propDef._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", propName], - propertyPath: [...refs.currentPath, "properties", propName] - }); - if (parsedDef === void 0) { - continue; - } - result.properties[propName] = parsedDef; - if (!propOptional) { - required.push(propName); - } - } - if (required.length) { - result.required = required; - } - const additionalProperties = decideAdditionalProperties(def, refs); - if (additionalProperties !== void 0) { - result.additionalProperties = additionalProperties; - } - return result; +var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); } -function decideAdditionalProperties(def, refs) { - if (def.catchall._def.typeName !== "ZodNever") { - return parseDef(def.catchall._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }); - } - switch (def.unknownKeys) { - case "passthrough": - return refs.allowedAdditionalProperties; - case "strict": - return refs.rejectedAdditionalProperties; - case "strip": - return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties; - } +var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); } -function safeIsOptional(schema) { - try { - return schema.isOptional(); - } catch { - return true; - } +var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); +}); +function nan(params) { + return _nan(ZodNaN, params); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js -var parseOptionalDef = (def, refs) => { - if (refs.currentPath.toString() === refs.propertyPath?.toString()) { - return parseDef(def.innerType._def, refs); - } - const innerSchema = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "1"] +var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst.in = def.in; + inst.out = def.out; +}); +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), }); - return innerSchema ? { - anyOf: [ - { - not: parseAnyDef(refs) - }, - innerSchema - ] - } : parseAnyDef(refs); -}; - -// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js -var parsePipelineDef = (def, refs) => { - if (refs.pipeStrategy === "input") { - return parseDef(def.in._def, refs); - } else if (refs.pipeStrategy === "output") { - return parseDef(def.out._def, refs); - } - const a4 = parseDef(def.in._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] +} +var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); +}); +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode }); - const b = parseDef(def.out._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", a4 ? "1" : "0"] +} +var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType }); - return { - allOf: [a4, b].filter((x2) => x2 !== void 0) - }; -}; - -// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js -function parsePromiseDef(def, refs) { - return parseDef(def.type._def, refs); } - -// node_modules/zod-to-json-schema/dist/esm/parsers/set.js -function parseSetDef(def, refs) { - const items = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] +var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); +}); +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) }); - const schema = { - type: "array", - uniqueItems: true, - items - }; - if (def.minSize) { - setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs); - } - if (def.maxSize) { - setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs); - } - return schema; } - -// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js -function parseTupleDef(def, refs) { - if (def.rest) { - return { - type: "array", - minItems: def.items.length, - items: def.items.map((x2, i2) => parseDef(x2._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i2}`] - })).reduce((acc, x2) => x2 === void 0 ? acc : [...acc, x2], []), - additionalItems: parseDef(def.rest._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalItems"] - }) - }; - } else { - return { - type: "array", - minItems: def.items.length, - maxItems: def.items.length, - items: def.items.map((x2, i2) => parseDef(x2._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i2}`] - })).reduce((acc, x2) => x2 === void 0 ? acc : [...acc, x2], []) - }; - } +var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); +}); +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); +}); +function check(fn2) { + const ch = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn2; + return ch; +} +function custom(fn2, _params) { + return _custom(ZodCustom, fn2 ?? (() => true), _params); +} +function refine(fn2, _params = {}) { + return _refine(ZodCustom, fn2, _params); +} +function superRefine(fn2) { + return _superRefine(fn2); +} +function _instanceof(cls, params = { + error: `Input not instance of ${cls.name}` +}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + return inst; +} +var stringbool = (...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString +}, ...args); +function json(params) { + const jsonSchema = lazy(() => { + return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn2, schema) { + return pipe(transform(fn2), schema); } -// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js -function parseUndefinedDef(refs) { - return { - not: parseAnyDef(refs) - }; -} - -// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js -function parseUnknownDef(refs) { - return parseAnyDef(refs); -} - -// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js -var parseReadonlyDef = (def, refs) => { - return parseDef(def.innerType._def, refs); -}; - -// node_modules/zod-to-json-schema/dist/esm/selectParser.js -var selectParser = (def, typeName, refs) => { - switch (typeName) { - case ZodFirstPartyTypeKind3.ZodString: - return parseStringDef(def, refs); - case ZodFirstPartyTypeKind3.ZodNumber: - return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind3.ZodObject: - return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind3.ZodBigInt: - return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind3.ZodBoolean: - return parseBooleanDef(); - case ZodFirstPartyTypeKind3.ZodDate: - return parseDateDef(def, refs); - case ZodFirstPartyTypeKind3.ZodUndefined: - return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind3.ZodNull: - return parseNullDef(refs); - case ZodFirstPartyTypeKind3.ZodArray: - return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind3.ZodUnion: - case ZodFirstPartyTypeKind3.ZodDiscriminatedUnion: - return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind3.ZodIntersection: - return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind3.ZodTuple: - return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind3.ZodRecord: - return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind3.ZodLiteral: - return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind3.ZodEnum: - return parseEnumDef(def); - case ZodFirstPartyTypeKind3.ZodNativeEnum: - return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind3.ZodNullable: - return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind3.ZodOptional: - return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind3.ZodMap: - return parseMapDef(def, refs); - case ZodFirstPartyTypeKind3.ZodSet: - return parseSetDef(def, refs); - case ZodFirstPartyTypeKind3.ZodLazy: - return () => def.getter()._def; - case ZodFirstPartyTypeKind3.ZodPromise: - return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind3.ZodNaN: - case ZodFirstPartyTypeKind3.ZodNever: - return parseNeverDef(refs); - case ZodFirstPartyTypeKind3.ZodEffects: - return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind3.ZodAny: - return parseAnyDef(refs); - case ZodFirstPartyTypeKind3.ZodUnknown: - return parseUnknownDef(refs); - case ZodFirstPartyTypeKind3.ZodDefault: - return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind3.ZodBranded: - return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind3.ZodReadonly: - return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind3.ZodCatch: - return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind3.ZodPipeline: - return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind3.ZodFunction: - case ZodFirstPartyTypeKind3.ZodVoid: - case ZodFirstPartyTypeKind3.ZodSymbol: - return void 0; - default: - return /* @__PURE__ */ ((_3) => void 0)(typeName); - } +// node_modules/zod/v4/classic/compat.js +var ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" }; +function setErrorMap(map2) { + config({ + customError: map2 + }); +} +function getErrorMap() { + return config().customError; +} +var ZodFirstPartyTypeKind; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) { +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); -// node_modules/zod-to-json-schema/dist/esm/parseDef.js -function parseDef(def, refs, forceResolution = false) { - const seenItem = refs.seen.get(def); - if (refs.override) { - const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); - if (overrideResult !== ignoreOverride) { - return overrideResult; - } - } - if (seenItem && !forceResolution) { - const seenSchema = get$ref(seenItem, refs); - if (seenSchema !== void 0) { - return seenSchema; - } - } - const newItem = { def, path: refs.currentPath, jsonSchema: void 0 }; - refs.seen.set(def, newItem); - const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); - const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter; - if (jsonSchema) { - addMeta(def, refs, jsonSchema); - } - if (refs.postProcess) { - const postProcessResult = refs.postProcess(jsonSchema, def, refs); - newItem.jsonSchema = jsonSchema; - return postProcessResult; - } - newItem.jsonSchema = jsonSchema; - return jsonSchema; +// node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint3, + boolean: () => boolean3, + date: () => date4, + number: () => number3, + string: () => string3 +}); +function string3(params) { + return _coercedString(ZodString, params); +} +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint3(params) { + return _coercedBigint(ZodBigInt, params); +} +function date4(params) { + return _coercedDate(ZodDate, params); } -var get$ref = (item, refs) => { - switch (refs.$refStrategy) { - case "root": - return { $ref: item.path.join("/") }; - case "relative": - return { $ref: getRelativePath(refs.currentPath, item.path) }; - case "none": - case "seen": { - if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) { - console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); - return parseAnyDef(refs); - } - return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0; - } - } -}; -var addMeta = (def, refs, jsonSchema) => { - if (def.description) { - jsonSchema.description = def.description; - if (refs.markdownDescription) { - jsonSchema.markdownDescription = def.description; - } - } - return jsonSchema; -}; -// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js -var zodToJsonSchema = (schema, options) => { - const refs = getRefs(options); - let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({ - ...acc, - [name2]: parseDef(schema2._def, { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name2] - }, true) ?? parseAnyDef(refs) - }), {}) : void 0; - const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name; - const main = parseDef(schema._def, name === void 0 ? refs : { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name] - }, false) ?? parseAnyDef(refs); - const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0; - if (title !== void 0) { - main.title = title; - } - if (refs.flags.hasReferencedOpenAiAnyType) { - if (!definitions) { - definitions = {}; - } - if (!definitions[refs.openAiAnyTypeName]) { - definitions[refs.openAiAnyTypeName] = { - // Skipping "object" as no properties can be defined and additionalProperties must be "false" - type: ["string", "number", "integer", "boolean", "array", "null"], - items: { - $ref: refs.$refStrategy === "relative" ? "1" : [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ].join("/") - } - }; - } - } - const combined = name === void 0 ? definitions ? { - ...main, - [refs.definitionPath]: definitions - } : main : { - $ref: [ - ...refs.$refStrategy === "relative" ? [] : refs.basePath, - refs.definitionPath, - name - ].join("/"), - [refs.definitionPath]: { - ...definitions, - [name]: main - } - }; - if (refs.target === "jsonSchema7") { - combined.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { - combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; - } - if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) { - console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); - } - return combined; -}; +// node_modules/zod/v4/classic/external.js +config(en_default()); // node_modules/@walkeros/core/dist/index.mjs -import { z as ae } from "zod"; -import { z as Ie } from "zod"; -import { z as et } from "zod"; -import { z as zt } from "zod"; -import { z as Ht } from "zod"; -import { z as un } from "zod"; var e = Object.defineProperty; -var t = (t4, n4) => { - for (var i2 in n4) - e(t4, i2, { get: n4[i2], enumerable: true }); -}; -var h = f.string(); -var y = f.number(); -var S = f.boolean(); -var v = f.string().min(1); -var j = f.number().int().positive(); -var w = f.number().int().nonnegative(); -var x = f.number().describe("Tagging version number"); -var E = f.union([f.string(), f.number(), f.boolean()]); -var C = E.optional(); -var P = {}; -t(P, { ErrorHandlerSchema: () => O, HandlerSchema: () => L, LogHandlerSchema: () => J, StorageSchema: () => I, StorageTypeSchema: () => $, errorHandlerJsonSchema: () => R, handlerJsonSchema: () => q, logHandlerJsonSchema: () => A, storageJsonSchema: () => M, storageTypeJsonSchema: () => T }); -var $ = z.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); -var I = z.object({ Local: z.literal("local"), Session: z.literal("session"), Cookie: z.literal("cookie") }).describe("Storage type constants for type-safe references"); -var O = z.any().describe("Error handler function: (error, state?) => void"); -var J = z.any().describe("Log handler function: (message, verbose?) => void"); -var L = z.object({ Error: O.describe("Error handler function"), Log: J.describe("Log handler function") }).describe("Handler interface with error and log functions"); -var T = zodToJsonSchema($, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); -var M = zodToJsonSchema(I, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); -var R = zodToJsonSchema(O, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); -var A = zodToJsonSchema(J, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); -var q = zodToJsonSchema(L, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); -var U = k.object({ onError: O.optional().describe("Error handler function: (error, state?) => void"), onLog: J.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); -var N = k.object({ verbose: k.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); -var B = k.object({ queue: k.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); -var W = k.object({}).partial(); -var V = k.object({ init: k.boolean().describe("Whether to initialize immediately").optional(), loadScript: k.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); -var H = k.object({ disabled: k.boolean().describe("Set to true to disable").optional() }).partial(); -var _ = k.object({ primary: k.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); -var K = k.object({ settings: k.any().optional().describe("Implementation-specific configuration") }).partial(); -var F = k.object({ env: k.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); -var Z = k.object({ type: k.string().optional().describe("Instance type identifier"), config: k.any().describe("Instance configuration") }).partial(); -var ee = k.object({ collector: k.any().describe("Collector instance (runtime object)"), config: k.any().describe("Configuration"), env: k.any().describe("Environment dependencies") }).partial(); -var te = k.object({ batch: k.number().optional().describe("Batch size: bundle N events for batch processing"), batched: k.any().optional().describe("Batch of events to be processed") }).partial(); -var ne = k.object({ ignore: k.boolean().describe("Set to true to skip processing").optional(), condition: k.string().optional().describe("Condition function: return true to process") }).partial(); -var ie = k.object({ sources: k.record(k.string(), k.any()).describe("Map of source instances") }).partial(); -var oe = k.object({ destinations: k.record(k.string(), k.any()).describe("Map of destination instances") }).partial(); -var re = {}; -t(re, { ConsentSchema: () => me, DeepPartialEventSchema: () => je, EntitiesSchema: () => ye, EntitySchema: () => he, EventSchema: () => Se, OrderedPropertiesSchema: () => pe, PartialEventSchema: () => ve, PropertiesSchema: () => de, PropertySchema: () => le, PropertyTypeSchema: () => ce, SourceSchema: () => fe, SourceTypeSchema: () => ue, UserSchema: () => ge, VersionSchema: () => be, consentJsonSchema: () => De, entityJsonSchema: () => Pe, eventJsonSchema: () => we, orderedPropertiesJsonSchema: () => ke, partialEventJsonSchema: () => xe, propertiesJsonSchema: () => Ce, sourceTypeJsonSchema: () => ze, userJsonSchema: () => Ee }); -var ce = ae.lazy(() => ae.union([ae.boolean(), ae.string(), ae.number(), ae.record(ae.string(), le)])); -var le = ae.lazy(() => ae.union([ce, ae.array(ce)])); -var de = ae.record(ae.string(), le.optional()).describe("Flexible property collection with optional values"); -var pe = ae.record(ae.string(), ae.tuple([le, ae.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); -var ue = ae.union([ae.enum(["web", "server", "app", "other"]), ae.string()]).describe("Source type: web, server, app, other, or custom"); -var me = ae.record(ae.string(), ae.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); -var ge = de.and(ae.object({ id: ae.string().optional().describe("User identifier"), device: ae.string().optional().describe("Device identifier"), session: ae.string().optional().describe("Session identifier"), hash: ae.string().optional().describe("Hashed identifier"), address: ae.string().optional().describe("User address"), email: ae.string().email().optional().describe("User email address"), phone: ae.string().optional().describe("User phone number"), userAgent: ae.string().optional().describe("Browser user agent string"), browser: ae.string().optional().describe("Browser name"), browserVersion: ae.string().optional().describe("Browser version"), deviceType: ae.string().optional().describe("Device type (mobile, desktop, tablet)"), os: ae.string().optional().describe("Operating system"), osVersion: ae.string().optional().describe("Operating system version"), screenSize: ae.string().optional().describe("Screen dimensions"), language: ae.string().optional().describe("User language"), country: ae.string().optional().describe("User country"), region: ae.string().optional().describe("User region/state"), city: ae.string().optional().describe("User city"), zip: ae.string().optional().describe("User postal code"), timezone: ae.string().optional().describe("User timezone"), ip: ae.string().optional().describe("User IP address"), internal: ae.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); -var be = de.and(ae.object({ source: h.describe('Walker implementation version (e.g., "2.0.0")'), tagging: x })).describe("Walker version information"); -var fe = de.and(ae.object({ type: ue.describe("Source type identifier"), id: h.describe("Source identifier (typically URL on web)"), previous_id: h.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); -var he = ae.lazy(() => ae.object({ entity: ae.string().describe("Entity name"), data: de.describe("Entity-specific properties"), nested: ae.array(he).describe("Nested child entities"), context: pe.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); -var ye = ae.array(he).describe("Array of nested entities"); -var Se = ae.object({ name: ae.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: de.describe("Event-specific properties"), context: pe.describe("Ordered context properties with priorities"), globals: de.describe("Global properties shared across events"), custom: de.describe("Custom implementation-specific properties"), user: ge.describe("User identification and attributes"), nested: ye.describe("Related nested entities"), consent: me.describe("Consent states at event time"), id: v.describe("Unique event identifier (timestamp-based)"), trigger: h.describe("Event trigger identifier"), entity: h.describe("Parsed entity from event name"), action: h.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: y.describe("Event processing timing information"), group: h.describe("Event grouping identifier"), count: w.describe("Event count in session"), version: be.describe("Walker version information"), source: fe.describe("Event source information") }).describe("Complete walkerOS event structure"); -var ve = Se.partial().describe("Partial event structure with all fields optional"); -var je = ae.lazy(() => Se.deepPartial()).describe("Deep partial event structure with all nested fields optional"); -var we = zodToJsonSchema(Se, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); -var xe = zodToJsonSchema(ve, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); -var Ee = zodToJsonSchema(ge, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); -var Ce = zodToJsonSchema(de, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); -var ke = zodToJsonSchema(pe, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); -var Pe = zodToJsonSchema(he, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); -var ze = zodToJsonSchema(ue, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); -var De = zodToJsonSchema(me, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); -var $e = {}; -t($e, { ConfigSchema: () => Be, LoopSchema: () => Te, MapSchema: () => Re, PolicySchema: () => qe, ResultSchema: () => We, RuleSchema: () => Ue, RulesSchema: () => Ne, SetSchema: () => Me, ValueConfigSchema: () => Ae, ValueSchema: () => Je, ValuesSchema: () => Le, configJsonSchema: () => Ye, loopJsonSchema: () => _e, mapJsonSchema: () => Fe, policyJsonSchema: () => Ge, ruleJsonSchema: () => Qe, rulesJsonSchema: () => Xe, setJsonSchema: () => Ke, valueConfigJsonSchema: () => He, valueJsonSchema: () => Ve }); -var Je = Ie.lazy(() => Ie.union([Ie.string().describe('String value or property path (e.g., "data.id")'), Ie.number().describe("Numeric value"), Ie.boolean().describe("Boolean value"), Ae, Ie.array(Je).describe("Array of values")])); -var Le = Ie.array(Je).describe("Array of transformation values"); -var Te = Ie.tuple([Je, Je]).describe("Loop transformation: [source, transform] tuple for array processing"); -var Me = Ie.array(Je).describe("Set: Array of values for selection or combination"); -var Re = Ie.record(Ie.string(), Je).describe("Map: Object mapping keys to transformation values"); -var Ae = Ie.object({ key: Ie.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: Ie.union([Ie.string(), Ie.number(), Ie.boolean()]).optional().describe("Static primitive value"), fn: Ie.string().optional().describe("Custom transformation function as string (serialized)"), map: Re.optional().describe("Object mapping: transform event data to structured output"), loop: Te.optional().describe("Loop transformation: [source, transform] for array processing"), set: Me.optional().describe("Set of values: combine or select from multiple values"), consent: me.optional().describe("Required consent states to include this value"), condition: Ie.string().optional().describe("Condition function as string: return true to include value"), validate: Ie.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); -var qe = Ie.record(Ie.string(), Je).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); -var Ue = Ie.object({ batch: Ie.number().optional().describe("Batch size: bundle N events for batch processing"), condition: Ie.string().optional().describe("Condition function as string: return true to process event"), consent: me.optional().describe("Required consent states to process this event"), settings: Ie.any().optional().describe("Destination-specific settings for this event mapping"), data: Ie.union([Je, Le]).optional().describe("Data transformation rules for event"), ignore: Ie.boolean().optional().describe("Set to true to skip processing this event"), name: Ie.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: qe.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); -var Ne = Ie.record(Ie.string(), Ie.record(Ie.string(), Ie.union([Ue, Ie.array(Ue)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); -var Be = Ie.object({ consent: me.optional().describe("Required consent states to process any events"), data: Ie.union([Je, Le]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: qe.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); -var We = Ie.object({ eventMapping: Ue.optional().describe("Resolved mapping rule for event"), mappingKey: Ie.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); -var Ve = zodToJsonSchema(Je, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); -var He = zodToJsonSchema(Ae, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); -var _e = zodToJsonSchema(Te, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); -var Ke = zodToJsonSchema(Me, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); -var Fe = zodToJsonSchema(Re, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); -var Ge = zodToJsonSchema(qe, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); -var Qe = zodToJsonSchema(Ue, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); -var Xe = zodToJsonSchema(Ne, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); -var Ye = zodToJsonSchema(Be, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); -var Ze = {}; -t(Ze, { BatchSchema: () => dt, ConfigSchema: () => nt, ContextSchema: () => rt, DLQSchema: () => St, DataSchema: () => pt, DestinationPolicySchema: () => ot, DestinationsSchema: () => bt, InitDestinationsSchema: () => gt, InitSchema: () => mt, InstanceSchema: () => ut, PartialConfigSchema: () => it, PushBatchContextSchema: () => st, PushContextSchema: () => at, PushEventSchema: () => ct, PushEventsSchema: () => lt, PushResultSchema: () => ht, RefSchema: () => ft, ResultSchema: () => yt, batchJsonSchema: () => Et, configJsonSchema: () => vt, contextJsonSchema: () => wt, instanceJsonSchema: () => Ct, partialConfigJsonSchema: () => jt, pushContextJsonSchema: () => xt, resultJsonSchema: () => kt }); -var nt = et.object({ consent: me.optional().describe("Required consent states to send events to this destination"), settings: et.any().describe("Implementation-specific configuration").optional(), data: et.union([Je, Le]).optional().describe("Global data transformation applied to all events for this destination"), env: et.any().describe("Environment dependencies (platform-specific)").optional(), id: v.describe("Destination instance identifier (defaults to destination key)").optional(), init: et.boolean().describe("Whether to initialize immediately").optional(), loadScript: et.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: qe.optional().describe("Pre-processing policy rules applied before event mapping"), queue: et.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: et.boolean().describe("Enable verbose logging for debugging").optional(), onError: O.optional(), onLog: J.optional() }).describe("Destination configuration"); -var it = nt.deepPartial().describe("Partial destination configuration with all fields deeply optional"); -var ot = qe.describe("Destination policy rules for event pre-processing"); -var rt = et.object({ collector: et.any().describe("Collector instance (runtime object)"), config: nt.describe("Destination configuration"), data: et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))]).optional().describe("Transformed event data"), env: et.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); -var at = rt.extend({ mapping: Ue.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); -var st = at.describe("Batch push context with event-specific mapping"); -var ct = et.object({ event: Se.describe("The event to process"), mapping: Ue.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); -var lt = et.array(ct).describe("Array of events with mappings"); -var dt = et.object({ key: et.string().describe('Batch key (usually mapping key like "product.view")'), events: et.array(Se).describe("Array of events in batch"), data: et.array(et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))])).describe("Transformed data for each event"), mapping: Ue.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); -var pt = et.union([et.any(), et.undefined(), et.array(et.union([et.any(), et.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); -var ut = et.object({ config: nt.describe("Destination configuration"), queue: et.array(Se).optional().describe("Queued events awaiting consent"), dlq: et.array(et.tuple([Se, et.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: et.string().optional().describe("Destination type identifier"), env: et.any().optional().describe("Environment dependencies"), init: et.any().optional().describe("Initialization function"), push: et.any().describe("Push function for single events"), pushBatch: et.any().optional().describe("Batch push function"), on: et.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); -var mt = et.object({ code: ut.describe("Destination instance with implementation"), config: it.optional().describe("Partial configuration overrides"), env: et.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); -var gt = et.record(et.string(), mt).describe("Map of destination IDs to initialization configurations"); -var bt = et.record(et.string(), ut).describe("Map of destination IDs to runtime instances"); -var ft = et.object({ id: et.string().describe("Destination ID"), destination: ut.describe("Destination instance") }).describe("Destination reference (ID + instance)"); -var ht = et.object({ queue: et.array(Se).optional().describe("Events queued (awaiting consent)"), error: et.any().optional().describe("Error if push failed") }).describe("Push operation result"); -var yt = et.object({ successful: et.array(ft).describe("Destinations that processed successfully"), queued: et.array(ft).describe("Destinations that queued events"), failed: et.array(ft).describe("Destinations that failed to process") }).describe("Overall destination processing result"); -var St = et.array(et.tuple([Se, et.any()])).describe("Dead letter queue: [(event, error), ...]"); -var vt = zodToJsonSchema(nt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); -var jt = zodToJsonSchema(it, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); -var wt = zodToJsonSchema(rt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); -var xt = zodToJsonSchema(at, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); -var Et = zodToJsonSchema(dt, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); -var Ct = zodToJsonSchema(ut, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); -var kt = zodToJsonSchema(yt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); -var Pt = {}; -t(Pt, { CommandTypeSchema: () => $t, ConfigSchema: () => It, DestinationsSchema: () => Mt, InitConfigSchema: () => Jt, InstanceSchema: () => Rt, PushContextSchema: () => Lt, SessionDataSchema: () => Ot, SourcesSchema: () => Tt, commandTypeJsonSchema: () => At, configJsonSchema: () => qt, initConfigJsonSchema: () => Nt, instanceJsonSchema: () => Wt, pushContextJsonSchema: () => Bt, sessionDataJsonSchema: () => Ut }); -var $t = zt.union([zt.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), zt.string()]).describe("Collector command type: standard commands or custom string for extensions"); -var It = zt.object({ run: zt.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: x, globalsStatic: de.describe("Static global properties that persist across collector runs"), sessionStatic: zt.record(zt.any()).describe("Static session data that persists across collector runs"), verbose: zt.boolean().describe("Enable verbose logging for debugging"), onError: O.optional(), onLog: J.optional() }).describe("Core collector configuration"); -var Ot = de.and(zt.object({ isStart: zt.boolean().describe("Whether this is a new session start"), storage: zt.boolean().describe("Whether storage is available"), id: v.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: zt.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: zt.boolean().describe("Whether this is a new session").optional(), device: v.describe("Device identifier").optional(), count: w.describe("Event count in session").optional(), runs: w.describe("Number of runs").optional() })).describe("Session state and tracking data"); -var Jt = It.partial().extend({ consent: me.optional().describe("Initial consent state"), user: ge.optional().describe("Initial user data"), globals: de.optional().describe("Initial global properties"), sources: zt.any().optional().describe("Source configurations"), destinations: zt.any().optional().describe("Destination configurations"), custom: de.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); -var Lt = zt.object({ mapping: Be.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); -var Tt = zt.record(zt.string(), zt.any()).describe("Map of source IDs to source instances"); -var Mt = zt.record(zt.string(), zt.any()).describe("Map of destination IDs to destination instances"); -var Rt = zt.object({ push: zt.any().describe("Push function for processing events"), command: zt.any().describe("Command function for walker commands"), allowed: zt.boolean().describe("Whether event processing is allowed"), config: It.describe("Current collector configuration"), consent: me.describe("Current consent state"), count: zt.number().describe("Event count (increments with each event)"), custom: de.describe("Custom implementation-specific properties"), sources: Tt.describe("Registered source instances"), destinations: Mt.describe("Registered destination instances"), globals: de.describe("Current global properties"), group: zt.string().describe("Event grouping identifier"), hooks: zt.any().describe("Lifecycle hook functions"), on: zt.any().describe("Event lifecycle configuration"), queue: zt.array(Se).describe("Queued events awaiting processing"), round: zt.number().describe("Collector run count (increments with each run)"), session: zt.union([zt.undefined(), Ot]).describe("Current session state"), timing: zt.number().describe("Event processing timing information"), user: ge.describe("Current user data"), version: zt.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); -var At = zodToJsonSchema($t, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); -var qt = zodToJsonSchema(It, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); -var Ut = zodToJsonSchema(Ot, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); -var Nt = zodToJsonSchema(Jt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); -var Bt = zodToJsonSchema(Lt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); -var Wt = zodToJsonSchema(Rt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); -var Vt = {}; -t(Vt, { BaseEnvSchema: () => Kt, ConfigSchema: () => Ft, InitSchema: () => Xt, InitSourceSchema: () => Yt, InitSourcesSchema: () => Zt, InstanceSchema: () => Qt, PartialConfigSchema: () => Gt, baseEnvJsonSchema: () => en, configJsonSchema: () => tn, initSourceJsonSchema: () => rn, initSourcesJsonSchema: () => an, instanceJsonSchema: () => on, partialConfigJsonSchema: () => nn }); -var Kt = Ht.object({ push: Ht.any().describe("Collector push function"), command: Ht.any().describe("Collector command function"), sources: Ht.any().optional().describe("Map of registered source instances"), elb: Ht.any().describe("Public API function (alias for collector.push)") }).catchall(Ht.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); -var Ft = Be.extend({ settings: Ht.any().describe("Implementation-specific configuration").optional(), env: Kt.optional().describe("Environment dependencies (platform-specific)"), id: v.describe("Source identifier (defaults to source key)").optional(), onError: O.optional(), disabled: Ht.boolean().describe("Set to true to disable").optional(), primary: Ht.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); -var Gt = Ft.deepPartial().describe("Partial source configuration with all fields deeply optional"); -var Qt = Ht.object({ type: Ht.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ft.describe("Current source configuration"), push: Ht.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: Ht.any().optional().describe("Cleanup function called when source is removed"), on: Ht.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); -var Xt = Ht.any().describe("Source initialization function: (config, env) => Instance | Promise"); -var Yt = Ht.object({ code: Xt.describe("Source initialization function"), config: Gt.optional().describe("Partial configuration overrides"), env: Kt.partial().optional().describe("Partial environment overrides"), primary: Ht.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); -var Zt = Ht.record(Ht.string(), Yt).describe("Map of source IDs to initialization configurations"); -var en = zodToJsonSchema(Kt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); -var tn = zodToJsonSchema(Ft, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); -var nn = zodToJsonSchema(Gt, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); -var on = zodToJsonSchema(Qt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); -var rn = zodToJsonSchema(Yt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); -var an = zodToJsonSchema(Zt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); -var hn = { merge: true, shallow: true, extend: true }; -function yn(e5, t4 = {}, n4 = {}) { - n4 = { ...hn, ...n4 }; - const i2 = Object.entries(t4).reduce((t5, [i3, o3]) => { +var n = (n5, t3) => { + for (var i2 in t3) + e(n5, i2, { get: t3[i2], enumerable: true }); +}; +function h(e5, n5, t3 = "draft-7") { + return external_exports.toJSONSchema(e5, { target: t3 }); +} +var v = external_exports.string(); +var S = external_exports.number(); +var w = external_exports.boolean(); +var k = external_exports.string().min(1); +var j = external_exports.number().int().positive(); +var x = external_exports.number().int().nonnegative(); +var E = external_exports.number().describe("Tagging version number"); +var P = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]); +var C = P.optional(); +var O = {}; +n(O, { ErrorHandlerSchema: () => J, HandlerSchema: () => M, LogHandlerSchema: () => L, StorageSchema: () => I, StorageTypeSchema: () => D, errorHandlerJsonSchema: () => A, handlerJsonSchema: () => q, logHandlerJsonSchema: () => N, storageJsonSchema: () => z, storageTypeJsonSchema: () => R }); +var D = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); +var I = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references"); +var J = external_exports.any().describe("Error handler function: (error, state?) => void"); +var L = external_exports.any().describe("Log handler function: (message, verbose?) => void"); +var M = external_exports.object({ Error: J.describe("Error handler function"), Log: L.describe("Log handler function") }).describe("Handler interface with error and log functions"); +var R = h(D); +var z = h(I); +var A = h(J); +var N = h(L); +var q = h(M); +var T = external_exports.object({ onError: J.optional().describe("Error handler function: (error, state?) => void"), onLog: L.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); +var U = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); +var W = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); +var B = external_exports.object({}).partial(); +var $ = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); +var V = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial(); +var H = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); +var _ = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(); +var K = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); +var Y = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial(); +var Z = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial(); +var ee = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial(); +var ne = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(); +var te = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial(); +var ie = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial(); +var oe = {}; +n(oe, { ConsentSchema: () => ue, DeepPartialEventSchema: () => ve, EntitiesSchema: () => fe, EntitySchema: () => ge, EventSchema: () => he, OrderedPropertiesSchema: () => le, PartialEventSchema: () => ye, PropertiesSchema: () => ce, PropertySchema: () => ae, PropertyTypeSchema: () => se, SourceSchema: () => be, SourceTypeSchema: () => de, UserSchema: () => pe, VersionSchema: () => me, consentJsonSchema: () => Ce, entityJsonSchema: () => Ee, eventJsonSchema: () => Se, orderedPropertiesJsonSchema: () => xe, partialEventJsonSchema: () => we, propertiesJsonSchema: () => je, sourceTypeJsonSchema: () => Pe, userJsonSchema: () => ke }); +var re; +var se = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), ae)])); +var ae = external_exports.lazy(() => external_exports.union([se, external_exports.array(se)])); +var ce = external_exports.record(external_exports.string(), ae.optional()).describe("Flexible property collection with optional values"); +var le = external_exports.record(external_exports.string(), external_exports.tuple([ae, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); +var de = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom"); +var ue = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); +var pe = ce.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); +var me = ce.and(external_exports.object({ source: v.describe('Walker implementation version (e.g., "2.0.0")'), tagging: E })).describe("Walker version information"); +var be = ce.and(external_exports.object({ type: de.describe("Source type identifier"), id: v.describe("Source identifier (typically URL on web)"), previous_id: v.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); +var ge = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: ce.describe("Entity-specific properties"), nested: external_exports.array(ge).describe("Nested child entities"), context: le.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); +var fe = external_exports.array(ge).describe("Array of nested entities"); +var he = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: ce.describe("Event-specific properties"), context: le.describe("Ordered context properties with priorities"), globals: ce.describe("Global properties shared across events"), custom: ce.describe("Custom implementation-specific properties"), user: pe.describe("User identification and attributes"), nested: fe.describe("Related nested entities"), consent: ue.describe("Consent states at event time"), id: k.describe("Unique event identifier (timestamp-based)"), trigger: v.describe("Event trigger identifier"), entity: v.describe("Parsed entity from event name"), action: v.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: S.describe("Event processing timing information"), group: v.describe("Event grouping identifier"), count: x.describe("Event count in session"), version: me.describe("Walker version information"), source: be.describe("Event source information") }).describe("Complete walkerOS event structure"); +var ye = he.partial().describe("Partial event structure with all fields optional"); +var ve = he.partial().describe("Partial event structure with all top-level fields optional"); +var Se = h(he); +var we = h(ye); +var ke = h(pe); +var je = h(ce); +var xe = h(le); +var Ee = h(ge); +var Pe = h(de); +var Ce = h(ue); +var Oe = {}; +n(Oe, { ConfigSchema: () => qe, LoopSchema: () => Je, MapSchema: () => Me, PolicySchema: () => ze, ResultSchema: () => Te, RuleSchema: () => Ae, RulesSchema: () => Ne, SetSchema: () => Le, ValueConfigSchema: () => Re, ValueSchema: () => De, ValuesSchema: () => Ie, configJsonSchema: () => Fe, loopJsonSchema: () => Be, mapJsonSchema: () => Ve, policyJsonSchema: () => He, ruleJsonSchema: () => _e, rulesJsonSchema: () => Ke, setJsonSchema: () => $e, valueConfigJsonSchema: () => We, valueJsonSchema: () => Ue }); +var De = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => re), external_exports.array(De).describe("Array of values")])); +var Ie = external_exports.array(De).describe("Array of transformation values"); +var Je = external_exports.lazy(() => external_exports.tuple([De, De]).describe("Loop transformation: [source, transform] tuple for array processing")); +var Le = external_exports.lazy(() => external_exports.array(De).describe("Set: Array of values for selection or combination")); +var Me = external_exports.lazy(() => external_exports.record(external_exports.string(), De).describe("Map: Object mapping keys to transformation values")); +var Re = re = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: Me.optional().describe("Object mapping: transform event data to structured output"), loop: Je.optional().describe("Loop transformation: [source, transform] for array processing"), set: Le.optional().describe("Set of values: combine or select from multiple values"), consent: ue.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); +var ze = external_exports.record(external_exports.string(), De).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); +var Ae = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: ue.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([De, Ie]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: ze.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); +var Ne = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Ae, external_exports.array(Ae)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); +var qe = external_exports.object({ consent: ue.optional().describe("Required consent states to process any events"), data: external_exports.union([De, Ie]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: ze.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); +var Te = external_exports.object({ eventMapping: Ae.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); +var Ue = h(De); +var We = h(Re); +var Be = h(Je); +var $e = h(Le); +var Ve = h(Me); +var He = h(ze); +var _e = h(Ae); +var Ke = h(Ne); +var Fe = h(qe); +var Ge = {}; +n(Ge, { BatchSchema: () => rn, ConfigSchema: () => Qe, ContextSchema: () => Ze, DLQSchema: () => bn, DataSchema: () => sn, DestinationPolicySchema: () => Ye, DestinationsSchema: () => dn, InitDestinationsSchema: () => ln, InitSchema: () => cn, InstanceSchema: () => an, PartialConfigSchema: () => Xe, PushBatchContextSchema: () => nn, PushContextSchema: () => en, PushEventSchema: () => tn, PushEventsSchema: () => on, PushResultSchema: () => pn, RefSchema: () => un, ResultSchema: () => mn, batchJsonSchema: () => vn, configJsonSchema: () => gn, contextJsonSchema: () => hn, instanceJsonSchema: () => Sn, partialConfigJsonSchema: () => fn, pushContextJsonSchema: () => yn, resultJsonSchema: () => wn }); +var Qe = external_exports.object({ consent: ue.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([De, Ie]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: k.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: ze.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: J.optional(), onLog: L.optional() }).describe("Destination configuration"); +var Xe = Qe.partial().describe("Partial destination configuration with all fields optional"); +var Ye = ze.describe("Destination policy rules for event pre-processing"); +var Ze = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Qe.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions"); +var en = Ze.extend({ mapping: Ae.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); +var nn = en.describe("Batch push context with event-specific mapping"); +var tn = external_exports.object({ event: he.describe("The event to process"), mapping: Ae.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); +var on = external_exports.array(tn).describe("Array of events with mappings"); +var rn = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(he).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: Ae.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); +var sn = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"); +var an = external_exports.object({ config: Qe.describe("Destination configuration"), queue: external_exports.array(he).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([he, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); +var cn = external_exports.object({ code: an.describe("Destination instance with implementation"), config: Xe.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); +var ln = external_exports.record(external_exports.string(), cn).describe("Map of destination IDs to initialization configurations"); +var dn = external_exports.record(external_exports.string(), an).describe("Map of destination IDs to runtime instances"); +var un = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: an.describe("Destination instance") }).describe("Destination reference (ID + instance)"); +var pn = external_exports.object({ queue: external_exports.array(he).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result"); +var mn = external_exports.object({ successful: external_exports.array(un).describe("Destinations that processed successfully"), queued: external_exports.array(un).describe("Destinations that queued events"), failed: external_exports.array(un).describe("Destinations that failed to process") }).describe("Overall destination processing result"); +var bn = external_exports.array(external_exports.tuple([he, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]"); +var gn = h(Qe); +var fn = h(Xe); +var hn = h(Ze); +var yn = h(en); +var vn = h(rn); +var Sn = h(an); +var wn = h(mn); +var kn = {}; +n(kn, { CommandTypeSchema: () => jn, ConfigSchema: () => xn, DestinationsSchema: () => Dn, InitConfigSchema: () => Pn, InstanceSchema: () => In, PushContextSchema: () => Cn, SessionDataSchema: () => En, SourcesSchema: () => On, commandTypeJsonSchema: () => Jn, configJsonSchema: () => Ln, initConfigJsonSchema: () => Rn, instanceJsonSchema: () => An, pushContextJsonSchema: () => zn, sessionDataJsonSchema: () => Mn }); +var jn = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions"); +var xn = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: E, globalsStatic: ce.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: J.optional(), onLog: L.optional() }).describe("Core collector configuration"); +var En = ce.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: k.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: k.describe("Device identifier").optional(), count: x.describe("Event count in session").optional(), runs: x.describe("Number of runs").optional() })).describe("Session state and tracking data"); +var Pn = xn.partial().extend({ consent: ue.optional().describe("Initial consent state"), user: pe.optional().describe("Initial user data"), globals: ce.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: ce.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); +var Cn = external_exports.object({ mapping: qe.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); +var On = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances"); +var Dn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances"); +var In = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: xn.describe("Current collector configuration"), consent: ue.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: ce.describe("Custom implementation-specific properties"), sources: On.describe("Registered source instances"), destinations: Dn.describe("Registered destination instances"), globals: ce.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(he).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([En]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: pe.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); +var Jn = h(jn); +var Ln = h(xn); +var Mn = h(En); +var Rn = h(Pn); +var zn = h(Cn); +var An = h(In); +var Nn = {}; +n(Nn, { BaseEnvSchema: () => qn, ConfigSchema: () => Tn, InitSchema: () => Bn, InitSourceSchema: () => $n, InitSourcesSchema: () => Vn, InstanceSchema: () => Wn, PartialConfigSchema: () => Un, baseEnvJsonSchema: () => Hn, configJsonSchema: () => _n, initSourceJsonSchema: () => Gn, initSourcesJsonSchema: () => Qn, instanceJsonSchema: () => Fn, partialConfigJsonSchema: () => Kn }); +var qn = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); +var Tn = qe.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: qn.optional().describe("Environment dependencies (platform-specific)"), id: k.describe("Source identifier (defaults to source key)").optional(), onError: J.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); +var Un = Tn.partial().describe("Partial source configuration with all fields optional"); +var Wn = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Tn.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); +var Bn = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise"); +var $n = external_exports.object({ code: Bn.describe("Source initialization function"), config: Un.optional().describe("Partial configuration overrides"), env: qn.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); +var Vn = external_exports.record(external_exports.string(), $n).describe("Map of source IDs to initialization configurations"); +var Hn = h(qn); +var _n = h(Tn); +var Kn = h(Un); +var Fn = h(Wn); +var Gn = h($n); +var Qn = h(Vn); +var Xn = {}; +n(Xn, { ConfigSchema: () => nt, DestinationReferenceSchema: () => et, PrimitiveSchema: () => Yn, SetupSchema: () => tt, SourceReferenceSchema: () => Zn, configJsonSchema: () => ct, destinationReferenceJsonSchema: () => dt, parseConfig: () => rt, parseSetup: () => it, safeParseConfig: () => st, safeParseSetup: () => ot, setupJsonSchema: () => at, sourceReferenceJsonSchema: () => lt }); +var Yn = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean"); +var Zn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary.") }).describe("Source package reference with configuration"); +var et = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration") }).describe("Destination package reference with configuration"); +var nt = external_exports.object({ platform: external_exports.enum(["web", "server"], { error: 'Platform must be "web" or "server"' }).describe('Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection'), sources: external_exports.record(external_exports.string(), Zn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), et).optional().describe("Destination configurations (data output) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Environment-specific variables (override root-level variables)") }).passthrough().describe("Single environment configuration for one deployment target"); +var tt = external_exports.object({ version: external_exports.literal(1, { error: "Only version 1 is currently supported" }).describe("Configuration schema version (currently only 1 is supported)"), $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'), variables: external_exports.record(external_exports.string(), Yn).optional().describe("Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)"), definitions: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Reusable configuration definitions (reference with JSON Schema $ref syntax)"), environments: external_exports.record(external_exports.string(), nt).refine((e5) => Object.keys(e5).length > 0, { message: "At least one environment is required" }).describe("Named environment configurations (e.g., web_prod, server_stage)") }).describe("Complete multi-environment walkerOS configuration (walkeros.config.json)"); +function it(e5) { + return tt.parse(e5); +} +function ot(e5) { + return tt.safeParse(e5); +} +function rt(e5) { + return nt.parse(e5); +} +function st(e5) { + return nt.safeParse(e5); +} +var at = external_exports.toJSONSchema(tt, { target: "draft-7" }); +var ct = h(nt); +var lt = h(Zn); +var dt = h(et); +var yt = { merge: true, shallow: true, extend: true }; +function vt(e5, n5 = {}, t3 = {}) { + t3 = { ...yt, ...t3 }; + const i2 = Object.entries(n5).reduce((n6, [i3, o3]) => { const r2 = e5[i3]; - return n4.merge && Array.isArray(r2) && Array.isArray(o3) ? t5[i3] = o3.reduce((e6, t6) => e6.includes(t6) ? e6 : [...e6, t6], [...r2]) : (n4.extend || i3 in e5) && (t5[i3] = o3), t5; + return t3.merge && Array.isArray(r2) && Array.isArray(o3) ? n6[i3] = o3.reduce((e6, n7) => e6.includes(n7) ? e6 : [...e6, n7], [...r2]) : (t3.extend || i3 in e5) && (n6[i3] = o3), n6; }, {}); - return n4.shallow ? { ...e5, ...i2 } : (Object.assign(e5, i2), e5); + return t3.shallow ? { ...e5, ...i2 } : (Object.assign(e5, i2), e5); } -function vn(e5) { +function wt(e5) { return Array.isArray(e5); } -function jn(e5) { +function kt(e5) { return "boolean" == typeof e5; } -function xn(e5) { +function xt(e5) { return void 0 !== e5; } -function Cn(e5) { +function Pt(e5) { return "function" == typeof e5; } -function kn(e5) { +function Ct(e5) { return "number" == typeof e5 && !Number.isNaN(e5); } -function Pn(e5) { - return "object" == typeof e5 && null !== e5 && !vn(e5) && "[object Object]" === Object.prototype.toString.call(e5); +function Ot(e5) { + return "object" == typeof e5 && null !== e5 && !wt(e5) && "[object Object]" === Object.prototype.toString.call(e5); } -function Dn(e5) { +function It(e5) { return "string" == typeof e5; } -function $n(e5, t4 = /* @__PURE__ */ new WeakMap()) { +function Jt(e5, n5 = /* @__PURE__ */ new WeakMap()) { if ("object" != typeof e5 || null === e5) return e5; - if (t4.has(e5)) - return t4.get(e5); - const n4 = Object.prototype.toString.call(e5); - if ("[object Object]" === n4) { - const n5 = {}; - t4.set(e5, n5); + if (n5.has(e5)) + return n5.get(e5); + const t3 = Object.prototype.toString.call(e5); + if ("[object Object]" === t3) { + const t4 = {}; + n5.set(e5, t4); for (const i2 in e5) - Object.prototype.hasOwnProperty.call(e5, i2) && (n5[i2] = $n(e5[i2], t4)); - return n5; + Object.prototype.hasOwnProperty.call(e5, i2) && (t4[i2] = Jt(e5[i2], n5)); + return t4; } - if ("[object Array]" === n4) { - const n5 = []; - return t4.set(e5, n5), e5.forEach((e6) => { - n5.push($n(e6, t4)); - }), n5; + if ("[object Array]" === t3) { + const t4 = []; + return n5.set(e5, t4), e5.forEach((e6) => { + t4.push(Jt(e6, n5)); + }), t4; } - if ("[object Date]" === n4) + if ("[object Date]" === t3) return new Date(e5.getTime()); - if ("[object RegExp]" === n4) { - const t5 = e5; - return new RegExp(t5.source, t5.flags); + if ("[object RegExp]" === t3) { + const n6 = e5; + return new RegExp(n6.source, n6.flags); } return e5; } -function In(e5, t4 = "", n4) { - const i2 = t4.split("."); +function Lt(e5, n5 = "", t3) { + const i2 = n5.split("."); let o3 = e5; for (let e6 = 0; e6 < i2.length; e6++) { - const t5 = i2[e6]; - if ("*" === t5 && vn(o3)) { - const t6 = i2.slice(e6 + 1).join("."), r2 = []; + const n6 = i2[e6]; + if ("*" === n6 && wt(o3)) { + const n7 = i2.slice(e6 + 1).join("."), r2 = []; for (const e7 of o3) { - const i3 = In(e7, t6, n4); + const i3 = Lt(e7, n7, t3); r2.push(i3); } return r2; } - if (o3 = o3 instanceof Object ? o3[t5] : void 0, !o3) + if (o3 = o3 instanceof Object ? o3[n6] : void 0, !o3) break; } - return xn(o3) ? o3 : n4; + return xt(o3) ? o3 : t3; } -function On(e5, t4, n4) { - if (!Pn(e5)) +function Mt(e5, n5, t3) { + if (!Ot(e5)) return e5; - const i2 = $n(e5), o3 = t4.split("."); + const i2 = Jt(e5), o3 = n5.split("."); let r2 = i2; for (let e6 = 0; e6 < o3.length; e6++) { - const t5 = o3[e6]; - e6 === o3.length - 1 ? r2[t5] = n4 : (t5 in r2 && "object" == typeof r2[t5] && null !== r2[t5] || (r2[t5] = {}), r2 = r2[t5]); + const n6 = o3[e6]; + e6 === o3.length - 1 ? r2[n6] = t3 : (n6 in r2 && "object" == typeof r2[n6] && null !== r2[n6] || (r2[n6] = {}), r2 = r2[n6]); } return i2; } -function Jn(e5) { +function Rt(e5) { if ("true" === e5) return true; if ("false" === e5) return false; - const t4 = Number(e5); - return e5 == t4 && "" !== e5 ? t4 : String(e5); + const n5 = Number(e5); + return e5 == n5 && "" !== e5 ? n5 : String(e5); } -function Ln(e5, t4 = {}, n4 = {}) { - const i2 = { ...t4, ...n4 }, o3 = {}; +function zt(e5, n5 = {}, t3 = {}) { + const i2 = { ...n5, ...t3 }, o3 = {}; let r2 = void 0 === e5; - return Object.keys(i2).forEach((t5) => { - i2[t5] && (o3[t5] = true, e5 && e5[t5] && (r2 = true)); + return Object.keys(i2).forEach((n6) => { + i2[n6] && (o3[n6] = true, e5 && e5[n6] && (r2 = true)); }), !!r2 && o3; } -function An(e5 = 6) { - let t4 = ""; - for (let n4 = 36; t4.length < e5; ) - t4 += (Math.random() * n4 | 0).toString(n4); - return t4; +function Tt(e5 = 6) { + let n5 = ""; + for (let t3 = 36; n5.length < e5; ) + n5 += (Math.random() * t3 | 0).toString(t3); + return n5; } -function Un(e5, t4 = 1e3, n4 = false) { +function Wt(e5, n5 = 1e3, t3 = false) { let i2, o3 = null, r2 = false; - return (...a4) => new Promise((s3) => { - const c2 = n4 && !r2; + return (...s3) => new Promise((a4) => { + const c2 = t3 && !r2; o3 && clearTimeout(o3), o3 = setTimeout(() => { - o3 = null, n4 && !r2 || (i2 = e5(...a4), s3(i2)); - }, t4), c2 && (r2 = true, i2 = e5(...a4), s3(i2)); + o3 = null, t3 && !r2 || (i2 = e5(...s3), a4(i2)); + }, n5), c2 && (r2 = true, i2 = e5(...s3), a4(i2)); }); } -function Bn(e5) { - return jn(e5) || Dn(e5) || kn(e5) || !xn(e5) || vn(e5) && e5.every(Bn) || Pn(e5) && Object.values(e5).every(Bn); +function $t(e5) { + return kt(e5) || It(e5) || Ct(e5) || !xt(e5) || wt(e5) && e5.every($t) || Ot(e5) && Object.values(e5).every($t); } -function Vn(e5) { - return Bn(e5) ? e5 : void 0; +function Ht(e5) { + return $t(e5) ? e5 : void 0; } -function Hn(e5, t4, n4) { +function _t(e5, n5, t3) { return function(...i2) { try { return e5(...i2); } catch (e6) { - if (!t4) + if (!n5) return; - return t4(e6); + return n5(e6); } finally { - n4?.(); + t3?.(); } }; } -function _n(e5, t4, n4) { +function Kt(e5, n5, t3) { return async function(...i2) { try { return await e5(...i2); } catch (e6) { - if (!t4) + if (!n5) return; - return await t4(e6); + return await n5(e6); } finally { - await n4?.(); + await t3?.(); } }; } -async function Kn(e5, t4) { - const [n4, i2] = (e5.name || "").split(" "); - if (!t4 || !n4 || !i2) +async function Ft(e5, n5) { + const [t3, i2] = (e5.name || "").split(" "); + if (!n5 || !t3 || !i2) return {}; - let o3, r2 = "", a4 = n4, s3 = i2; - const c2 = (t5) => { - if (t5) - return (t5 = vn(t5) ? t5 : [t5]).find((t6) => !t6.condition || t6.condition(e5)); + let o3, r2 = "", s3 = t3, a4 = i2; + const c2 = (n6) => { + if (n6) + return (n6 = wt(n6) ? n6 : [n6]).find((n7) => !n7.condition || n7.condition(e5)); }; - t4[a4] || (a4 = "*"); - const l3 = t4[a4]; - return l3 && (l3[s3] || (s3 = "*"), o3 = c2(l3[s3])), o3 || (a4 = "*", s3 = "*", o3 = c2(t4[a4]?.[s3])), o3 && (r2 = `${a4} ${s3}`), { eventMapping: o3, mappingKey: r2 }; + n5[s3] || (s3 = "*"); + const l3 = n5[s3]; + return l3 && (l3[a4] || (a4 = "*"), o3 = c2(l3[a4])), o3 || (s3 = "*", a4 = "*", o3 = c2(n5[s3]?.[a4])), o3 && (r2 = `${s3} ${a4}`), { eventMapping: o3, mappingKey: r2 }; } -async function Fn(e5, t4 = {}, n4 = {}) { - if (!xn(e5)) +async function Gt(e5, n5 = {}, t3 = {}) { + if (!xt(e5)) return; - const i2 = Pn(e5) && e5.consent || n4.consent || n4.collector?.consent, o3 = vn(t4) ? t4 : [t4]; - for (const t5 of o3) { - const o4 = await _n(Gn)(e5, t5, { ...n4, consent: i2 }); - if (xn(o4)) + const i2 = Ot(e5) && e5.consent || t3.consent || t3.collector?.consent, o3 = wt(n5) ? n5 : [n5]; + for (const n6 of o3) { + const o4 = await Kt(Qt)(e5, n6, { ...t3, consent: i2 }); + if (xt(o4)) return o4; } } -async function Gn(e5, t4, n4 = {}) { - const { collector: i2, consent: o3 } = n4; - return (vn(t4) ? t4 : [t4]).reduce(async (t5, r2) => { - const a4 = await t5; - if (a4) - return a4; - const s3 = Dn(r2) ? { key: r2 } : r2; - if (!Object.keys(s3).length) +async function Qt(e5, n5, t3 = {}) { + const { collector: i2, consent: o3 } = t3; + return (wt(n5) ? n5 : [n5]).reduce(async (n6, r2) => { + const s3 = await n6; + if (s3) + return s3; + const a4 = It(r2) ? { key: r2 } : r2; + if (!Object.keys(a4).length) return; - const { condition: c2, consent: l3, fn: d2, key: p2, loop: u, map: m, set: g2, validate: b, value: f2 } = s3; - if (c2 && !await _n(c2)(e5, r2, i2)) + const { condition: c2, consent: l3, fn: d2, key: u, loop: p2, map: m, set: b, validate: g2, value: f } = a4; + if (c2 && !await Kt(c2)(e5, r2, i2)) return; - if (l3 && !Ln(l3, o3)) - return f2; - let h3 = xn(f2) ? f2 : e5; - if (d2 && (h3 = await _n(d2)(e5, r2, n4)), p2 && (h3 = In(e5, p2, f2)), u) { - const [t6, i3] = u, o4 = "this" === t6 ? [e5] : await Fn(e5, t6, n4); - vn(o4) && (h3 = (await Promise.all(o4.map((e6) => Fn(e6, i3, n4)))).filter(xn)); + if (l3 && !zt(l3, o3)) + return f; + let h3 = xt(f) ? f : e5; + if (d2 && (h3 = await Kt(d2)(e5, r2, t3)), u && (h3 = Lt(e5, u, f)), p2) { + const [n7, i3] = p2, o4 = "this" === n7 ? [e5] : await Gt(e5, n7, t3); + wt(o4) && (h3 = (await Promise.all(o4.map((e6) => Gt(e6, i3, t3)))).filter(xt)); } else - m ? h3 = await Object.entries(m).reduce(async (t6, [i3, o4]) => { - const r3 = await t6, a5 = await Fn(e5, o4, n4); - return xn(a5) && (r3[i3] = a5), r3; - }, Promise.resolve({})) : g2 && (h3 = await Promise.all(g2.map((t6) => Gn(e5, t6, n4)))); - b && !await _n(b)(h3) && (h3 = void 0); - const y3 = Vn(h3); - return xn(y3) ? y3 : Vn(f2); + m ? h3 = await Object.entries(m).reduce(async (n7, [i3, o4]) => { + const r3 = await n7, s4 = await Gt(e5, o4, t3); + return xt(s4) && (r3[i3] = s4), r3; + }, Promise.resolve({})) : b && (h3 = await Promise.all(b.map((n7) => Qt(e5, n7, t3)))); + g2 && !await Kt(g2)(h3) && (h3 = void 0); + const y2 = Ht(h3); + return xt(y2) ? y2 : Ht(f); }, Promise.resolve(void 0)); } -async function Qn(e5, t4, n4) { - t4.policy && await Promise.all(Object.entries(t4.policy).map(async ([t5, i3]) => { - const o4 = await Fn(e5, i3, { collector: n4 }); - e5 = On(e5, t5, o4); +async function Xt(e5, n5, t3) { + n5.policy && await Promise.all(Object.entries(n5.policy).map(async ([n6, i3]) => { + const o4 = await Gt(e5, i3, { collector: t3 }); + e5 = Mt(e5, n6, o4); })); - const { eventMapping: i2, mappingKey: o3 } = await Kn(e5, t4.mapping); - i2?.policy && await Promise.all(Object.entries(i2.policy).map(async ([t5, i3]) => { - const o4 = await Fn(e5, i3, { collector: n4 }); - e5 = On(e5, t5, o4); + const { eventMapping: i2, mappingKey: o3 } = await Ft(e5, n5.mapping); + i2?.policy && await Promise.all(Object.entries(i2.policy).map(async ([n6, i3]) => { + const o4 = await Gt(e5, i3, { collector: t3 }); + e5 = Mt(e5, n6, o4); })); - let r2 = t4.data && await Fn(e5, t4.data, { collector: n4 }); + let r2 = n5.data && await Gt(e5, n5.data, { collector: t3 }); if (i2) { if (i2.ignore) return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: true }; if (i2.name && (e5.name = i2.name), i2.data) { - const t5 = i2.data && await Fn(e5, i2.data, { collector: n4 }); - r2 = Pn(r2) && Pn(t5) ? yn(r2, t5) : t5; + const n6 = i2.data && await Gt(e5, i2.data, { collector: t3 }); + r2 = Ot(r2) && Ot(n6) ? vt(r2, n6) : n6; } } return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: false }; } -function Zn(e5, t4 = false) { - t4 && console.dir(e5, { depth: 4 }); -} -function ei(e5) { - const t4 = String(e5), n4 = t4.split("?")[1] || t4; - return Hn(() => { - const e6 = new URLSearchParams(n4), t5 = {}; - return e6.forEach((e7, n5) => { - const i2 = n5.split(/[[\]]+/).filter(Boolean); - let o3 = t5; - i2.forEach((t6, n6) => { - const r2 = n6 === i2.length - 1; - if (vn(o3)) { - const a4 = parseInt(t6, 10); - r2 ? o3[a4] = Jn(e7) : (o3[a4] = o3[a4] || (isNaN(parseInt(i2[n6 + 1], 10)) ? {} : []), o3 = o3[a4]); +function ei(e5, n5 = false) { + n5 && console.dir(e5, { depth: 4 }); +} +function ni(e5) { + const n5 = String(e5), t3 = n5.split("?")[1] || n5; + return _t(() => { + const e6 = new URLSearchParams(t3), n6 = {}; + return e6.forEach((e7, t4) => { + const i2 = t4.split(/[[\]]+/).filter(Boolean); + let o3 = n6; + i2.forEach((n7, t5) => { + const r2 = t5 === i2.length - 1; + if (wt(o3)) { + const s3 = parseInt(n7, 10); + r2 ? o3[s3] = Rt(e7) : (o3[s3] = o3[s3] || (isNaN(parseInt(i2[t5 + 1], 10)) ? {} : []), o3 = o3[s3]); } else - Pn(o3) && (r2 ? o3[t6] = Jn(e7) : (o3[t6] = o3[t6] || (isNaN(parseInt(i2[n6 + 1], 10)) ? {} : []), o3 = o3[t6])); + Ot(o3) && (r2 ? o3[n7] = Rt(e7) : (o3[n7] = o3[n7] || (isNaN(parseInt(i2[t5 + 1], 10)) ? {} : []), o3 = o3[n7])); }); - }), t5; + }), n6; })(); } -function ai(e5, t4, n4) { +function ai(e5, n5, t3) { return function(...i2) { let o3; - const r2 = "post" + t4, a4 = n4["pre" + t4], s3 = n4[r2]; - return o3 = a4 ? a4({ fn: e5 }, ...i2) : e5(...i2), s3 && (o3 = s3({ fn: e5, result: o3 }, ...i2)), o3; + const r2 = "post" + n5, s3 = t3["pre" + n5], a4 = t3[r2]; + return o3 = s3 ? s3({ fn: e5 }, ...i2) : e5(...i2), a4 && (o3 = a4({ fn: e5, result: o3 }, ...i2)), o3; }; } // node_modules/@walkeros/collector/dist/index.mjs var e2 = Object.defineProperty; -var n = { Action: "action", Actions: "actions", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" }; -var o = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; -var t2 = {}; -((n4, o3) => { - for (var t4 in o3) - e2(n4, t4, { get: o3[t4], enumerable: true }); -})(t2, { schemas: () => a, settingsSchema: () => s }); +var n2 = { Action: "action", Actions: "actions", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" }; +var o = { Commands: n2, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; +var t = {}; +((n5, o3) => { + for (var t3 in o3) + e2(n5, t3, { get: o3[t3], enumerable: true }); +})(t, { schemas: () => a, settingsSchema: () => s }); var s = { type: "object", properties: { run: { type: "boolean", description: "Automatically start the collector pipeline on initialization" }, sources: { type: "object", description: "Configurations for sources providing events to the collector" }, destinations: { type: "object", description: "Configurations for destinations receiving processed events" }, consent: { type: "object", description: "Initial consent state to control routing of events" }, verbose: { type: "boolean", description: "Enable verbose logging for debugging" }, onError: { type: "string", description: "Error handler triggered when the collector encounters failures" }, onLog: { type: "string", description: "Custom log handler for collector messages" } } }; var a = { settings: s }; -async function h2(e5, n4, o3) { - const { code: t4, config: s3 = {}, env: a4 = {} } = n4, i2 = o3 || s3 || { init: false }, c2 = { ...t4, config: i2, env: q2(t4.env, a4) }; +async function h2(e5, n5, o3) { + const { code: t3, config: s3 = {}, env: a4 = {} } = n5, i2 = o3 || s3 || { init: false }, c2 = { ...t3, config: i2, env: q2(t3.env, a4) }; let r2 = c2.config.id; if (!r2) do { - r2 = An(4); + r2 = Tt(4); } while (e5.destinations[r2]); - return e5.destinations[r2] = c2, false !== c2.config.queue && (c2.queue = [...e5.queue]), y2(e5, void 0, { [r2]: c2 }); + return e5.destinations[r2] = c2, false !== c2.config.queue && (c2.queue = [...e5.queue]), y(e5, void 0, { [r2]: c2 }); } -async function y2(e5, n4, o3) { - const { allowed: t4, consent: s3, globals: a4, user: i2 } = e5; - if (!t4) +async function y(e5, n5, o3) { + const { allowed: t3, consent: s3, globals: a4, user: i2 } = e5; + if (!t3) return w2({ ok: false }); - n4 && e5.queue.push(n4), o3 || (o3 = e5.destinations); - const u = await Promise.all(Object.entries(o3 || {}).map(async ([o4, t5]) => { - let u2 = (t5.queue || []).map((e6) => ({ ...e6, consent: s3 })); - if (t5.queue = [], n4) { - const e6 = $n(n4); + n5 && e5.queue.push(n5), o3 || (o3 = e5.destinations); + const u = await Promise.all(Object.entries(o3 || {}).map(async ([o4, t4]) => { + let u2 = (t4.queue || []).map((e6) => ({ ...e6, consent: s3 })); + if (t4.queue = [], n5) { + const e6 = Jt(n5); u2.push(e6); } if (!u2.length) - return { id: o4, destination: t5, skipped: true }; + return { id: o4, destination: t4, skipped: true }; const l4 = [], m2 = u2.filter((e6) => { - const n5 = Ln(t5.config.consent, s3, e6.consent); - return !n5 || (e6.consent = n5, l4.push(e6), false); + const n6 = zt(t4.config.consent, s3, e6.consent); + return !n6 || (e6.consent = n6, l4.push(e6), false); }); - if (t5.queue.concat(m2), !l4.length) - return { id: o4, destination: t5, queue: u2 }; - if (!await _n(v2)(e5, t5)) - return { id: o4, destination: t5, queue: u2 }; - let f3 = false; - return t5.dlq || (t5.dlq = []), await Promise.all(l4.map(async (n5) => (n5.globals = yn(a4, n5.globals), n5.user = yn(i2, n5.user), await _n(k2, (o5) => (e5.config.onError && e5.config.onError(o5, e5), f3 = true, t5.dlq.push([n5, o5]), false))(e5, t5, n5), n5))), { id: o4, destination: t5, error: f3 }; - })), l3 = [], m = [], f2 = []; + if (t4.queue.concat(m2), !l4.length) + return { id: o4, destination: t4, queue: u2 }; + if (!await Kt(v2)(e5, t4)) + return { id: o4, destination: t4, queue: u2 }; + let f2 = false; + return t4.dlq || (t4.dlq = []), await Promise.all(l4.map(async (n6) => (n6.globals = vt(a4, n6.globals), n6.user = vt(i2, n6.user), await Kt(k2, (o5) => (e5.config.onError && e5.config.onError(o5, e5), f2 = true, t4.dlq.push([n6, o5]), false))(e5, t4, n6), n6))), { id: o4, destination: t4, error: f2 }; + })), l3 = [], m = [], f = []; for (const e6 of u) { if (e6.skipped) continue; - const n5 = e6.destination, o4 = { id: e6.id, destination: n5 }; - e6.error ? f2.push(o4) : e6.queue && e6.queue.length ? (n5.queue = (n5.queue || []).concat(e6.queue), m.push(o4)) : l3.push(o4); + const n6 = e6.destination, o4 = { id: e6.id, destination: n6 }; + e6.error ? f.push(o4) : e6.queue && e6.queue.length ? (n6.queue = (n6.queue || []).concat(e6.queue), m.push(o4)) : l3.push(o4); } - return w2({ ok: !f2.length, event: n4, successful: l3, queued: m, failed: f2 }); + return w2({ ok: !f.length, event: n5, successful: l3, queued: m, failed: f }); } -async function v2(e5, n4) { - if (n4.init && !n4.config.init) { - const o3 = { collector: e5, config: n4.config, env: q2(n4.env, n4.config.env) }, t4 = await ai(n4.init, "DestinationInit", e5.hooks)(o3); - if (false === t4) - return t4; - n4.config = { ...t4 || n4.config, init: true }; +async function v2(e5, n5) { + if (n5.init && !n5.config.init) { + const o3 = { collector: e5, config: n5.config, env: q2(n5.env, n5.config.env) }, t3 = await ai(n5.init, "DestinationInit", e5.hooks)(o3); + if (false === t3) + return t3; + n5.config = { ...t3 || n5.config, init: true }; } return true; } -async function k2(e5, n4, o3) { - const { config: t4 } = n4, s3 = await Qn(o3, t4, e5); +async function k2(e5, n5, o3) { + const { config: t3 } = n5, s3 = await Xt(o3, t3, e5); if (s3.ignore) return false; - const a4 = { collector: e5, config: t4, data: s3.data, mapping: s3.mapping, env: q2(n4.env, t4.env) }, i2 = s3.mapping; - if (i2?.batch && n4.pushBatch) { + const a4 = { collector: e5, config: t3, data: s3.data, mapping: s3.mapping, env: q2(n5.env, t3.env) }, i2 = s3.mapping; + if (i2?.batch && n5.pushBatch) { const o4 = i2.batched || { key: s3.mappingKey || "", events: [], data: [] }; - o4.events.push(s3.event), xn(s3.data) && o4.data.push(s3.data), i2.batchFn = i2.batchFn || Un((e6, n5) => { - const a5 = { collector: n5, config: t4, data: s3.data, mapping: i2, env: q2(e6.env, t4.env) }; - ai(e6.pushBatch, "DestinationPushBatch", n5.hooks)(o4, a5), o4.events = [], o4.data = []; - }, i2.batch), i2.batched = o4, i2.batchFn?.(n4, e5); + o4.events.push(s3.event), xt(s3.data) && o4.data.push(s3.data), i2.batchFn = i2.batchFn || Wt((e6, n6) => { + const a5 = { collector: n6, config: t3, data: s3.data, mapping: i2, env: q2(e6.env, t3.env) }; + ai(e6.pushBatch, "DestinationPushBatch", n6.hooks)(o4, a5), o4.events = [], o4.data = []; + }, i2.batch), i2.batched = o4, i2.batchFn?.(n5, e5); } else - await ai(n4.push, "DestinationPush", e5.hooks)(s3.event, a4); + await ai(n5.push, "DestinationPush", e5.hooks)(s3.event, a4); return true; } function w2(e5) { - return yn({ ok: !e5?.failed?.length, successful: [], queued: [], failed: [] }, e5); + return vt({ ok: !e5?.failed?.length, successful: [], queued: [], failed: [] }, e5); } -async function C2(e5, n4 = {}) { +async function C2(e5, n5 = {}) { const o3 = {}; - for (const [e6, t4] of Object.entries(n4)) { - const { code: n5, config: s3 = {}, env: a4 = {} } = t4, i2 = { ...n5.config, ...s3 }, c2 = q2(n5.env, a4); - o3[e6] = { ...n5, config: i2, env: c2 }; + for (const [e6, t3] of Object.entries(n5)) { + const { code: n6, config: s3 = {}, env: a4 = {} } = t3, i2 = { ...n6.config, ...s3 }, c2 = q2(n6.env, a4); + o3[e6] = { ...n6, config: i2, env: c2 }; } return o3; } -function q2(e5, n4) { - return e5 || n4 ? n4 ? e5 && Pn(e5) && Pn(n4) ? { ...e5, ...n4 } : n4 : e5 : {}; +function q2(e5, n5) { + return e5 || n5 ? n5 ? e5 && Ot(e5) && Ot(n5) ? { ...e5, ...n5 } : n5 : e5 : {}; } -function O2(e5, n4, o3) { - const t4 = e5.on, s3 = t4[n4] || [], a4 = vn(o3) ? o3 : [o3]; +function O2(e5, n5, o3) { + const t3 = e5.on, s3 = t3[n5] || [], a4 = wt(o3) ? o3 : [o3]; a4.forEach((e6) => { s3.push(e6); - }), t4[n4] = s3, A2(e5, n4, a4); + }), t3[n5] = s3, A2(e5, n5, a4); } -function A2(e5, n4, t4, s3) { - let a4, i2 = t4 || []; - switch (t4 || (i2 = e5.on[n4] || []), n4) { +function A2(e5, n5, t3, s3) { + let a4, i2 = t3 || []; + switch (t3 || (i2 = e5.on[n5] || []), n5) { case o.Commands.Consent: a4 = s3 || e5.consent; break; @@ -1806,174 +13067,174 @@ function A2(e5, n4, t4, s3) { a4 = void 0; } if (Object.values(e5.sources).forEach((e6) => { - e6.on && Hn(e6.on)(n4, a4); + e6.on && _t(e6.on)(n5, a4); }), Object.values(e5.destinations).forEach((e6) => { if (e6.on) { const o3 = e6.on; - Hn(o3)(n4, a4); + _t(o3)(n5, a4); } }), i2.length) - switch (n4) { + switch (n5) { case o.Commands.Consent: - !function(e6, n5, o3) { - const t5 = o3 || e6.consent; - n5.forEach((n6) => { - Object.keys(t5).filter((e7) => e7 in n6).forEach((o4) => { - Hn(n6[o4])(e6, t5); + !function(e6, n6, o3) { + const t4 = o3 || e6.consent; + n6.forEach((n7) => { + Object.keys(t4).filter((e7) => e7 in n7).forEach((o4) => { + _t(n7[o4])(e6, t4); }); }); }(e5, i2, s3); break; case o.Commands.Ready: case o.Commands.Run: - !function(e6, n5) { - e6.allowed && n5.forEach((n6) => { - Hn(n6)(e6); + !function(e6, n6) { + e6.allowed && n6.forEach((n7) => { + _t(n7)(e6); }); }(e5, i2); break; case o.Commands.Session: - !function(e6, n5) { + !function(e6, n6) { if (!e6.session) return; - n5.forEach((n6) => { - Hn(n6)(e6, e6.session); + n6.forEach((n7) => { + _t(n7)(e6, e6.session); }); }(e5, i2); } } -async function S2(e5, n4) { +async function S2(e5, n5) { const { consent: o3 } = e5; - let t4 = false; + let t3 = false; const s3 = {}; - return Object.entries(n4).forEach(([e6, n5]) => { - const o4 = !!n5; - s3[e6] = o4, t4 = t4 || o4; - }), e5.consent = yn(o3, s3), A2(e5, "consent", void 0, s3), t4 ? y2(e5) : w2({ ok: true }); + return Object.entries(n5).forEach(([e6, n6]) => { + const o4 = !!n6; + s3[e6] = o4, t3 = t3 || o4; + }), e5.consent = vt(o3, s3), A2(e5, "consent", void 0, s3), t3 ? y(e5) : w2({ ok: true }); } -async function B2(e5, n4, t4, s3) { +async function B2(e5, n5, t3, s3) { let a4; - switch (n4) { + switch (n5) { case o.Commands.Config: - Pn(t4) && yn(e5.config, t4, { shallow: false }); + Ot(t3) && vt(e5.config, t3, { shallow: false }); break; case o.Commands.Consent: - Pn(t4) && (a4 = await S2(e5, t4)); + Ot(t3) && (a4 = await S2(e5, t3)); break; case o.Commands.Custom: - Pn(t4) && (e5.custom = yn(e5.custom, t4)); + Ot(t3) && (e5.custom = vt(e5.custom, t3)); break; case o.Commands.Destination: - Pn(t4) && Cn(t4.push) && (a4 = await h2(e5, { code: t4 }, s3)); + Ot(t3) && Pt(t3.push) && (a4 = await h2(e5, { code: t3 }, s3)); break; case o.Commands.Globals: - Pn(t4) && (e5.globals = yn(e5.globals, t4)); + Ot(t3) && (e5.globals = vt(e5.globals, t3)); break; case o.Commands.On: - Dn(t4) && O2(e5, t4, s3); + It(t3) && O2(e5, t3, s3); break; case o.Commands.Ready: A2(e5, "ready"); break; case o.Commands.Run: - a4 = await G(e5, t4); + a4 = await G(e5, t3); break; case o.Commands.Session: A2(e5, "session"); break; case o.Commands.User: - Pn(t4) && yn(e5.user, t4, { shallow: false }); + Ot(t3) && vt(e5.user, t3, { shallow: false }); } return a4 || { ok: true, successful: [], queued: [], failed: [] }; } -function F2(e5, n4) { - if (!n4.name) +function F(e5, n5) { + if (!n5.name) throw new Error("Event name is required"); - const [o3, t4] = n4.name.split(" "); - if (!o3 || !t4) + const [o3, t3] = n5.name.split(" "); + if (!o3 || !t3) throw new Error("Event name is invalid"); ++e5.count; - const { timestamp: s3 = Date.now(), group: a4 = e5.group, count: i2 = e5.count } = n4, { name: c2 = `${o3} ${t4}`, data: r2 = {}, context: u = {}, globals: l3 = e5.globals, custom: d2 = {}, user: m = e5.user, nested: f2 = [], consent: g2 = e5.consent, id: p2 = `${s3}-${a4}-${i2}`, trigger: b = "", entity: h3 = o3, action: y3 = t4, timing: v3 = 0, version: k3 = { source: e5.version, tagging: e5.config.tagging || 0 }, source: w3 = { type: "collector", id: "", previous_id: "" } } = n4; - return { name: c2, data: r2, context: u, globals: l3, custom: d2, user: m, nested: f2, consent: g2, id: p2, trigger: b, entity: h3, action: y3, timestamp: s3, timing: v3, group: a4, count: i2, version: k3, source: w3 }; + const { timestamp: s3 = Date.now(), group: a4 = e5.group, count: i2 = e5.count } = n5, { name: c2 = `${o3} ${t3}`, data: r2 = {}, context: u = {}, globals: l3 = e5.globals, custom: d2 = {}, user: m = e5.user, nested: f = [], consent: g2 = e5.consent, id: p2 = `${s3}-${a4}-${i2}`, trigger: b = "", entity: h3 = o3, action: y2 = t3, timing: v3 = 0, version: k3 = { source: e5.version, tagging: e5.config.tagging || 0 }, source: w3 = { type: "collector", id: "", previous_id: "" } } = n5; + return { name: c2, data: r2, context: u, globals: l3, custom: d2, user: m, nested: f, consent: g2, id: p2, trigger: b, entity: h3, action: y2, timestamp: s3, timing: v3, group: a4, count: i2, version: k3, source: w3 }; } -async function G(e5, n4) { - e5.allowed = true, e5.count = 0, e5.group = An(), e5.timing = Date.now(), n4 && (n4.consent && (e5.consent = yn(e5.consent, n4.consent)), n4.user && (e5.user = yn(e5.user, n4.user)), n4.globals && (e5.globals = yn(e5.config.globalsStatic || {}, n4.globals)), n4.custom && (e5.custom = yn(e5.custom, n4.custom))), Object.values(e5.destinations).forEach((e6) => { +async function G(e5, n5) { + e5.allowed = true, e5.count = 0, e5.group = Tt(), e5.timing = Date.now(), n5 && (n5.consent && (e5.consent = vt(e5.consent, n5.consent)), n5.user && (e5.user = vt(e5.user, n5.user)), n5.globals && (e5.globals = vt(e5.config.globalsStatic || {}, n5.globals)), n5.custom && (e5.custom = vt(e5.custom, n5.custom))), Object.values(e5.destinations).forEach((e6) => { e6.queue = []; }), e5.queue = [], e5.round++; - const o3 = await y2(e5); + const o3 = await y(e5); return A2(e5, "run"), o3; } -function _2(e5, n4) { - return ai(async (o3, t4 = {}) => await _n(async () => { +function _2(e5, n5) { + return ai(async (o3, t3 = {}) => await Kt(async () => { let s3 = o3; - if (t4.mapping) { - const n5 = await Qn(s3, t4.mapping, e5); - if (n5.ignore) + if (t3.mapping) { + const n6 = await Xt(s3, t3.mapping, e5); + if (n6.ignore) return w2({ ok: true }); - if (t4.mapping.consent) { - if (!Ln(t4.mapping.consent, e5.consent, n5.event.consent)) + if (t3.mapping.consent) { + if (!zt(t3.mapping.consent, e5.consent, n6.event.consent)) return w2({ ok: true }); } - s3 = n5.event; + s3 = n6.event; } - const a4 = n4(s3), i2 = F2(e5, a4); - return await y2(e5, i2); + const a4 = n5(s3), i2 = F(e5, a4); + return await y(e5, i2); }, () => w2({ ok: false }))(), "Push", e5.hooks); } async function J2(e5) { - const n4 = yn({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o3, run: true }, e5, { merge: false, extend: false }); + const n5 = vt({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o3, run: true }, e5, { merge: false, extend: false }); function o3(e6, o4) { - Zn({ message: e6 }, o4 || n4.verbose); + ei({ message: e6 }, o4 || n5.verbose); } - n4.onLog = o3; - const t4 = { ...n4.globalsStatic, ...e5.globals }, s3 = { allowed: false, config: n4, consent: e5.consent || {}, count: 0, custom: e5.custom || {}, destinations: {}, globals: t4, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e5.user || {}, version: "0.3.0", sources: {}, push: void 0, command: void 0 }; - return s3.push = _2(s3, (e6) => ({ timing: Math.round((Date.now() - s3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e6 })), s3.command = function(e6, n5) { - return ai(async (o4, t5, s4) => await _n(async () => await n5(e6, o4, t5, s4), () => w2({ ok: false }))(), "Command", e6.hooks); + n5.onLog = o3; + const t3 = { ...n5.globalsStatic, ...e5.globals }, s3 = { allowed: false, config: n5, consent: e5.consent || {}, count: 0, custom: e5.custom || {}, destinations: {}, globals: t3, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e5.user || {}, version: "0.3.1", sources: {}, push: void 0, command: void 0 }; + return s3.push = _2(s3, (e6) => ({ timing: Math.round((Date.now() - s3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e6 })), s3.command = function(e6, n6) { + return ai(async (o4, t4, s4) => await Kt(async () => await n6(e6, o4, t4, s4), () => w2({ ok: false }))(), "Command", e6.hooks); }(s3, B2), s3.destinations = await C2(0, e5.destinations || {}), s3; } -async function Q(e5, n4 = {}) { +async function Q(e5, n5 = {}) { const o3 = {}; - for (const [t4, s3] of Object.entries(n4)) { - const { code: n5, config: a4 = {}, env: i2 = {}, primary: c2 } = s3, r2 = { push: (n6, o4 = {}) => e5.push(n6, { ...o4, mapping: a4 }), command: e5.command, sources: e5.sources, elb: e5.sources.elb.push, ...i2 }, u = await _n(n5)(a4, r2); - u && (c2 && (u.config = { ...u.config, primary: c2 }), o3[t4] = u); + for (const [t3, s3] of Object.entries(n5)) { + const { code: n6, config: a4 = {}, env: i2 = {}, primary: c2 } = s3, r2 = { push: (n7, o4 = {}) => e5.push(n7, { ...o4, mapping: a4 }), command: e5.command, sources: e5.sources, elb: e5.sources.elb.push, ...i2 }, u = await Kt(n6)(a4, r2); + u && (c2 && (u.config = { ...u.config, primary: c2 }), o3[t3] = u); } return o3; } async function T2(e5) { e5 = e5 || {}; - const n4 = await J2(e5), o3 = (t4 = n4, { type: "elb", config: {}, push: async (e6, n5, o4, s4, a5, i3) => { + const n5 = await J2(e5), o3 = (t3 = n5, { type: "elb", config: {}, push: async (e6, n6, o4, s4, a5, i3) => { if ("string" == typeof e6 && e6.startsWith("walker ")) { const s5 = e6.replace("walker ", ""); - return t4.command(s5, n5, o4); + return t3.command(s5, n6, o4); } let c3; if ("string" == typeof e6) - c3 = { name: e6 }, n5 && "object" == typeof n5 && !Array.isArray(n5) && (c3.data = n5); + c3 = { name: e6 }, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c3.data = n6); else { if (!e6 || "object" != typeof e6) return { ok: false, successful: [], queued: [], failed: [] }; - c3 = e6, n5 && "object" == typeof n5 && !Array.isArray(n5) && (c3.data = { ...c3.data || {}, ...n5 }); + c3 = e6, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c3.data = { ...c3.data || {}, ...n6 }); } - return s4 && "object" == typeof s4 && (c3.context = s4), a5 && Array.isArray(a5) && (c3.nested = a5), i3 && "object" == typeof i3 && (c3.custom = i3), t4.push(c3); + return s4 && "object" == typeof s4 && (c3.context = s4), a5 && Array.isArray(a5) && (c3.nested = a5), i3 && "object" == typeof i3 && (c3.custom = i3), t3.push(c3); } }); - var t4; - n4.sources.elb = o3; - const s3 = await Q(n4, e5.sources || {}); - Object.assign(n4.sources, s3); + var t3; + n5.sources.elb = o3; + const s3 = await Q(n5, e5.sources || {}); + Object.assign(n5.sources, s3); const { consent: a4, user: i2, globals: c2, custom: r2 } = e5; - a4 && await n4.command("consent", a4), i2 && await n4.command("user", i2), c2 && Object.assign(n4.globals, c2), r2 && Object.assign(n4.custom, r2), n4.config.run && await n4.command("run"); + a4 && await n5.command("consent", a4), i2 && await n5.command("user", i2), c2 && Object.assign(n5.globals, c2), r2 && Object.assign(n5.custom, r2), n5.config.run && await n5.command("run"); let u = o3.push; - const l3 = Object.values(n4.sources).filter((e6) => "elb" !== e6.type), d2 = l3.find((e6) => e6.config.primary); - return d2 ? u = d2.push : l3.length > 0 && (u = l3[0].push), { collector: n4, elb: u }; + const l3 = Object.values(n5.sources).filter((e6) => "elb" !== e6.type), d2 = l3.find((e6) => e6.config.primary); + return d2 ? u = d2.push : l3.length > 0 && (u = l3[0].push), { collector: n5, elb: u }; } // node_modules/@walkeros/server-source-express/dist/index.mjs import e3 from "express"; import o2 from "cors"; -var r = un.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]); -var n2 = un.union([un.string(), un.array(un.string()), un.literal("*")]); -var a2 = un.object({ origin: n2.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: un.array(r).describe("Allowed HTTP methods").optional(), headers: un.array(un.string()).describe("Allowed request headers").optional(), credentials: un.boolean().describe("Allow credentials (cookies, authorization headers)").optional(), maxAge: un.number().int().positive().describe("Preflight cache duration in seconds").optional() }); -var l = un.object({ port: un.number().int().min(0).max(65535).describe("HTTP server port to listen on. Use 0 for random available port. If not provided, server will not start (app only mode)").optional(), path: un.string().describe("Event collection endpoint path").default("/collect"), cors: un.union([un.boolean(), a2]).describe("CORS configuration: false = disabled, true = allow all origins (default), object = custom configuration").default(true), status: un.boolean().describe("Enable health check endpoints (/health, /ready)").default(true) }); +var r = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]); +var n3 = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.literal("*")]); +var a2 = external_exports.object({ origin: n3.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: external_exports.array(r).describe("Allowed HTTP methods").optional(), headers: external_exports.array(external_exports.string()).describe("Allowed request headers").optional(), credentials: external_exports.boolean().describe("Allow credentials (cookies, authorization headers)").optional(), maxAge: external_exports.number().int().positive().describe("Preflight cache duration in seconds").optional() }); +var l = external_exports.object({ port: external_exports.number().int().min(0).max(65535).describe("HTTP server port to listen on. Use 0 for random available port. If not provided, server will not start (app only mode)").optional(), path: external_exports.string().describe("Event collection endpoint path").default("/collect"), cors: external_exports.union([external_exports.boolean(), a2]).describe("CORS configuration: false = disabled, true = allow all origins (default), object = custom configuration").default(true), status: external_exports.boolean().describe("Enable health check endpoints (/health, /ready)").default(true) }); function c(e5, o3 = true) { if (false !== o3) if (true === o3) @@ -1987,19 +13248,19 @@ function c(e5, o3 = true) { } } var d = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64"); -var p = async (t4, r2) => { - const n4 = l.parse(t4.settings || {}), a4 = e3(); - if (a4.use(e3.json({ limit: "1mb" })), false !== n4.cors) { - const e5 = true === n4.cors ? {} : n4.cors; +var p = async (t3, r2) => { + const n5 = l.parse(t3.settings || {}), a4 = e3(); + if (a4.use(e3.json({ limit: "1mb" })), false !== n5.cors) { + const e5 = true === n5.cors ? {} : n5.cors; a4.use(o2(e5)); } const i2 = async (e5, o3) => { try { if ("OPTIONS" === e5.method) - return c(o3, n4.cors), void o3.status(204).send(); + return c(o3, n5.cors), void o3.status(204).send(); if ("GET" === e5.method) { - const t5 = ei(e5.url); - return t5 && "object" == typeof t5 && await r2.push(t5), o3.set("Content-Type", "image/gif"), o3.set("Cache-Control", "no-cache, no-store, must-revalidate"), void o3.send(d); + const t4 = ni(e5.url); + return t4 && "object" == typeof t4 && await r2.push(t4), o3.set("Content-Type", "image/gif"), o3.set("Cache-Control", "no-cache, no-store, must-revalidate"), void o3.send(d); } if ("POST" === e5.method) { const s3 = e5.body; @@ -2011,48 +13272,48 @@ var p = async (t4, r2) => { } }; let p2; - if (a4.post(n4.path, i2), a4.get(n4.path, i2), a4.options(n4.path, i2), n4.status && (a4.get("/health", (e5, o3) => { + if (a4.post(n5.path, i2), a4.get(n5.path, i2), a4.options(n5.path, i2), n5.status && (a4.get("/health", (e5, o3) => { o3.json({ status: "ok", timestamp: Date.now(), source: "express" }); }), a4.get("/ready", (e5, o3) => { o3.json({ status: "ready", timestamp: Date.now(), source: "express" }); - })), void 0 !== n4.port) { - p2 = a4.listen(n4.port, () => { - console.log(`\u2705 Express source listening on port ${n4.port}`), console.log(` POST ${n4.path} - Event collection (JSON body)`), console.log(` GET ${n4.path} - Pixel tracking (query params)`), console.log(` OPTIONS ${n4.path} - CORS preflight`), n4.status && (console.log(" GET /health - Health check"), console.log(" GET /ready - Readiness check")); + })), void 0 !== n5.port) { + p2 = a4.listen(n5.port, () => { + console.log(`\u2705 Express source listening on port ${n5.port}`), console.log(` POST ${n5.path} - Event collection (JSON body)`), console.log(` GET ${n5.path} - Pixel tracking (query params)`), console.log(` OPTIONS ${n5.path} - CORS preflight`), n5.status && (console.log(" GET /health - Health check"), console.log(" GET /ready - Readiness check")); }); const e5 = () => { p2 && p2.close(); }; process.on("SIGTERM", e5), process.on("SIGINT", e5); } - return { type: "express", config: { ...t4, settings: n4 }, push: i2, app: a4, server: p2 }; + return { type: "express", config: { ...t3, settings: n5 }, push: i2, app: a4, server: p2 }; }; // node_modules/@walkeros/destination-demo/dist/index.mjs var e4 = Object.defineProperty; -var n3 = (n4, o3) => { +var n4 = (n5, o3) => { for (var i2 in o3) - e4(n4, i2, { get: o3[i2], enumerable: true }); + e4(n5, i2, { get: o3[i2], enumerable: true }); }; var i = {}; -n3(i, { env: () => t3 }); -var t3 = {}; -n3(t3, { init: () => s2, push: () => a3, simulation: () => l2 }); +n4(i, { env: () => t2 }); +var t2 = {}; +n4(t2, { init: () => s2, push: () => a3, simulation: () => l2 }); var s2 = { log: void 0 }; var a3 = { log: Object.assign(() => { }, {}) }; var l2 = ["call:log"]; -var g = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e5, env: n4 }) { - (n4?.log || console.log)(`[${{ name: "demo", ...e5?.settings }.name}] initialized`); -}, push(e5, { config: n4, env: o3 }) { - const i2 = o3?.log || console.log, t4 = { name: "demo", ...n4?.settings }, s3 = t4.values ? function(e6, n5) { +var g = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e5, env: n5 }) { + (n5?.log || console.log)(`[${{ name: "demo", ...e5?.settings }.name}] initialized`); +}, push(e5, { config: n5, env: o3 }) { + const i2 = o3?.log || console.log, t3 = { name: "demo", ...n5?.settings }, s3 = t3.values ? function(e6, n6) { const o4 = {}; - for (const i3 of n5) { - const n6 = i3.split(".").reduce((e7, n7) => e7?.[n7], e6); - void 0 !== n6 && (o4[i3] = n6); + for (const i3 of n6) { + const n7 = i3.split(".").reduce((e7, n8) => e7?.[n8], e6); + void 0 !== n7 && (o4[i3] = n7); } return o4; - }(e5, t4.values) : e5; - i2(`[${t4.name}] ${JSON.stringify(s3, null, 2)}`); + }(e5, t3.values) : e5; + i2(`[${t3.name}] ${JSON.stringify(s3, null, 2)}`); } }; // entry.js @@ -2061,7 +13322,7 @@ async function entry_default(context = {}) { const __simulationTracker = tracker; const window = typeof globalThis.window !== "undefined" ? globalThis.window : void 0; const document2 = typeof globalThis.document !== "undefined" ? globalThis.document : void 0; - const config = { + const config2 = { sources: { http: { code: p, @@ -2101,7 +13362,7 @@ async function entry_default(context = {}) { } } }; - const result = await T2(config); + const result = await T2(config2); return result; } export { diff --git a/packages/docker/demos/demo-serve.js b/packages/docker/demos/demo-serve.js new file mode 100644 index 000000000..b0fc02ea7 --- /dev/null +++ b/packages/docker/demos/demo-serve.js @@ -0,0 +1,17879 @@ +var walkerOS = (() => { + var Ti = Object.defineProperty; + var Tm = Object.getOwnPropertyDescriptor; + var Cm = Object.getOwnPropertyNames; + var Am = Object.prototype.hasOwnProperty; + var lo = (e, t) => { + for (var i in t) Ti(e, i, { get: t[i], enumerable: !0 }); + }, + Zm = (e, t, i, n) => { + if ((t && typeof t == 'object') || typeof t == 'function') + for (let r of Cm(t)) + !Am.call(e, r) && + r !== i && + Ti(e, r, { + get: () => t[r], + enumerable: !(n = Tm(t, r)) || n.enumerable, + }); + return e; + }; + var Rm = (e) => Zm(Ti({}, '__esModule', { value: !0 }), e); + var T$ = {}; + lo(T$, { default: () => D$ }); + var d = {}; + lo(d, { + BRAND: () => dp, + DIRTY: () => qe, + EMPTY_PATH: () => Vm, + INVALID: () => z, + NEVER: () => Kp, + OK: () => Y, + ParseStatus: () => X, + Schema: () => Z, + ZodAny: () => Ze, + ZodArray: () => Ue, + ZodBigInt: () => Ge, + ZodBoolean: () => Ke, + ZodBranded: () => qt, + ZodCatch: () => ot, + ZodDate: () => He, + ZodDefault: () => at, + ZodDiscriminatedUnion: () => On, + ZodEffects: () => me, + ZodEnum: () => it, + ZodError: () => re, + ZodFirstPartyTypeKind: () => U, + ZodFunction: () => Nn, + ZodIntersection: () => et, + ZodIssueCode: () => b, + ZodLazy: () => tt, + ZodLiteral: () => nt, + ZodMap: () => Pt, + ZodNaN: () => Dt, + ZodNativeEnum: () => rt, + ZodNever: () => he, + ZodNull: () => Ye, + ZodNullable: () => Ie, + ZodNumber: () => Be, + ZodObject: () => ae, + ZodOptional: () => le, + ZodParsedType: () => x, + ZodPipeline: () => Bt, + ZodPromise: () => Re, + ZodReadonly: () => st, + ZodRecord: () => zn, + ZodSchema: () => Z, + ZodSet: () => Et, + ZodString: () => Ae, + ZodSymbol: () => Nt, + ZodTransformer: () => me, + ZodTuple: () => xe, + ZodType: () => Z, + ZodUndefined: () => Xe, + ZodUnion: () => Qe, + ZodUnknown: () => Ne, + ZodVoid: () => Ut, + addIssueToContext: () => S, + any: () => _p, + array: () => Sp, + bigint: () => vp, + boolean: () => ko, + coerce: () => Gp, + custom: () => yo, + date: () => gp, + datetimeRegex: () => ho, + defaultErrorMap: () => Oe, + discriminatedUnion: () => Op, + effect: () => Lp, + enum: () => Ap, + function: () => Dp, + getErrorMap: () => jt, + getParsedType: () => Se, + instanceof: () => pp, + intersection: () => zp, + isAborted: () => In, + isAsync: () => Ot, + isDirty: () => jn, + isValid: () => Ce, + late: () => mp, + lazy: () => Tp, + literal: () => Cp, + makeIssue: () => Wt, + map: () => Pp, + nan: () => fp, + nativeEnum: () => Zp, + never: () => kp, + null: () => yp, + nullable: () => Mp, + number: () => $o, + object: () => xp, + objectUtil: () => Ci, + oboolean: () => Bp, + onumber: () => qp, + optional: () => Jp, + ostring: () => Wp, + pipeline: () => Fp, + preprocess: () => Vp, + promise: () => Rp, + quotelessJson: () => Lm, + record: () => Up, + set: () => Ep, + setErrorMap: () => Mm, + strictObject: () => Ip, + string: () => _o, + symbol: () => hp, + transformer: () => Lp, + tuple: () => Np, + undefined: () => bp, + union: () => jp, + unknown: () => $p, + util: () => L, + void: () => wp, + }); + var L; + (function (e) { + e.assertEqual = (r) => {}; + function t(r) {} + e.assertIs = t; + function i(r) { + throw new Error(); + } + ((e.assertNever = i), + (e.arrayToEnum = (r) => { + let o = {}; + for (let s of r) o[s] = s; + return o; + }), + (e.getValidEnumValues = (r) => { + let o = e.objectKeys(r).filter((u) => typeof r[r[u]] != 'number'), + s = {}; + for (let u of o) s[u] = r[u]; + return e.objectValues(s); + }), + (e.objectValues = (r) => + e.objectKeys(r).map(function (o) { + return r[o]; + })), + (e.objectKeys = + typeof Object.keys == 'function' + ? (r) => Object.keys(r) + : (r) => { + let o = []; + for (let s in r) + Object.prototype.hasOwnProperty.call(r, s) && o.push(s); + return o; + }), + (e.find = (r, o) => { + for (let s of r) if (o(s)) return s; + }), + (e.isInteger = + typeof Number.isInteger == 'function' + ? (r) => Number.isInteger(r) + : (r) => + typeof r == 'number' && + Number.isFinite(r) && + Math.floor(r) === r)); + function n(r, o = ' | ') { + return r.map((s) => (typeof s == 'string' ? `'${s}'` : s)).join(o); + } + ((e.joinValues = n), + (e.jsonStringifyReplacer = (r, o) => + typeof o == 'bigint' ? o.toString() : o)); + })(L || (L = {})); + var Ci; + (function (e) { + e.mergeShapes = (t, i) => ({ ...t, ...i }); + })(Ci || (Ci = {})); + var x = L.arrayToEnum([ + 'string', + 'nan', + 'number', + 'integer', + 'float', + 'boolean', + 'date', + 'bigint', + 'symbol', + 'function', + 'undefined', + 'null', + 'array', + 'object', + 'unknown', + 'promise', + 'void', + 'never', + 'map', + 'set', + ]), + Se = (e) => { + switch (typeof e) { + case 'undefined': + return x.undefined; + case 'string': + return x.string; + case 'number': + return Number.isNaN(e) ? x.nan : x.number; + case 'boolean': + return x.boolean; + case 'function': + return x.function; + case 'bigint': + return x.bigint; + case 'symbol': + return x.symbol; + case 'object': + return Array.isArray(e) + ? x.array + : e === null + ? x.null + : e.then && + typeof e.then == 'function' && + e.catch && + typeof e.catch == 'function' + ? x.promise + : typeof Map < 'u' && e instanceof Map + ? x.map + : typeof Set < 'u' && e instanceof Set + ? x.set + : typeof Date < 'u' && e instanceof Date + ? x.date + : x.object; + default: + return x.unknown; + } + }; + var b = L.arrayToEnum([ + 'invalid_type', + 'invalid_literal', + 'custom', + 'invalid_union', + 'invalid_union_discriminator', + 'invalid_enum_value', + 'unrecognized_keys', + 'invalid_arguments', + 'invalid_return_type', + 'invalid_date', + 'invalid_string', + 'too_small', + 'too_big', + 'invalid_intersection_types', + 'not_multiple_of', + 'not_finite', + ]), + Lm = (e) => JSON.stringify(e, null, 2).replace(/"([^"]+)":/g, '$1:'), + re = class e extends Error { + get errors() { + return this.issues; + } + constructor(t) { + (super(), + (this.issues = []), + (this.addIssue = (n) => { + this.issues = [...this.issues, n]; + }), + (this.addIssues = (n = []) => { + this.issues = [...this.issues, ...n]; + })); + let i = new.target.prototype; + (Object.setPrototypeOf + ? Object.setPrototypeOf(this, i) + : (this.__proto__ = i), + (this.name = 'ZodError'), + (this.issues = t)); + } + format(t) { + let i = + t || + function (o) { + return o.message; + }, + n = { _errors: [] }, + r = (o) => { + for (let s of o.issues) + if (s.code === 'invalid_union') s.unionErrors.map(r); + else if (s.code === 'invalid_return_type') r(s.returnTypeError); + else if (s.code === 'invalid_arguments') r(s.argumentsError); + else if (s.path.length === 0) n._errors.push(i(s)); + else { + let u = n, + a = 0; + for (; a < s.path.length; ) { + let c = s.path[a]; + (a === s.path.length - 1 + ? ((u[c] = u[c] || { _errors: [] }), + u[c]._errors.push(i(s))) + : (u[c] = u[c] || { _errors: [] }), + (u = u[c]), + a++); + } + } + }; + return (r(this), n); + } + static assert(t) { + if (!(t instanceof e)) throw new Error(`Not a ZodError: ${t}`); + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, L.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(t = (i) => i.message) { + let i = {}, + n = []; + for (let r of this.issues) + if (r.path.length > 0) { + let o = r.path[0]; + ((i[o] = i[o] || []), i[o].push(t(r))); + } else n.push(t(r)); + return { formErrors: n, fieldErrors: i }; + } + get formErrors() { + return this.flatten(); + } + }; + re.create = (e) => new re(e); + var Jm = (e, t) => { + let i; + switch (e.code) { + case b.invalid_type: + e.received === x.undefined + ? (i = 'Required') + : (i = `Expected ${e.expected}, received ${e.received}`); + break; + case b.invalid_literal: + i = `Invalid literal value, expected ${JSON.stringify(e.expected, L.jsonStringifyReplacer)}`; + break; + case b.unrecognized_keys: + i = `Unrecognized key(s) in object: ${L.joinValues(e.keys, ', ')}`; + break; + case b.invalid_union: + i = 'Invalid input'; + break; + case b.invalid_union_discriminator: + i = `Invalid discriminator value. Expected ${L.joinValues(e.options)}`; + break; + case b.invalid_enum_value: + i = `Invalid enum value. Expected ${L.joinValues(e.options)}, received '${e.received}'`; + break; + case b.invalid_arguments: + i = 'Invalid function arguments'; + break; + case b.invalid_return_type: + i = 'Invalid function return type'; + break; + case b.invalid_date: + i = 'Invalid date'; + break; + case b.invalid_string: + typeof e.validation == 'object' + ? 'includes' in e.validation + ? ((i = `Invalid input: must include "${e.validation.includes}"`), + typeof e.validation.position == 'number' && + (i = `${i} at one or more positions greater than or equal to ${e.validation.position}`)) + : 'startsWith' in e.validation + ? (i = `Invalid input: must start with "${e.validation.startsWith}"`) + : 'endsWith' in e.validation + ? (i = `Invalid input: must end with "${e.validation.endsWith}"`) + : L.assertNever(e.validation) + : e.validation !== 'regex' + ? (i = `Invalid ${e.validation}`) + : (i = 'Invalid'); + break; + case b.too_small: + e.type === 'array' + ? (i = `Array must contain ${e.exact ? 'exactly' : e.inclusive ? 'at least' : 'more than'} ${e.minimum} element(s)`) + : e.type === 'string' + ? (i = `String must contain ${e.exact ? 'exactly' : e.inclusive ? 'at least' : 'over'} ${e.minimum} character(s)`) + : e.type === 'number' + ? (i = `Number must be ${e.exact ? 'exactly equal to ' : e.inclusive ? 'greater than or equal to ' : 'greater than '}${e.minimum}`) + : e.type === 'bigint' + ? (i = `Number must be ${e.exact ? 'exactly equal to ' : e.inclusive ? 'greater than or equal to ' : 'greater than '}${e.minimum}`) + : e.type === 'date' + ? (i = `Date must be ${e.exact ? 'exactly equal to ' : e.inclusive ? 'greater than or equal to ' : 'greater than '}${new Date(Number(e.minimum))}`) + : (i = 'Invalid input'); + break; + case b.too_big: + e.type === 'array' + ? (i = `Array must contain ${e.exact ? 'exactly' : e.inclusive ? 'at most' : 'less than'} ${e.maximum} element(s)`) + : e.type === 'string' + ? (i = `String must contain ${e.exact ? 'exactly' : e.inclusive ? 'at most' : 'under'} ${e.maximum} character(s)`) + : e.type === 'number' + ? (i = `Number must be ${e.exact ? 'exactly' : e.inclusive ? 'less than or equal to' : 'less than'} ${e.maximum}`) + : e.type === 'bigint' + ? (i = `BigInt must be ${e.exact ? 'exactly' : e.inclusive ? 'less than or equal to' : 'less than'} ${e.maximum}`) + : e.type === 'date' + ? (i = `Date must be ${e.exact ? 'exactly' : e.inclusive ? 'smaller than or equal to' : 'smaller than'} ${new Date(Number(e.maximum))}`) + : (i = 'Invalid input'); + break; + case b.custom: + i = 'Invalid input'; + break; + case b.invalid_intersection_types: + i = 'Intersection results could not be merged'; + break; + case b.not_multiple_of: + i = `Number must be a multiple of ${e.multipleOf}`; + break; + case b.not_finite: + i = 'Number must be finite'; + break; + default: + ((i = t.defaultError), L.assertNever(e)); + } + return { message: i }; + }, + Oe = Jm; + var mo = Oe; + function Mm(e) { + mo = e; + } + function jt() { + return mo; + } + var Wt = (e) => { + let { data: t, path: i, errorMaps: n, issueData: r } = e, + o = [...i, ...(r.path || [])], + s = { ...r, path: o }; + if (r.message !== void 0) return { ...r, path: o, message: r.message }; + let u = '', + a = n + .filter((c) => !!c) + .slice() + .reverse(); + for (let c of a) u = c(s, { data: t, defaultError: u }).message; + return { ...r, path: o, message: u }; + }, + Vm = []; + function S(e, t) { + let i = jt(), + n = Wt({ + issueData: t, + data: e.data, + path: e.path, + errorMaps: [ + e.common.contextualErrorMap, + e.schemaErrorMap, + i, + i === Oe ? void 0 : Oe, + ].filter((r) => !!r), + }); + e.common.issues.push(n); + } + var X = class e { + constructor() { + this.value = 'valid'; + } + dirty() { + this.value === 'valid' && (this.value = 'dirty'); + } + abort() { + this.value !== 'aborted' && (this.value = 'aborted'); + } + static mergeArray(t, i) { + let n = []; + for (let r of i) { + if (r.status === 'aborted') return z; + (r.status === 'dirty' && t.dirty(), n.push(r.value)); + } + return { status: t.value, value: n }; + } + static async mergeObjectAsync(t, i) { + let n = []; + for (let r of i) { + let o = await r.key, + s = await r.value; + n.push({ key: o, value: s }); + } + return e.mergeObjectSync(t, n); + } + static mergeObjectSync(t, i) { + let n = {}; + for (let r of i) { + let { key: o, value: s } = r; + if (o.status === 'aborted' || s.status === 'aborted') return z; + (o.status === 'dirty' && t.dirty(), + s.status === 'dirty' && t.dirty(), + o.value !== '__proto__' && + (typeof s.value < 'u' || r.alwaysSet) && + (n[o.value] = s.value)); + } + return { status: t.value, value: n }; + } + }, + z = Object.freeze({ status: 'aborted' }), + qe = (e) => ({ status: 'dirty', value: e }), + Y = (e) => ({ status: 'valid', value: e }), + In = (e) => e.status === 'aborted', + jn = (e) => e.status === 'dirty', + Ce = (e) => e.status === 'valid', + Ot = (e) => typeof Promise < 'u' && e instanceof Promise; + var O; + (function (e) { + ((e.errToObj = (t) => (typeof t == 'string' ? { message: t } : t || {})), + (e.toString = (t) => (typeof t == 'string' ? t : t?.message))); + })(O || (O = {})); + var de = class { + constructor(t, i, n, r) { + ((this._cachedPath = []), + (this.parent = t), + (this.data = i), + (this._path = n), + (this._key = r)); + } + get path() { + return ( + this._cachedPath.length || + (Array.isArray(this._key) + ? this._cachedPath.push(...this._path, ...this._key) + : this._cachedPath.push(...this._path, this._key)), + this._cachedPath + ); + } + }, + po = (e, t) => { + if (Ce(t)) return { success: !0, data: t.value }; + if (!e.common.issues.length) + throw new Error('Validation failed but no issues detected.'); + return { + success: !1, + get error() { + if (this._error) return this._error; + let i = new re(e.common.issues); + return ((this._error = i), this._error); + }, + }; + }; + function A(e) { + if (!e) return {}; + let { + errorMap: t, + invalid_type_error: i, + required_error: n, + description: r, + } = e; + if (t && (i || n)) + throw new Error( + `Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`, + ); + return t + ? { errorMap: t, description: r } + : { + errorMap: (s, u) => { + let { message: a } = e; + return s.code === 'invalid_enum_value' + ? { message: a ?? u.defaultError } + : typeof u.data > 'u' + ? { message: a ?? n ?? u.defaultError } + : s.code !== 'invalid_type' + ? { message: u.defaultError } + : { message: a ?? i ?? u.defaultError }; + }, + description: r, + }; + } + var Z = class { + get description() { + return this._def.description; + } + _getType(t) { + return Se(t.data); + } + _getOrReturnCtx(t, i) { + return ( + i || { + common: t.parent.common, + data: t.data, + parsedType: Se(t.data), + schemaErrorMap: this._def.errorMap, + path: t.path, + parent: t.parent, + } + ); + } + _processInputParams(t) { + return { + status: new X(), + ctx: { + common: t.parent.common, + data: t.data, + parsedType: Se(t.data), + schemaErrorMap: this._def.errorMap, + path: t.path, + parent: t.parent, + }, + }; + } + _parseSync(t) { + let i = this._parse(t); + if (Ot(i)) throw new Error('Synchronous parse encountered promise.'); + return i; + } + _parseAsync(t) { + let i = this._parse(t); + return Promise.resolve(i); + } + parse(t, i) { + let n = this.safeParse(t, i); + if (n.success) return n.data; + throw n.error; + } + safeParse(t, i) { + let n = { + common: { + issues: [], + async: i?.async ?? !1, + contextualErrorMap: i?.errorMap, + }, + path: i?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data: t, + parsedType: Se(t), + }, + r = this._parseSync({ data: t, path: n.path, parent: n }); + return po(n, r); + } + '~validate'(t) { + let i = { + common: { issues: [], async: !!this['~standard'].async }, + path: [], + schemaErrorMap: this._def.errorMap, + parent: null, + data: t, + parsedType: Se(t), + }; + if (!this['~standard'].async) + try { + let n = this._parseSync({ data: t, path: [], parent: i }); + return Ce(n) ? { value: n.value } : { issues: i.common.issues }; + } catch (n) { + (n?.message?.toLowerCase()?.includes('encountered') && + (this['~standard'].async = !0), + (i.common = { issues: [], async: !0 })); + } + return this._parseAsync({ data: t, path: [], parent: i }).then((n) => + Ce(n) ? { value: n.value } : { issues: i.common.issues }, + ); + } + async parseAsync(t, i) { + let n = await this.safeParseAsync(t, i); + if (n.success) return n.data; + throw n.error; + } + async safeParseAsync(t, i) { + let n = { + common: { issues: [], contextualErrorMap: i?.errorMap, async: !0 }, + path: i?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data: t, + parsedType: Se(t), + }, + r = this._parse({ data: t, path: n.path, parent: n }), + o = await (Ot(r) ? r : Promise.resolve(r)); + return po(n, o); + } + refine(t, i) { + let n = (r) => + typeof i == 'string' || typeof i > 'u' + ? { message: i } + : typeof i == 'function' + ? i(r) + : i; + return this._refinement((r, o) => { + let s = t(r), + u = () => o.addIssue({ code: b.custom, ...n(r) }); + return typeof Promise < 'u' && s instanceof Promise + ? s.then((a) => (a ? !0 : (u(), !1))) + : s + ? !0 + : (u(), !1); + }); + } + refinement(t, i) { + return this._refinement((n, r) => + t(n) ? !0 : (r.addIssue(typeof i == 'function' ? i(n, r) : i), !1), + ); + } + _refinement(t) { + return new me({ + schema: this, + typeName: U.ZodEffects, + effect: { type: 'refinement', refinement: t }, + }); + } + superRefine(t) { + return this._refinement(t); + } + constructor(t) { + ((this.spa = this.safeParseAsync), + (this._def = t), + (this.parse = this.parse.bind(this)), + (this.safeParse = this.safeParse.bind(this)), + (this.parseAsync = this.parseAsync.bind(this)), + (this.safeParseAsync = this.safeParseAsync.bind(this)), + (this.spa = this.spa.bind(this)), + (this.refine = this.refine.bind(this)), + (this.refinement = this.refinement.bind(this)), + (this.superRefine = this.superRefine.bind(this)), + (this.optional = this.optional.bind(this)), + (this.nullable = this.nullable.bind(this)), + (this.nullish = this.nullish.bind(this)), + (this.array = this.array.bind(this)), + (this.promise = this.promise.bind(this)), + (this.or = this.or.bind(this)), + (this.and = this.and.bind(this)), + (this.transform = this.transform.bind(this)), + (this.brand = this.brand.bind(this)), + (this.default = this.default.bind(this)), + (this.catch = this.catch.bind(this)), + (this.describe = this.describe.bind(this)), + (this.pipe = this.pipe.bind(this)), + (this.readonly = this.readonly.bind(this)), + (this.isNullable = this.isNullable.bind(this)), + (this.isOptional = this.isOptional.bind(this)), + (this['~standard'] = { + version: 1, + vendor: 'zod', + validate: (i) => this['~validate'](i), + })); + } + optional() { + return le.create(this, this._def); + } + nullable() { + return Ie.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return Ue.create(this); + } + promise() { + return Re.create(this, this._def); + } + or(t) { + return Qe.create([this, t], this._def); + } + and(t) { + return et.create(this, t, this._def); + } + transform(t) { + return new me({ + ...A(this._def), + schema: this, + typeName: U.ZodEffects, + effect: { type: 'transform', transform: t }, + }); + } + default(t) { + let i = typeof t == 'function' ? t : () => t; + return new at({ + ...A(this._def), + innerType: this, + defaultValue: i, + typeName: U.ZodDefault, + }); + } + brand() { + return new qt({ typeName: U.ZodBranded, type: this, ...A(this._def) }); + } + catch(t) { + let i = typeof t == 'function' ? t : () => t; + return new ot({ + ...A(this._def), + innerType: this, + catchValue: i, + typeName: U.ZodCatch, + }); + } + describe(t) { + let i = this.constructor; + return new i({ ...this._def, description: t }); + } + pipe(t) { + return Bt.create(this, t); + } + readonly() { + return st.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } + }, + Fm = /^c[^\s-]{8,}$/i, + Wm = /^[0-9a-z]+$/, + qm = /^[0-9A-HJKMNP-TV-Z]{26}$/i, + Bm = + /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, + Gm = /^[a-z0-9_-]{21}$/i, + Km = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, + Hm = + /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, + Xm = + /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, + Ym = '^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$', + Ai, + Qm = + /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, + ep = + /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, + tp = + /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, + np = + /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, + ip = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, + rp = + /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, + vo = + '((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))', + ap = new RegExp(`^${vo}$`); + function go(e) { + let t = '[0-5]\\d'; + e.precision + ? (t = `${t}\\.\\d{${e.precision}}`) + : e.precision == null && (t = `${t}(\\.\\d+)?`); + let i = e.precision ? '+' : '?'; + return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${i}`; + } + function op(e) { + return new RegExp(`^${go(e)}$`); + } + function ho(e) { + let t = `${vo}T${go(e)}`, + i = []; + return ( + i.push(e.local ? 'Z?' : 'Z'), + e.offset && i.push('([+-]\\d{2}:?\\d{2})'), + (t = `${t}(${i.join('|')})`), + new RegExp(`^${t}$`) + ); + } + function sp(e, t) { + return !!( + ((t === 'v4' || !t) && Qm.test(e)) || + ((t === 'v6' || !t) && tp.test(e)) + ); + } + function up(e, t) { + if (!Km.test(e)) return !1; + try { + let [i] = e.split('.'); + if (!i) return !1; + let n = i + .replace(/-/g, '+') + .replace(/_/g, '/') + .padEnd(i.length + ((4 - (i.length % 4)) % 4), '='), + r = JSON.parse(atob(n)); + return !( + typeof r != 'object' || + r === null || + ('typ' in r && r?.typ !== 'JWT') || + !r.alg || + (t && r.alg !== t) + ); + } catch { + return !1; + } + } + function cp(e, t) { + return !!( + ((t === 'v4' || !t) && ep.test(e)) || + ((t === 'v6' || !t) && np.test(e)) + ); + } + var Ae = class e extends Z { + _parse(t) { + if ( + (this._def.coerce && (t.data = String(t.data)), + this._getType(t) !== x.string) + ) { + let o = this._getOrReturnCtx(t); + return ( + S(o, { + code: b.invalid_type, + expected: x.string, + received: o.parsedType, + }), + z + ); + } + let n = new X(), + r; + for (let o of this._def.checks) + if (o.kind === 'min') + t.data.length < o.value && + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.too_small, + minimum: o.value, + type: 'string', + inclusive: !0, + exact: !1, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'max') + t.data.length > o.value && + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.too_big, + maximum: o.value, + type: 'string', + inclusive: !0, + exact: !1, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'length') { + let s = t.data.length > o.value, + u = t.data.length < o.value; + (s || u) && + ((r = this._getOrReturnCtx(t, r)), + s + ? S(r, { + code: b.too_big, + maximum: o.value, + type: 'string', + inclusive: !0, + exact: !0, + message: o.message, + }) + : u && + S(r, { + code: b.too_small, + minimum: o.value, + type: 'string', + inclusive: !0, + exact: !0, + message: o.message, + }), + n.dirty()); + } else if (o.kind === 'email') + Xm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'email', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'emoji') + (Ai || (Ai = new RegExp(Ym, 'u')), + Ai.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'emoji', + code: b.invalid_string, + message: o.message, + }), + n.dirty())); + else if (o.kind === 'uuid') + Bm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'uuid', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'nanoid') + Gm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'nanoid', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'cuid') + Fm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'cuid', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'cuid2') + Wm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'cuid2', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'ulid') + qm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'ulid', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + else if (o.kind === 'url') + try { + new URL(t.data); + } catch { + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'url', + code: b.invalid_string, + message: o.message, + }), + n.dirty()); + } + else + o.kind === 'regex' + ? ((o.regex.lastIndex = 0), + o.regex.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'regex', + code: b.invalid_string, + message: o.message, + }), + n.dirty())) + : o.kind === 'trim' + ? (t.data = t.data.trim()) + : o.kind === 'includes' + ? t.data.includes(o.value, o.position) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: { includes: o.value, position: o.position }, + message: o.message, + }), + n.dirty()) + : o.kind === 'toLowerCase' + ? (t.data = t.data.toLowerCase()) + : o.kind === 'toUpperCase' + ? (t.data = t.data.toUpperCase()) + : o.kind === 'startsWith' + ? t.data.startsWith(o.value) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: { startsWith: o.value }, + message: o.message, + }), + n.dirty()) + : o.kind === 'endsWith' + ? t.data.endsWith(o.value) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: { endsWith: o.value }, + message: o.message, + }), + n.dirty()) + : o.kind === 'datetime' + ? ho(o).test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: 'datetime', + message: o.message, + }), + n.dirty()) + : o.kind === 'date' + ? ap.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: 'date', + message: o.message, + }), + n.dirty()) + : o.kind === 'time' + ? op(o).test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.invalid_string, + validation: 'time', + message: o.message, + }), + n.dirty()) + : o.kind === 'duration' + ? Hm.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'duration', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : o.kind === 'ip' + ? sp(t.data, o.version) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'ip', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : o.kind === 'jwt' + ? up(t.data, o.alg) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'jwt', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : o.kind === 'cidr' + ? cp(t.data, o.version) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'cidr', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : o.kind === 'base64' + ? ip.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'base64', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : o.kind === 'base64url' + ? rp.test(t.data) || + ((r = this._getOrReturnCtx(t, r)), + S(r, { + validation: 'base64url', + code: b.invalid_string, + message: o.message, + }), + n.dirty()) + : L.assertNever(o); + return { status: n.value, value: t.data }; + } + _regex(t, i, n) { + return this.refinement((r) => t.test(r), { + validation: i, + code: b.invalid_string, + ...O.errToObj(n), + }); + } + _addCheck(t) { + return new e({ ...this._def, checks: [...this._def.checks, t] }); + } + email(t) { + return this._addCheck({ kind: 'email', ...O.errToObj(t) }); + } + url(t) { + return this._addCheck({ kind: 'url', ...O.errToObj(t) }); + } + emoji(t) { + return this._addCheck({ kind: 'emoji', ...O.errToObj(t) }); + } + uuid(t) { + return this._addCheck({ kind: 'uuid', ...O.errToObj(t) }); + } + nanoid(t) { + return this._addCheck({ kind: 'nanoid', ...O.errToObj(t) }); + } + cuid(t) { + return this._addCheck({ kind: 'cuid', ...O.errToObj(t) }); + } + cuid2(t) { + return this._addCheck({ kind: 'cuid2', ...O.errToObj(t) }); + } + ulid(t) { + return this._addCheck({ kind: 'ulid', ...O.errToObj(t) }); + } + base64(t) { + return this._addCheck({ kind: 'base64', ...O.errToObj(t) }); + } + base64url(t) { + return this._addCheck({ kind: 'base64url', ...O.errToObj(t) }); + } + jwt(t) { + return this._addCheck({ kind: 'jwt', ...O.errToObj(t) }); + } + ip(t) { + return this._addCheck({ kind: 'ip', ...O.errToObj(t) }); + } + cidr(t) { + return this._addCheck({ kind: 'cidr', ...O.errToObj(t) }); + } + datetime(t) { + return typeof t == 'string' + ? this._addCheck({ + kind: 'datetime', + precision: null, + offset: !1, + local: !1, + message: t, + }) + : this._addCheck({ + kind: 'datetime', + precision: typeof t?.precision > 'u' ? null : t?.precision, + offset: t?.offset ?? !1, + local: t?.local ?? !1, + ...O.errToObj(t?.message), + }); + } + date(t) { + return this._addCheck({ kind: 'date', message: t }); + } + time(t) { + return typeof t == 'string' + ? this._addCheck({ kind: 'time', precision: null, message: t }) + : this._addCheck({ + kind: 'time', + precision: typeof t?.precision > 'u' ? null : t?.precision, + ...O.errToObj(t?.message), + }); + } + duration(t) { + return this._addCheck({ kind: 'duration', ...O.errToObj(t) }); + } + regex(t, i) { + return this._addCheck({ kind: 'regex', regex: t, ...O.errToObj(i) }); + } + includes(t, i) { + return this._addCheck({ + kind: 'includes', + value: t, + position: i?.position, + ...O.errToObj(i?.message), + }); + } + startsWith(t, i) { + return this._addCheck({ kind: 'startsWith', value: t, ...O.errToObj(i) }); + } + endsWith(t, i) { + return this._addCheck({ kind: 'endsWith', value: t, ...O.errToObj(i) }); + } + min(t, i) { + return this._addCheck({ kind: 'min', value: t, ...O.errToObj(i) }); + } + max(t, i) { + return this._addCheck({ kind: 'max', value: t, ...O.errToObj(i) }); + } + length(t, i) { + return this._addCheck({ kind: 'length', value: t, ...O.errToObj(i) }); + } + nonempty(t) { + return this.min(1, O.errToObj(t)); + } + trim() { + return new e({ + ...this._def, + checks: [...this._def.checks, { kind: 'trim' }], + }); + } + toLowerCase() { + return new e({ + ...this._def, + checks: [...this._def.checks, { kind: 'toLowerCase' }], + }); + } + toUpperCase() { + return new e({ + ...this._def, + checks: [...this._def.checks, { kind: 'toUpperCase' }], + }); + } + get isDatetime() { + return !!this._def.checks.find((t) => t.kind === 'datetime'); + } + get isDate() { + return !!this._def.checks.find((t) => t.kind === 'date'); + } + get isTime() { + return !!this._def.checks.find((t) => t.kind === 'time'); + } + get isDuration() { + return !!this._def.checks.find((t) => t.kind === 'duration'); + } + get isEmail() { + return !!this._def.checks.find((t) => t.kind === 'email'); + } + get isURL() { + return !!this._def.checks.find((t) => t.kind === 'url'); + } + get isEmoji() { + return !!this._def.checks.find((t) => t.kind === 'emoji'); + } + get isUUID() { + return !!this._def.checks.find((t) => t.kind === 'uuid'); + } + get isNANOID() { + return !!this._def.checks.find((t) => t.kind === 'nanoid'); + } + get isCUID() { + return !!this._def.checks.find((t) => t.kind === 'cuid'); + } + get isCUID2() { + return !!this._def.checks.find((t) => t.kind === 'cuid2'); + } + get isULID() { + return !!this._def.checks.find((t) => t.kind === 'ulid'); + } + get isIP() { + return !!this._def.checks.find((t) => t.kind === 'ip'); + } + get isCIDR() { + return !!this._def.checks.find((t) => t.kind === 'cidr'); + } + get isBase64() { + return !!this._def.checks.find((t) => t.kind === 'base64'); + } + get isBase64url() { + return !!this._def.checks.find((t) => t.kind === 'base64url'); + } + get minLength() { + let t = null; + for (let i of this._def.checks) + i.kind === 'min' && (t === null || i.value > t) && (t = i.value); + return t; + } + get maxLength() { + let t = null; + for (let i of this._def.checks) + i.kind === 'max' && (t === null || i.value < t) && (t = i.value); + return t; + } + }; + Ae.create = (e) => + new Ae({ + checks: [], + typeName: U.ZodString, + coerce: e?.coerce ?? !1, + ...A(e), + }); + function lp(e, t) { + let i = (e.toString().split('.')[1] || '').length, + n = (t.toString().split('.')[1] || '').length, + r = i > n ? i : n, + o = Number.parseInt(e.toFixed(r).replace('.', '')), + s = Number.parseInt(t.toFixed(r).replace('.', '')); + return (o % s) / 10 ** r; + } + var Be = class e extends Z { + constructor() { + (super(...arguments), + (this.min = this.gte), + (this.max = this.lte), + (this.step = this.multipleOf)); + } + _parse(t) { + if ( + (this._def.coerce && (t.data = Number(t.data)), + this._getType(t) !== x.number) + ) { + let o = this._getOrReturnCtx(t); + return ( + S(o, { + code: b.invalid_type, + expected: x.number, + received: o.parsedType, + }), + z + ); + } + let n, + r = new X(); + for (let o of this._def.checks) + o.kind === 'int' + ? L.isInteger(t.data) || + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.invalid_type, + expected: 'integer', + received: 'float', + message: o.message, + }), + r.dirty()) + : o.kind === 'min' + ? (o.inclusive ? t.data < o.value : t.data <= o.value) && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.too_small, + minimum: o.value, + type: 'number', + inclusive: o.inclusive, + exact: !1, + message: o.message, + }), + r.dirty()) + : o.kind === 'max' + ? (o.inclusive ? t.data > o.value : t.data >= o.value) && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.too_big, + maximum: o.value, + type: 'number', + inclusive: o.inclusive, + exact: !1, + message: o.message, + }), + r.dirty()) + : o.kind === 'multipleOf' + ? lp(t.data, o.value) !== 0 && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.not_multiple_of, + multipleOf: o.value, + message: o.message, + }), + r.dirty()) + : o.kind === 'finite' + ? Number.isFinite(t.data) || + ((n = this._getOrReturnCtx(t, n)), + S(n, { code: b.not_finite, message: o.message }), + r.dirty()) + : L.assertNever(o); + return { status: r.value, value: t.data }; + } + gte(t, i) { + return this.setLimit('min', t, !0, O.toString(i)); + } + gt(t, i) { + return this.setLimit('min', t, !1, O.toString(i)); + } + lte(t, i) { + return this.setLimit('max', t, !0, O.toString(i)); + } + lt(t, i) { + return this.setLimit('max', t, !1, O.toString(i)); + } + setLimit(t, i, n, r) { + return new e({ + ...this._def, + checks: [ + ...this._def.checks, + { kind: t, value: i, inclusive: n, message: O.toString(r) }, + ], + }); + } + _addCheck(t) { + return new e({ ...this._def, checks: [...this._def.checks, t] }); + } + int(t) { + return this._addCheck({ kind: 'int', message: O.toString(t) }); + } + positive(t) { + return this._addCheck({ + kind: 'min', + value: 0, + inclusive: !1, + message: O.toString(t), + }); + } + negative(t) { + return this._addCheck({ + kind: 'max', + value: 0, + inclusive: !1, + message: O.toString(t), + }); + } + nonpositive(t) { + return this._addCheck({ + kind: 'max', + value: 0, + inclusive: !0, + message: O.toString(t), + }); + } + nonnegative(t) { + return this._addCheck({ + kind: 'min', + value: 0, + inclusive: !0, + message: O.toString(t), + }); + } + multipleOf(t, i) { + return this._addCheck({ + kind: 'multipleOf', + value: t, + message: O.toString(i), + }); + } + finite(t) { + return this._addCheck({ kind: 'finite', message: O.toString(t) }); + } + safe(t) { + return this._addCheck({ + kind: 'min', + inclusive: !0, + value: Number.MIN_SAFE_INTEGER, + message: O.toString(t), + })._addCheck({ + kind: 'max', + inclusive: !0, + value: Number.MAX_SAFE_INTEGER, + message: O.toString(t), + }); + } + get minValue() { + let t = null; + for (let i of this._def.checks) + i.kind === 'min' && (t === null || i.value > t) && (t = i.value); + return t; + } + get maxValue() { + let t = null; + for (let i of this._def.checks) + i.kind === 'max' && (t === null || i.value < t) && (t = i.value); + return t; + } + get isInt() { + return !!this._def.checks.find( + (t) => + t.kind === 'int' || (t.kind === 'multipleOf' && L.isInteger(t.value)), + ); + } + get isFinite() { + let t = null, + i = null; + for (let n of this._def.checks) { + if (n.kind === 'finite' || n.kind === 'int' || n.kind === 'multipleOf') + return !0; + n.kind === 'min' + ? (i === null || n.value > i) && (i = n.value) + : n.kind === 'max' && (t === null || n.value < t) && (t = n.value); + } + return Number.isFinite(i) && Number.isFinite(t); + } + }; + Be.create = (e) => + new Be({ + checks: [], + typeName: U.ZodNumber, + coerce: e?.coerce || !1, + ...A(e), + }); + var Ge = class e extends Z { + constructor() { + (super(...arguments), (this.min = this.gte), (this.max = this.lte)); + } + _parse(t) { + if (this._def.coerce) + try { + t.data = BigInt(t.data); + } catch { + return this._getInvalidInput(t); + } + if (this._getType(t) !== x.bigint) return this._getInvalidInput(t); + let n, + r = new X(); + for (let o of this._def.checks) + o.kind === 'min' + ? (o.inclusive ? t.data < o.value : t.data <= o.value) && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.too_small, + type: 'bigint', + minimum: o.value, + inclusive: o.inclusive, + message: o.message, + }), + r.dirty()) + : o.kind === 'max' + ? (o.inclusive ? t.data > o.value : t.data >= o.value) && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.too_big, + type: 'bigint', + maximum: o.value, + inclusive: o.inclusive, + message: o.message, + }), + r.dirty()) + : o.kind === 'multipleOf' + ? t.data % o.value !== BigInt(0) && + ((n = this._getOrReturnCtx(t, n)), + S(n, { + code: b.not_multiple_of, + multipleOf: o.value, + message: o.message, + }), + r.dirty()) + : L.assertNever(o); + return { status: r.value, value: t.data }; + } + _getInvalidInput(t) { + let i = this._getOrReturnCtx(t); + return ( + S(i, { + code: b.invalid_type, + expected: x.bigint, + received: i.parsedType, + }), + z + ); + } + gte(t, i) { + return this.setLimit('min', t, !0, O.toString(i)); + } + gt(t, i) { + return this.setLimit('min', t, !1, O.toString(i)); + } + lte(t, i) { + return this.setLimit('max', t, !0, O.toString(i)); + } + lt(t, i) { + return this.setLimit('max', t, !1, O.toString(i)); + } + setLimit(t, i, n, r) { + return new e({ + ...this._def, + checks: [ + ...this._def.checks, + { kind: t, value: i, inclusive: n, message: O.toString(r) }, + ], + }); + } + _addCheck(t) { + return new e({ ...this._def, checks: [...this._def.checks, t] }); + } + positive(t) { + return this._addCheck({ + kind: 'min', + value: BigInt(0), + inclusive: !1, + message: O.toString(t), + }); + } + negative(t) { + return this._addCheck({ + kind: 'max', + value: BigInt(0), + inclusive: !1, + message: O.toString(t), + }); + } + nonpositive(t) { + return this._addCheck({ + kind: 'max', + value: BigInt(0), + inclusive: !0, + message: O.toString(t), + }); + } + nonnegative(t) { + return this._addCheck({ + kind: 'min', + value: BigInt(0), + inclusive: !0, + message: O.toString(t), + }); + } + multipleOf(t, i) { + return this._addCheck({ + kind: 'multipleOf', + value: t, + message: O.toString(i), + }); + } + get minValue() { + let t = null; + for (let i of this._def.checks) + i.kind === 'min' && (t === null || i.value > t) && (t = i.value); + return t; + } + get maxValue() { + let t = null; + for (let i of this._def.checks) + i.kind === 'max' && (t === null || i.value < t) && (t = i.value); + return t; + } + }; + Ge.create = (e) => + new Ge({ + checks: [], + typeName: U.ZodBigInt, + coerce: e?.coerce ?? !1, + ...A(e), + }); + var Ke = class extends Z { + _parse(t) { + if ( + (this._def.coerce && (t.data = !!t.data), + this._getType(t) !== x.boolean) + ) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.boolean, + received: n.parsedType, + }), + z + ); + } + return Y(t.data); + } + }; + Ke.create = (e) => + new Ke({ typeName: U.ZodBoolean, coerce: e?.coerce || !1, ...A(e) }); + var He = class e extends Z { + _parse(t) { + if ( + (this._def.coerce && (t.data = new Date(t.data)), + this._getType(t) !== x.date) + ) { + let o = this._getOrReturnCtx(t); + return ( + S(o, { + code: b.invalid_type, + expected: x.date, + received: o.parsedType, + }), + z + ); + } + if (Number.isNaN(t.data.getTime())) { + let o = this._getOrReturnCtx(t); + return (S(o, { code: b.invalid_date }), z); + } + let n = new X(), + r; + for (let o of this._def.checks) + o.kind === 'min' + ? t.data.getTime() < o.value && + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.too_small, + message: o.message, + inclusive: !0, + exact: !1, + minimum: o.value, + type: 'date', + }), + n.dirty()) + : o.kind === 'max' + ? t.data.getTime() > o.value && + ((r = this._getOrReturnCtx(t, r)), + S(r, { + code: b.too_big, + message: o.message, + inclusive: !0, + exact: !1, + maximum: o.value, + type: 'date', + }), + n.dirty()) + : L.assertNever(o); + return { status: n.value, value: new Date(t.data.getTime()) }; + } + _addCheck(t) { + return new e({ ...this._def, checks: [...this._def.checks, t] }); + } + min(t, i) { + return this._addCheck({ + kind: 'min', + value: t.getTime(), + message: O.toString(i), + }); + } + max(t, i) { + return this._addCheck({ + kind: 'max', + value: t.getTime(), + message: O.toString(i), + }); + } + get minDate() { + let t = null; + for (let i of this._def.checks) + i.kind === 'min' && (t === null || i.value > t) && (t = i.value); + return t != null ? new Date(t) : null; + } + get maxDate() { + let t = null; + for (let i of this._def.checks) + i.kind === 'max' && (t === null || i.value < t) && (t = i.value); + return t != null ? new Date(t) : null; + } + }; + He.create = (e) => + new He({ + checks: [], + coerce: e?.coerce || !1, + typeName: U.ZodDate, + ...A(e), + }); + var Nt = class extends Z { + _parse(t) { + if (this._getType(t) !== x.symbol) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.symbol, + received: n.parsedType, + }), + z + ); + } + return Y(t.data); + } + }; + Nt.create = (e) => new Nt({ typeName: U.ZodSymbol, ...A(e) }); + var Xe = class extends Z { + _parse(t) { + if (this._getType(t) !== x.undefined) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.undefined, + received: n.parsedType, + }), + z + ); + } + return Y(t.data); + } + }; + Xe.create = (e) => new Xe({ typeName: U.ZodUndefined, ...A(e) }); + var Ye = class extends Z { + _parse(t) { + if (this._getType(t) !== x.null) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.null, + received: n.parsedType, + }), + z + ); + } + return Y(t.data); + } + }; + Ye.create = (e) => new Ye({ typeName: U.ZodNull, ...A(e) }); + var Ze = class extends Z { + constructor() { + (super(...arguments), (this._any = !0)); + } + _parse(t) { + return Y(t.data); + } + }; + Ze.create = (e) => new Ze({ typeName: U.ZodAny, ...A(e) }); + var Ne = class extends Z { + constructor() { + (super(...arguments), (this._unknown = !0)); + } + _parse(t) { + return Y(t.data); + } + }; + Ne.create = (e) => new Ne({ typeName: U.ZodUnknown, ...A(e) }); + var he = class extends Z { + _parse(t) { + let i = this._getOrReturnCtx(t); + return ( + S(i, { + code: b.invalid_type, + expected: x.never, + received: i.parsedType, + }), + z + ); + } + }; + he.create = (e) => new he({ typeName: U.ZodNever, ...A(e) }); + var Ut = class extends Z { + _parse(t) { + if (this._getType(t) !== x.undefined) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.void, + received: n.parsedType, + }), + z + ); + } + return Y(t.data); + } + }; + Ut.create = (e) => new Ut({ typeName: U.ZodVoid, ...A(e) }); + var Ue = class e extends Z { + _parse(t) { + let { ctx: i, status: n } = this._processInputParams(t), + r = this._def; + if (i.parsedType !== x.array) + return ( + S(i, { + code: b.invalid_type, + expected: x.array, + received: i.parsedType, + }), + z + ); + if (r.exactLength !== null) { + let s = i.data.length > r.exactLength.value, + u = i.data.length < r.exactLength.value; + (s || u) && + (S(i, { + code: s ? b.too_big : b.too_small, + minimum: u ? r.exactLength.value : void 0, + maximum: s ? r.exactLength.value : void 0, + type: 'array', + inclusive: !0, + exact: !0, + message: r.exactLength.message, + }), + n.dirty()); + } + if ( + (r.minLength !== null && + i.data.length < r.minLength.value && + (S(i, { + code: b.too_small, + minimum: r.minLength.value, + type: 'array', + inclusive: !0, + exact: !1, + message: r.minLength.message, + }), + n.dirty()), + r.maxLength !== null && + i.data.length > r.maxLength.value && + (S(i, { + code: b.too_big, + maximum: r.maxLength.value, + type: 'array', + inclusive: !0, + exact: !1, + message: r.maxLength.message, + }), + n.dirty()), + i.common.async) + ) + return Promise.all( + [...i.data].map((s, u) => + r.type._parseAsync(new de(i, s, i.path, u)), + ), + ).then((s) => X.mergeArray(n, s)); + let o = [...i.data].map((s, u) => + r.type._parseSync(new de(i, s, i.path, u)), + ); + return X.mergeArray(n, o); + } + get element() { + return this._def.type; + } + min(t, i) { + return new e({ + ...this._def, + minLength: { value: t, message: O.toString(i) }, + }); + } + max(t, i) { + return new e({ + ...this._def, + maxLength: { value: t, message: O.toString(i) }, + }); + } + length(t, i) { + return new e({ + ...this._def, + exactLength: { value: t, message: O.toString(i) }, + }); + } + nonempty(t) { + return this.min(1, t); + } + }; + Ue.create = (e, t) => + new Ue({ + type: e, + minLength: null, + maxLength: null, + exactLength: null, + typeName: U.ZodArray, + ...A(t), + }); + function zt(e) { + if (e instanceof ae) { + let t = {}; + for (let i in e.shape) { + let n = e.shape[i]; + t[i] = le.create(zt(n)); + } + return new ae({ ...e._def, shape: () => t }); + } else + return e instanceof Ue + ? new Ue({ ...e._def, type: zt(e.element) }) + : e instanceof le + ? le.create(zt(e.unwrap())) + : e instanceof Ie + ? Ie.create(zt(e.unwrap())) + : e instanceof xe + ? xe.create(e.items.map((t) => zt(t))) + : e; + } + var ae = class e extends Z { + constructor() { + (super(...arguments), + (this._cached = null), + (this.nonstrict = this.passthrough), + (this.augment = this.extend)); + } + _getCached() { + if (this._cached !== null) return this._cached; + let t = this._def.shape(), + i = L.objectKeys(t); + return ((this._cached = { shape: t, keys: i }), this._cached); + } + _parse(t) { + if (this._getType(t) !== x.object) { + let c = this._getOrReturnCtx(t); + return ( + S(c, { + code: b.invalid_type, + expected: x.object, + received: c.parsedType, + }), + z + ); + } + let { status: n, ctx: r } = this._processInputParams(t), + { shape: o, keys: s } = this._getCached(), + u = []; + if ( + !(this._def.catchall instanceof he && this._def.unknownKeys === 'strip') + ) + for (let c in r.data) s.includes(c) || u.push(c); + let a = []; + for (let c of s) { + let m = o[c], + p = r.data[c]; + a.push({ + key: { status: 'valid', value: c }, + value: m._parse(new de(r, p, r.path, c)), + alwaysSet: c in r.data, + }); + } + if (this._def.catchall instanceof he) { + let c = this._def.unknownKeys; + if (c === 'passthrough') + for (let m of u) + a.push({ + key: { status: 'valid', value: m }, + value: { status: 'valid', value: r.data[m] }, + }); + else if (c === 'strict') + u.length > 0 && + (S(r, { code: b.unrecognized_keys, keys: u }), n.dirty()); + else if (c !== 'strip') + throw new Error( + 'Internal ZodObject error: invalid unknownKeys value.', + ); + } else { + let c = this._def.catchall; + for (let m of u) { + let p = r.data[m]; + a.push({ + key: { status: 'valid', value: m }, + value: c._parse(new de(r, p, r.path, m)), + alwaysSet: m in r.data, + }); + } + } + return r.common.async + ? Promise.resolve() + .then(async () => { + let c = []; + for (let m of a) { + let p = await m.key, + f = await m.value; + c.push({ key: p, value: f, alwaysSet: m.alwaysSet }); + } + return c; + }) + .then((c) => X.mergeObjectSync(n, c)) + : X.mergeObjectSync(n, a); + } + get shape() { + return this._def.shape(); + } + strict(t) { + return ( + O.errToObj, + new e({ + ...this._def, + unknownKeys: 'strict', + ...(t !== void 0 + ? { + errorMap: (i, n) => { + let r = this._def.errorMap?.(i, n).message ?? n.defaultError; + return i.code === 'unrecognized_keys' + ? { message: O.errToObj(t).message ?? r } + : { message: r }; + }, + } + : {}), + }) + ); + } + strip() { + return new e({ ...this._def, unknownKeys: 'strip' }); + } + passthrough() { + return new e({ ...this._def, unknownKeys: 'passthrough' }); + } + extend(t) { + return new e({ + ...this._def, + shape: () => ({ ...this._def.shape(), ...t }), + }); + } + merge(t) { + return new e({ + unknownKeys: t._def.unknownKeys, + catchall: t._def.catchall, + shape: () => ({ ...this._def.shape(), ...t._def.shape() }), + typeName: U.ZodObject, + }); + } + setKey(t, i) { + return this.augment({ [t]: i }); + } + catchall(t) { + return new e({ ...this._def, catchall: t }); + } + pick(t) { + let i = {}; + for (let n of L.objectKeys(t)) + t[n] && this.shape[n] && (i[n] = this.shape[n]); + return new e({ ...this._def, shape: () => i }); + } + omit(t) { + let i = {}; + for (let n of L.objectKeys(this.shape)) t[n] || (i[n] = this.shape[n]); + return new e({ ...this._def, shape: () => i }); + } + deepPartial() { + return zt(this); + } + partial(t) { + let i = {}; + for (let n of L.objectKeys(this.shape)) { + let r = this.shape[n]; + t && !t[n] ? (i[n] = r) : (i[n] = r.optional()); + } + return new e({ ...this._def, shape: () => i }); + } + required(t) { + let i = {}; + for (let n of L.objectKeys(this.shape)) + if (t && !t[n]) i[n] = this.shape[n]; + else { + let o = this.shape[n]; + for (; o instanceof le; ) o = o._def.innerType; + i[n] = o; + } + return new e({ ...this._def, shape: () => i }); + } + keyof() { + return bo(L.objectKeys(this.shape)); + } + }; + ae.create = (e, t) => + new ae({ + shape: () => e, + unknownKeys: 'strip', + catchall: he.create(), + typeName: U.ZodObject, + ...A(t), + }); + ae.strictCreate = (e, t) => + new ae({ + shape: () => e, + unknownKeys: 'strict', + catchall: he.create(), + typeName: U.ZodObject, + ...A(t), + }); + ae.lazycreate = (e, t) => + new ae({ + shape: e, + unknownKeys: 'strip', + catchall: he.create(), + typeName: U.ZodObject, + ...A(t), + }); + var Qe = class extends Z { + _parse(t) { + let { ctx: i } = this._processInputParams(t), + n = this._def.options; + function r(o) { + for (let u of o) if (u.result.status === 'valid') return u.result; + for (let u of o) + if (u.result.status === 'dirty') + return (i.common.issues.push(...u.ctx.common.issues), u.result); + let s = o.map((u) => new re(u.ctx.common.issues)); + return (S(i, { code: b.invalid_union, unionErrors: s }), z); + } + if (i.common.async) + return Promise.all( + n.map(async (o) => { + let s = { ...i, common: { ...i.common, issues: [] }, parent: null }; + return { + result: await o._parseAsync({ + data: i.data, + path: i.path, + parent: s, + }), + ctx: s, + }; + }), + ).then(r); + { + let o, + s = []; + for (let a of n) { + let c = { ...i, common: { ...i.common, issues: [] }, parent: null }, + m = a._parseSync({ data: i.data, path: i.path, parent: c }); + if (m.status === 'valid') return m; + (m.status === 'dirty' && !o && (o = { result: m, ctx: c }), + c.common.issues.length && s.push(c.common.issues)); + } + if (o) return (i.common.issues.push(...o.ctx.common.issues), o.result); + let u = s.map((a) => new re(a)); + return (S(i, { code: b.invalid_union, unionErrors: u }), z); + } + } + get options() { + return this._def.options; + } + }; + Qe.create = (e, t) => new Qe({ options: e, typeName: U.ZodUnion, ...A(t) }); + var ze = (e) => + e instanceof tt + ? ze(e.schema) + : e instanceof me + ? ze(e.innerType()) + : e instanceof nt + ? [e.value] + : e instanceof it + ? e.options + : e instanceof rt + ? L.objectValues(e.enum) + : e instanceof at + ? ze(e._def.innerType) + : e instanceof Xe + ? [void 0] + : e instanceof Ye + ? [null] + : e instanceof le + ? [void 0, ...ze(e.unwrap())] + : e instanceof Ie + ? [null, ...ze(e.unwrap())] + : e instanceof qt || e instanceof st + ? ze(e.unwrap()) + : e instanceof ot + ? ze(e._def.innerType) + : [], + On = class e extends Z { + _parse(t) { + let { ctx: i } = this._processInputParams(t); + if (i.parsedType !== x.object) + return ( + S(i, { + code: b.invalid_type, + expected: x.object, + received: i.parsedType, + }), + z + ); + let n = this.discriminator, + r = i.data[n], + o = this.optionsMap.get(r); + return o + ? i.common.async + ? o._parseAsync({ data: i.data, path: i.path, parent: i }) + : o._parseSync({ data: i.data, path: i.path, parent: i }) + : (S(i, { + code: b.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [n], + }), + z); + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + static create(t, i, n) { + let r = new Map(); + for (let o of i) { + let s = ze(o.shape[t]); + if (!s.length) + throw new Error( + `A discriminator value for key \`${t}\` could not be extracted from all schema options`, + ); + for (let u of s) { + if (r.has(u)) + throw new Error( + `Discriminator property ${String(t)} has duplicate value ${String(u)}`, + ); + r.set(u, o); + } + } + return new e({ + typeName: U.ZodDiscriminatedUnion, + discriminator: t, + options: i, + optionsMap: r, + ...A(n), + }); + } + }; + function Zi(e, t) { + let i = Se(e), + n = Se(t); + if (e === t) return { valid: !0, data: e }; + if (i === x.object && n === x.object) { + let r = L.objectKeys(t), + o = L.objectKeys(e).filter((u) => r.indexOf(u) !== -1), + s = { ...e, ...t }; + for (let u of o) { + let a = Zi(e[u], t[u]); + if (!a.valid) return { valid: !1 }; + s[u] = a.data; + } + return { valid: !0, data: s }; + } else if (i === x.array && n === x.array) { + if (e.length !== t.length) return { valid: !1 }; + let r = []; + for (let o = 0; o < e.length; o++) { + let s = e[o], + u = t[o], + a = Zi(s, u); + if (!a.valid) return { valid: !1 }; + r.push(a.data); + } + return { valid: !0, data: r }; + } else + return i === x.date && n === x.date && +e == +t + ? { valid: !0, data: e } + : { valid: !1 }; + } + var et = class extends Z { + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t), + r = (o, s) => { + if (In(o) || In(s)) return z; + let u = Zi(o.value, s.value); + return u.valid + ? ((jn(o) || jn(s)) && i.dirty(), + { status: i.value, value: u.data }) + : (S(n, { code: b.invalid_intersection_types }), z); + }; + return n.common.async + ? Promise.all([ + this._def.left._parseAsync({ + data: n.data, + path: n.path, + parent: n, + }), + this._def.right._parseAsync({ + data: n.data, + path: n.path, + parent: n, + }), + ]).then(([o, s]) => r(o, s)) + : r( + this._def.left._parseSync({ + data: n.data, + path: n.path, + parent: n, + }), + this._def.right._parseSync({ + data: n.data, + path: n.path, + parent: n, + }), + ); + } + }; + et.create = (e, t, i) => + new et({ left: e, right: t, typeName: U.ZodIntersection, ...A(i) }); + var xe = class e extends Z { + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t); + if (n.parsedType !== x.array) + return ( + S(n, { + code: b.invalid_type, + expected: x.array, + received: n.parsedType, + }), + z + ); + if (n.data.length < this._def.items.length) + return ( + S(n, { + code: b.too_small, + minimum: this._def.items.length, + inclusive: !0, + exact: !1, + type: 'array', + }), + z + ); + !this._def.rest && + n.data.length > this._def.items.length && + (S(n, { + code: b.too_big, + maximum: this._def.items.length, + inclusive: !0, + exact: !1, + type: 'array', + }), + i.dirty()); + let o = [...n.data] + .map((s, u) => { + let a = this._def.items[u] || this._def.rest; + return a ? a._parse(new de(n, s, n.path, u)) : null; + }) + .filter((s) => !!s); + return n.common.async + ? Promise.all(o).then((s) => X.mergeArray(i, s)) + : X.mergeArray(i, o); + } + get items() { + return this._def.items; + } + rest(t) { + return new e({ ...this._def, rest: t }); + } + }; + xe.create = (e, t) => { + if (!Array.isArray(e)) + throw new Error('You must pass an array of schemas to z.tuple([ ... ])'); + return new xe({ items: e, typeName: U.ZodTuple, rest: null, ...A(t) }); + }; + var zn = class e extends Z { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t); + if (n.parsedType !== x.object) + return ( + S(n, { + code: b.invalid_type, + expected: x.object, + received: n.parsedType, + }), + z + ); + let r = [], + o = this._def.keyType, + s = this._def.valueType; + for (let u in n.data) + r.push({ + key: o._parse(new de(n, u, n.path, u)), + value: s._parse(new de(n, n.data[u], n.path, u)), + alwaysSet: u in n.data, + }); + return n.common.async + ? X.mergeObjectAsync(i, r) + : X.mergeObjectSync(i, r); + } + get element() { + return this._def.valueType; + } + static create(t, i, n) { + return i instanceof Z + ? new e({ keyType: t, valueType: i, typeName: U.ZodRecord, ...A(n) }) + : new e({ + keyType: Ae.create(), + valueType: t, + typeName: U.ZodRecord, + ...A(i), + }); + } + }, + Pt = class extends Z { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t); + if (n.parsedType !== x.map) + return ( + S(n, { + code: b.invalid_type, + expected: x.map, + received: n.parsedType, + }), + z + ); + let r = this._def.keyType, + o = this._def.valueType, + s = [...n.data.entries()].map(([u, a], c) => ({ + key: r._parse(new de(n, u, n.path, [c, 'key'])), + value: o._parse(new de(n, a, n.path, [c, 'value'])), + })); + if (n.common.async) { + let u = new Map(); + return Promise.resolve().then(async () => { + for (let a of s) { + let c = await a.key, + m = await a.value; + if (c.status === 'aborted' || m.status === 'aborted') return z; + ((c.status === 'dirty' || m.status === 'dirty') && i.dirty(), + u.set(c.value, m.value)); + } + return { status: i.value, value: u }; + }); + } else { + let u = new Map(); + for (let a of s) { + let c = a.key, + m = a.value; + if (c.status === 'aborted' || m.status === 'aborted') return z; + ((c.status === 'dirty' || m.status === 'dirty') && i.dirty(), + u.set(c.value, m.value)); + } + return { status: i.value, value: u }; + } + } + }; + Pt.create = (e, t, i) => + new Pt({ valueType: t, keyType: e, typeName: U.ZodMap, ...A(i) }); + var Et = class e extends Z { + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t); + if (n.parsedType !== x.set) + return ( + S(n, { + code: b.invalid_type, + expected: x.set, + received: n.parsedType, + }), + z + ); + let r = this._def; + (r.minSize !== null && + n.data.size < r.minSize.value && + (S(n, { + code: b.too_small, + minimum: r.minSize.value, + type: 'set', + inclusive: !0, + exact: !1, + message: r.minSize.message, + }), + i.dirty()), + r.maxSize !== null && + n.data.size > r.maxSize.value && + (S(n, { + code: b.too_big, + maximum: r.maxSize.value, + type: 'set', + inclusive: !0, + exact: !1, + message: r.maxSize.message, + }), + i.dirty())); + let o = this._def.valueType; + function s(a) { + let c = new Set(); + for (let m of a) { + if (m.status === 'aborted') return z; + (m.status === 'dirty' && i.dirty(), c.add(m.value)); + } + return { status: i.value, value: c }; + } + let u = [...n.data.values()].map((a, c) => + o._parse(new de(n, a, n.path, c)), + ); + return n.common.async ? Promise.all(u).then((a) => s(a)) : s(u); + } + min(t, i) { + return new e({ + ...this._def, + minSize: { value: t, message: O.toString(i) }, + }); + } + max(t, i) { + return new e({ + ...this._def, + maxSize: { value: t, message: O.toString(i) }, + }); + } + size(t, i) { + return this.min(t, i).max(t, i); + } + nonempty(t) { + return this.min(1, t); + } + }; + Et.create = (e, t) => + new Et({ + valueType: e, + minSize: null, + maxSize: null, + typeName: U.ZodSet, + ...A(t), + }); + var Nn = class e extends Z { + constructor() { + (super(...arguments), (this.validate = this.implement)); + } + _parse(t) { + let { ctx: i } = this._processInputParams(t); + if (i.parsedType !== x.function) + return ( + S(i, { + code: b.invalid_type, + expected: x.function, + received: i.parsedType, + }), + z + ); + function n(u, a) { + return Wt({ + data: u, + path: i.path, + errorMaps: [ + i.common.contextualErrorMap, + i.schemaErrorMap, + jt(), + Oe, + ].filter((c) => !!c), + issueData: { code: b.invalid_arguments, argumentsError: a }, + }); + } + function r(u, a) { + return Wt({ + data: u, + path: i.path, + errorMaps: [ + i.common.contextualErrorMap, + i.schemaErrorMap, + jt(), + Oe, + ].filter((c) => !!c), + issueData: { code: b.invalid_return_type, returnTypeError: a }, + }); + } + let o = { errorMap: i.common.contextualErrorMap }, + s = i.data; + if (this._def.returns instanceof Re) { + let u = this; + return Y(async function (...a) { + let c = new re([]), + m = await u._def.args.parseAsync(a, o).catch((h) => { + throw (c.addIssue(n(a, h)), c); + }), + p = await Reflect.apply(s, this, m); + return await u._def.returns._def.type + .parseAsync(p, o) + .catch((h) => { + throw (c.addIssue(r(p, h)), c); + }); + }); + } else { + let u = this; + return Y(function (...a) { + let c = u._def.args.safeParse(a, o); + if (!c.success) throw new re([n(a, c.error)]); + let m = Reflect.apply(s, this, c.data), + p = u._def.returns.safeParse(m, o); + if (!p.success) throw new re([r(m, p.error)]); + return p.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...t) { + return new e({ ...this._def, args: xe.create(t).rest(Ne.create()) }); + } + returns(t) { + return new e({ ...this._def, returns: t }); + } + implement(t) { + return this.parse(t); + } + strictImplement(t) { + return this.parse(t); + } + static create(t, i, n) { + return new e({ + args: t || xe.create([]).rest(Ne.create()), + returns: i || Ne.create(), + typeName: U.ZodFunction, + ...A(n), + }); + } + }, + tt = class extends Z { + get schema() { + return this._def.getter(); + } + _parse(t) { + let { ctx: i } = this._processInputParams(t); + return this._def + .getter() + ._parse({ data: i.data, path: i.path, parent: i }); + } + }; + tt.create = (e, t) => new tt({ getter: e, typeName: U.ZodLazy, ...A(t) }); + var nt = class extends Z { + _parse(t) { + if (t.data !== this._def.value) { + let i = this._getOrReturnCtx(t); + return ( + S(i, { + received: i.data, + code: b.invalid_literal, + expected: this._def.value, + }), + z + ); + } + return { status: 'valid', value: t.data }; + } + get value() { + return this._def.value; + } + }; + nt.create = (e, t) => new nt({ value: e, typeName: U.ZodLiteral, ...A(t) }); + function bo(e, t) { + return new it({ values: e, typeName: U.ZodEnum, ...A(t) }); + } + var it = class e extends Z { + _parse(t) { + if (typeof t.data != 'string') { + let i = this._getOrReturnCtx(t), + n = this._def.values; + return ( + S(i, { + expected: L.joinValues(n), + received: i.parsedType, + code: b.invalid_type, + }), + z + ); + } + if ( + (this._cache || (this._cache = new Set(this._def.values)), + !this._cache.has(t.data)) + ) { + let i = this._getOrReturnCtx(t), + n = this._def.values; + return ( + S(i, { received: i.data, code: b.invalid_enum_value, options: n }), + z + ); + } + return Y(t.data); + } + get options() { + return this._def.values; + } + get enum() { + let t = {}; + for (let i of this._def.values) t[i] = i; + return t; + } + get Values() { + let t = {}; + for (let i of this._def.values) t[i] = i; + return t; + } + get Enum() { + let t = {}; + for (let i of this._def.values) t[i] = i; + return t; + } + extract(t, i = this._def) { + return e.create(t, { ...this._def, ...i }); + } + exclude(t, i = this._def) { + return e.create( + this.options.filter((n) => !t.includes(n)), + { ...this._def, ...i }, + ); + } + }; + it.create = bo; + var rt = class extends Z { + _parse(t) { + let i = L.getValidEnumValues(this._def.values), + n = this._getOrReturnCtx(t); + if (n.parsedType !== x.string && n.parsedType !== x.number) { + let r = L.objectValues(i); + return ( + S(n, { + expected: L.joinValues(r), + received: n.parsedType, + code: b.invalid_type, + }), + z + ); + } + if ( + (this._cache || + (this._cache = new Set(L.getValidEnumValues(this._def.values))), + !this._cache.has(t.data)) + ) { + let r = L.objectValues(i); + return ( + S(n, { received: n.data, code: b.invalid_enum_value, options: r }), + z + ); + } + return Y(t.data); + } + get enum() { + return this._def.values; + } + }; + rt.create = (e, t) => + new rt({ values: e, typeName: U.ZodNativeEnum, ...A(t) }); + var Re = class extends Z { + unwrap() { + return this._def.type; + } + _parse(t) { + let { ctx: i } = this._processInputParams(t); + if (i.parsedType !== x.promise && i.common.async === !1) + return ( + S(i, { + code: b.invalid_type, + expected: x.promise, + received: i.parsedType, + }), + z + ); + let n = i.parsedType === x.promise ? i.data : Promise.resolve(i.data); + return Y( + n.then((r) => + this._def.type.parseAsync(r, { + path: i.path, + errorMap: i.common.contextualErrorMap, + }), + ), + ); + } + }; + Re.create = (e, t) => new Re({ type: e, typeName: U.ZodPromise, ...A(t) }); + var me = class extends Z { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === U.ZodEffects + ? this._def.schema.sourceType() + : this._def.schema; + } + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t), + r = this._def.effect || null, + o = { + addIssue: (s) => { + (S(n, s), s.fatal ? i.abort() : i.dirty()); + }, + get path() { + return n.path; + }, + }; + if (((o.addIssue = o.addIssue.bind(o)), r.type === 'preprocess')) { + let s = r.transform(n.data, o); + if (n.common.async) + return Promise.resolve(s).then(async (u) => { + if (i.value === 'aborted') return z; + let a = await this._def.schema._parseAsync({ + data: u, + path: n.path, + parent: n, + }); + return a.status === 'aborted' + ? z + : a.status === 'dirty' + ? qe(a.value) + : i.value === 'dirty' + ? qe(a.value) + : a; + }); + { + if (i.value === 'aborted') return z; + let u = this._def.schema._parseSync({ + data: s, + path: n.path, + parent: n, + }); + return u.status === 'aborted' + ? z + : u.status === 'dirty' + ? qe(u.value) + : i.value === 'dirty' + ? qe(u.value) + : u; + } + } + if (r.type === 'refinement') { + let s = (u) => { + let a = r.refinement(u, o); + if (n.common.async) return Promise.resolve(a); + if (a instanceof Promise) + throw new Error( + 'Async refinement encountered during synchronous parse operation. Use .parseAsync instead.', + ); + return u; + }; + if (n.common.async === !1) { + let u = this._def.schema._parseSync({ + data: n.data, + path: n.path, + parent: n, + }); + return u.status === 'aborted' + ? z + : (u.status === 'dirty' && i.dirty(), + s(u.value), + { status: i.value, value: u.value }); + } else + return this._def.schema + ._parseAsync({ data: n.data, path: n.path, parent: n }) + .then((u) => + u.status === 'aborted' + ? z + : (u.status === 'dirty' && i.dirty(), + s(u.value).then(() => ({ status: i.value, value: u.value }))), + ); + } + if (r.type === 'transform') + if (n.common.async === !1) { + let s = this._def.schema._parseSync({ + data: n.data, + path: n.path, + parent: n, + }); + if (!Ce(s)) return z; + let u = r.transform(s.value, o); + if (u instanceof Promise) + throw new Error( + 'Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.', + ); + return { status: i.value, value: u }; + } else + return this._def.schema + ._parseAsync({ data: n.data, path: n.path, parent: n }) + .then((s) => + Ce(s) + ? Promise.resolve(r.transform(s.value, o)).then((u) => ({ + status: i.value, + value: u, + })) + : z, + ); + L.assertNever(r); + } + }; + me.create = (e, t, i) => + new me({ schema: e, typeName: U.ZodEffects, effect: t, ...A(i) }); + me.createWithPreprocess = (e, t, i) => + new me({ + schema: t, + effect: { type: 'preprocess', transform: e }, + typeName: U.ZodEffects, + ...A(i), + }); + var le = class extends Z { + _parse(t) { + return this._getType(t) === x.undefined + ? Y(void 0) + : this._def.innerType._parse(t); + } + unwrap() { + return this._def.innerType; + } + }; + le.create = (e, t) => + new le({ innerType: e, typeName: U.ZodOptional, ...A(t) }); + var Ie = class extends Z { + _parse(t) { + return this._getType(t) === x.null + ? Y(null) + : this._def.innerType._parse(t); + } + unwrap() { + return this._def.innerType; + } + }; + Ie.create = (e, t) => + new Ie({ innerType: e, typeName: U.ZodNullable, ...A(t) }); + var at = class extends Z { + _parse(t) { + let { ctx: i } = this._processInputParams(t), + n = i.data; + return ( + i.parsedType === x.undefined && (n = this._def.defaultValue()), + this._def.innerType._parse({ data: n, path: i.path, parent: i }) + ); + } + removeDefault() { + return this._def.innerType; + } + }; + at.create = (e, t) => + new at({ + innerType: e, + typeName: U.ZodDefault, + defaultValue: + typeof t.default == 'function' ? t.default : () => t.default, + ...A(t), + }); + var ot = class extends Z { + _parse(t) { + let { ctx: i } = this._processInputParams(t), + n = { ...i, common: { ...i.common, issues: [] } }, + r = this._def.innerType._parse({ + data: n.data, + path: n.path, + parent: { ...n }, + }); + return Ot(r) + ? r.then((o) => ({ + status: 'valid', + value: + o.status === 'valid' + ? o.value + : this._def.catchValue({ + get error() { + return new re(n.common.issues); + }, + input: n.data, + }), + })) + : { + status: 'valid', + value: + r.status === 'valid' + ? r.value + : this._def.catchValue({ + get error() { + return new re(n.common.issues); + }, + input: n.data, + }), + }; + } + removeCatch() { + return this._def.innerType; + } + }; + ot.create = (e, t) => + new ot({ + innerType: e, + typeName: U.ZodCatch, + catchValue: typeof t.catch == 'function' ? t.catch : () => t.catch, + ...A(t), + }); + var Dt = class extends Z { + _parse(t) { + if (this._getType(t) !== x.nan) { + let n = this._getOrReturnCtx(t); + return ( + S(n, { + code: b.invalid_type, + expected: x.nan, + received: n.parsedType, + }), + z + ); + } + return { status: 'valid', value: t.data }; + } + }; + Dt.create = (e) => new Dt({ typeName: U.ZodNaN, ...A(e) }); + var dp = Symbol('zod_brand'), + qt = class extends Z { + _parse(t) { + let { ctx: i } = this._processInputParams(t), + n = i.data; + return this._def.type._parse({ data: n, path: i.path, parent: i }); + } + unwrap() { + return this._def.type; + } + }, + Bt = class e extends Z { + _parse(t) { + let { status: i, ctx: n } = this._processInputParams(t); + if (n.common.async) + return (async () => { + let o = await this._def.in._parseAsync({ + data: n.data, + path: n.path, + parent: n, + }); + return o.status === 'aborted' + ? z + : o.status === 'dirty' + ? (i.dirty(), qe(o.value)) + : this._def.out._parseAsync({ + data: o.value, + path: n.path, + parent: n, + }); + })(); + { + let r = this._def.in._parseSync({ + data: n.data, + path: n.path, + parent: n, + }); + return r.status === 'aborted' + ? z + : r.status === 'dirty' + ? (i.dirty(), { status: 'dirty', value: r.value }) + : this._def.out._parseSync({ + data: r.value, + path: n.path, + parent: n, + }); + } + } + static create(t, i) { + return new e({ in: t, out: i, typeName: U.ZodPipeline }); + } + }, + st = class extends Z { + _parse(t) { + let i = this._def.innerType._parse(t), + n = (r) => (Ce(r) && (r.value = Object.freeze(r.value)), r); + return Ot(i) ? i.then((r) => n(r)) : n(i); + } + unwrap() { + return this._def.innerType; + } + }; + st.create = (e, t) => + new st({ innerType: e, typeName: U.ZodReadonly, ...A(t) }); + function fo(e, t) { + let i = + typeof e == 'function' ? e(t) : typeof e == 'string' ? { message: e } : e; + return typeof i == 'string' ? { message: i } : i; + } + function yo(e, t = {}, i) { + return e + ? Ze.create().superRefine((n, r) => { + let o = e(n); + if (o instanceof Promise) + return o.then((s) => { + if (!s) { + let u = fo(t, n), + a = u.fatal ?? i ?? !0; + r.addIssue({ code: 'custom', ...u, fatal: a }); + } + }); + if (!o) { + let s = fo(t, n), + u = s.fatal ?? i ?? !0; + r.addIssue({ code: 'custom', ...s, fatal: u }); + } + }) + : Ze.create(); + } + var mp = { object: ae.lazycreate }, + U; + (function (e) { + ((e.ZodString = 'ZodString'), + (e.ZodNumber = 'ZodNumber'), + (e.ZodNaN = 'ZodNaN'), + (e.ZodBigInt = 'ZodBigInt'), + (e.ZodBoolean = 'ZodBoolean'), + (e.ZodDate = 'ZodDate'), + (e.ZodSymbol = 'ZodSymbol'), + (e.ZodUndefined = 'ZodUndefined'), + (e.ZodNull = 'ZodNull'), + (e.ZodAny = 'ZodAny'), + (e.ZodUnknown = 'ZodUnknown'), + (e.ZodNever = 'ZodNever'), + (e.ZodVoid = 'ZodVoid'), + (e.ZodArray = 'ZodArray'), + (e.ZodObject = 'ZodObject'), + (e.ZodUnion = 'ZodUnion'), + (e.ZodDiscriminatedUnion = 'ZodDiscriminatedUnion'), + (e.ZodIntersection = 'ZodIntersection'), + (e.ZodTuple = 'ZodTuple'), + (e.ZodRecord = 'ZodRecord'), + (e.ZodMap = 'ZodMap'), + (e.ZodSet = 'ZodSet'), + (e.ZodFunction = 'ZodFunction'), + (e.ZodLazy = 'ZodLazy'), + (e.ZodLiteral = 'ZodLiteral'), + (e.ZodEnum = 'ZodEnum'), + (e.ZodEffects = 'ZodEffects'), + (e.ZodNativeEnum = 'ZodNativeEnum'), + (e.ZodOptional = 'ZodOptional'), + (e.ZodNullable = 'ZodNullable'), + (e.ZodDefault = 'ZodDefault'), + (e.ZodCatch = 'ZodCatch'), + (e.ZodPromise = 'ZodPromise'), + (e.ZodBranded = 'ZodBranded'), + (e.ZodPipeline = 'ZodPipeline'), + (e.ZodReadonly = 'ZodReadonly')); + })(U || (U = {})); + var pp = (e, t = { message: `Input not instance of ${e.name}` }) => + yo((i) => i instanceof e, t), + _o = Ae.create, + $o = Be.create, + fp = Dt.create, + vp = Ge.create, + ko = Ke.create, + gp = He.create, + hp = Nt.create, + bp = Xe.create, + yp = Ye.create, + _p = Ze.create, + $p = Ne.create, + kp = he.create, + wp = Ut.create, + Sp = Ue.create, + xp = ae.create, + Ip = ae.strictCreate, + jp = Qe.create, + Op = On.create, + zp = et.create, + Np = xe.create, + Up = zn.create, + Pp = Pt.create, + Ep = Et.create, + Dp = Nn.create, + Tp = tt.create, + Cp = nt.create, + Ap = it.create, + Zp = rt.create, + Rp = Re.create, + Lp = me.create, + Jp = le.create, + Mp = Ie.create, + Vp = me.createWithPreprocess, + Fp = Bt.create, + Wp = () => _o().optional(), + qp = () => $o().optional(), + Bp = () => ko().optional(), + Gp = { + string: (e) => Ae.create({ ...e, coerce: !0 }), + number: (e) => Be.create({ ...e, coerce: !0 }), + boolean: (e) => Ke.create({ ...e, coerce: !0 }), + bigint: (e) => Ge.create({ ...e, coerce: !0 }), + date: (e) => He.create({ ...e, coerce: !0 }), + }; + var Kp = z; + var Hp = Object.defineProperty, + lt = (e, t) => { + for (var i in t) Hp(e, i, { get: t[i], enumerable: !0 }); + }; + function D(e, t, i = 'draft-7') { + return d.toJSONSchema(e, { target: i }); + } + var ut = d.string(), + Xp = d.number(), + lk = d.boolean(), + Gt = d.string().min(1), + Ri = d.number().int().positive(), + Li = d.number().int().nonnegative(), + xo = d.number().describe('Tagging version number'), + Yp = d.union([d.string(), d.number(), d.boolean()]), + dk = Yp.optional(), + Qp = {}; + lt(Qp, { + ErrorHandlerSchema: () => dt, + HandlerSchema: () => Oo, + LogHandlerSchema: () => Tt, + StorageSchema: () => jo, + StorageTypeSchema: () => Io, + errorHandlerJsonSchema: () => nf, + handlerJsonSchema: () => af, + logHandlerJsonSchema: () => rf, + storageJsonSchema: () => tf, + storageTypeJsonSchema: () => ef, + }); + var Io = d + .enum(['local', 'session', 'cookie']) + .describe('Storage mechanism: local, session, or cookie'), + jo = d + .object({ + Local: d.literal('local'), + Session: d.literal('session'), + Cookie: d.literal('cookie'), + }) + .describe('Storage type constants for type-safe references'), + dt = d.any().describe('Error handler function: (error, state?) => void'), + Tt = d.any().describe('Log handler function: (message, verbose?) => void'), + Oo = d + .object({ + Error: dt.describe('Error handler function'), + Log: Tt.describe('Log handler function'), + }) + .describe('Handler interface with error and log functions'), + ef = D(Io), + tf = D(jo), + nf = D(dt), + rf = D(Tt), + af = D(Oo), + mk = d + .object({ + onError: dt + .optional() + .describe('Error handler function: (error, state?) => void'), + onLog: Tt.optional().describe( + 'Log handler function: (message, verbose?) => void', + ), + }) + .partial(), + pk = d + .object({ + verbose: d + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + }) + .partial(), + fk = d + .object({ + queue: d + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + }) + .partial(), + vk = d.object({}).partial(), + gk = d + .object({ + init: d + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: d + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + }) + .partial(), + hk = d + .object({ + disabled: d.boolean().describe('Set to true to disable').optional(), + }) + .partial(), + bk = d + .object({ + primary: d + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .partial(), + yk = d + .object({ + settings: d + .any() + .optional() + .describe('Implementation-specific configuration'), + }) + .partial(), + _k = d + .object({ + env: d + .any() + .optional() + .describe('Environment dependencies (platform-specific)'), + }) + .partial(); + var $k = d + .object({ + type: d.string().optional().describe('Instance type identifier'), + config: d.unknown().describe('Instance configuration'), + }) + .partial(), + kk = d + .object({ + collector: d.unknown().describe('Collector instance (runtime object)'), + config: d.unknown().describe('Configuration'), + env: d.unknown().describe('Environment dependencies'), + }) + .partial(), + wk = d + .object({ + batch: d + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + batched: d + .unknown() + .optional() + .describe('Batch of events to be processed'), + }) + .partial(), + Sk = d + .object({ + ignore: d + .boolean() + .describe('Set to true to skip processing') + .optional(), + condition: d + .string() + .optional() + .describe('Condition function: return true to process'), + }) + .partial(), + xk = d + .object({ + sources: d + .record(d.string(), d.unknown()) + .describe('Map of source instances'), + }) + .partial(), + Ik = d + .object({ + destinations: d + .record(d.string(), d.unknown()) + .describe('Map of destination instances'), + }) + .partial(), + of = {}; + lt(of, { + ConsentSchema: () => Ee, + DeepPartialEventSchema: () => sf, + EntitiesSchema: () => Po, + EntitySchema: () => Dn, + EventSchema: () => be, + OrderedPropertiesSchema: () => En, + PartialEventSchema: () => Eo, + PropertiesSchema: () => Q, + PropertySchema: () => Pn, + PropertyTypeSchema: () => Ji, + SourceSchema: () => Uo, + SourceTypeSchema: () => Vi, + UserSchema: () => Ht, + VersionSchema: () => No, + consentJsonSchema: () => vf, + entityJsonSchema: () => pf, + eventJsonSchema: () => uf, + orderedPropertiesJsonSchema: () => mf, + partialEventJsonSchema: () => cf, + propertiesJsonSchema: () => df, + sourceTypeJsonSchema: () => ff, + userJsonSchema: () => lf, + }); + var zo, + Ji = d.lazy(() => + d.union([d.boolean(), d.string(), d.number(), d.record(d.string(), Pn)]), + ), + Pn = d.lazy(() => d.union([Ji, d.array(Ji)])), + Q = d + .record(d.string(), Pn.optional()) + .describe('Flexible property collection with optional values'), + En = d + .record(d.string(), d.tuple([Pn, d.number()]).optional()) + .describe( + 'Ordered properties with [value, order] tuples for priority control', + ), + Vi = d + .union([d.enum(['web', 'server', 'app', 'other']), d.string()]) + .describe('Source type: web, server, app, other, or custom'), + Ee = d + .record(d.string(), d.boolean()) + .describe('Consent requirement mapping (group name → state)'), + Ht = Q.and( + d.object({ + id: d.string().optional().describe('User identifier'), + device: d.string().optional().describe('Device identifier'), + session: d.string().optional().describe('Session identifier'), + hash: d.string().optional().describe('Hashed identifier'), + address: d.string().optional().describe('User address'), + email: d.string().email().optional().describe('User email address'), + phone: d.string().optional().describe('User phone number'), + userAgent: d.string().optional().describe('Browser user agent string'), + browser: d.string().optional().describe('Browser name'), + browserVersion: d.string().optional().describe('Browser version'), + deviceType: d + .string() + .optional() + .describe('Device type (mobile, desktop, tablet)'), + os: d.string().optional().describe('Operating system'), + osVersion: d.string().optional().describe('Operating system version'), + screenSize: d.string().optional().describe('Screen dimensions'), + language: d.string().optional().describe('User language'), + country: d.string().optional().describe('User country'), + region: d.string().optional().describe('User region/state'), + city: d.string().optional().describe('User city'), + zip: d.string().optional().describe('User postal code'), + timezone: d.string().optional().describe('User timezone'), + ip: d.string().optional().describe('User IP address'), + internal: d + .boolean() + .optional() + .describe('Internal user flag (employee, test user)'), + }), + ).describe('User identification and properties'), + No = Q.and( + d.object({ + source: ut.describe('Walker implementation version (e.g., "2.0.0")'), + tagging: xo, + }), + ).describe('Walker version information'), + Uo = Q.and( + d.object({ + type: Vi.describe('Source type identifier'), + id: ut.describe('Source identifier (typically URL on web)'), + previous_id: ut.describe( + 'Previous source identifier (typically referrer on web)', + ), + }), + ).describe('Event source information'), + Dn = d + .lazy(() => + d.object({ + entity: d.string().describe('Entity name'), + data: Q.describe('Entity-specific properties'), + nested: d.array(Dn).describe('Nested child entities'), + context: En.describe('Entity context data'), + }), + ) + .describe('Nested entity structure with recursive nesting support'), + Po = d.array(Dn).describe('Array of nested entities'), + be = d + .object({ + name: d + .string() + .describe( + 'Event name in "entity action" format (e.g., "page view", "product add")', + ), + data: Q.describe('Event-specific properties'), + context: En.describe('Ordered context properties with priorities'), + globals: Q.describe('Global properties shared across events'), + custom: Q.describe('Custom implementation-specific properties'), + user: Ht.describe('User identification and attributes'), + nested: Po.describe('Related nested entities'), + consent: Ee.describe('Consent states at event time'), + id: Gt.describe('Unique event identifier (timestamp-based)'), + trigger: ut.describe('Event trigger identifier'), + entity: ut.describe('Parsed entity from event name'), + action: ut.describe('Parsed action from event name'), + timestamp: Ri.describe('Unix timestamp in milliseconds since epoch'), + timing: Xp.describe('Event processing timing information'), + group: ut.describe('Event grouping identifier'), + count: Li.describe('Event count in session'), + version: No.describe('Walker version information'), + source: Uo.describe('Event source information'), + }) + .describe('Complete walkerOS event structure'), + Eo = be + .partial() + .describe('Partial event structure with all fields optional'), + sf = be + .partial() + .describe('Partial event structure with all top-level fields optional'), + uf = D(be), + cf = D(Eo), + lf = D(Ht), + df = D(Q), + mf = D(En), + pf = D(Dn), + ff = D(Vi), + vf = D(Ee), + gf = {}; + lt(gf, { + ConfigSchema: () => An, + LoopSchema: () => Fi, + MapSchema: () => qi, + PolicySchema: () => Ct, + ResultSchema: () => hf, + RuleSchema: () => Le, + RulesSchema: () => Cn, + SetSchema: () => Wi, + ValueConfigSchema: () => Do, + ValueSchema: () => pe, + ValuesSchema: () => Tn, + configJsonSchema: () => If, + loopJsonSchema: () => _f, + mapJsonSchema: () => kf, + policyJsonSchema: () => wf, + ruleJsonSchema: () => Sf, + rulesJsonSchema: () => xf, + setJsonSchema: () => $f, + valueConfigJsonSchema: () => yf, + valueJsonSchema: () => bf, + }); + var pe = d.lazy(() => + d.union([ + d.string().describe('String value or property path (e.g., "data.id")'), + d.number().describe('Numeric value'), + d.boolean().describe('Boolean value'), + d.lazy(() => zo), + d.array(pe).describe('Array of values'), + ]), + ), + Tn = d.array(pe).describe('Array of transformation values'), + Fi = d.lazy(() => + d + .tuple([pe, pe]) + .describe( + 'Loop transformation: [source, transform] tuple for array processing', + ), + ), + Wi = d.lazy(() => + d.array(pe).describe('Set: Array of values for selection or combination'), + ), + qi = d.lazy(() => + d + .record(d.string(), pe) + .describe('Map: Object mapping keys to transformation values'), + ), + Do = (zo = d + .object({ + key: d + .string() + .optional() + .describe( + 'Property path to extract from event (e.g., "data.id", "user.email")', + ), + value: d + .union([d.string(), d.number(), d.boolean()]) + .optional() + .describe('Static primitive value'), + fn: d + .string() + .optional() + .describe('Custom transformation function as string (serialized)'), + map: qi + .optional() + .describe( + 'Object mapping: transform event data to structured output', + ), + loop: Fi.optional().describe( + 'Loop transformation: [source, transform] for array processing', + ), + set: Wi.optional().describe( + 'Set of values: combine or select from multiple values', + ), + consent: Ee.optional().describe( + 'Required consent states to include this value', + ), + condition: d + .string() + .optional() + .describe( + 'Condition function as string: return true to include value', + ), + validate: d + .string() + .optional() + .describe( + 'Validation function as string: return true if value is valid', + ), + }) + .refine((e) => Object.keys(e).length > 0, { + message: 'ValueConfig must have at least one property', + }) + .describe('Value transformation configuration with multiple strategies')), + Ct = d + .record(d.string(), pe) + .describe('Policy rules for event pre-processing (key → value mapping)'), + Le = d + .object({ + batch: d + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + condition: d + .string() + .optional() + .describe( + 'Condition function as string: return true to process event', + ), + consent: Ee.optional().describe( + 'Required consent states to process this event', + ), + settings: d + .any() + .optional() + .describe('Destination-specific settings for this event mapping'), + data: d + .union([pe, Tn]) + .optional() + .describe('Data transformation rules for event'), + ignore: d + .boolean() + .optional() + .describe('Set to true to skip processing this event'), + name: d + .string() + .optional() + .describe( + 'Custom event name override (e.g., "view_item" for "product view")', + ), + policy: Ct.optional().describe( + 'Event-level policy overrides (applied after config-level policy)', + ), + }) + .describe('Mapping rule for specific entity-action combination'), + Cn = d + .record( + d.string(), + d.record(d.string(), d.union([Le, d.array(Le)])).optional(), + ) + .describe( + 'Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support', + ), + An = d + .object({ + consent: Ee.optional().describe( + 'Required consent states to process any events', + ), + data: d + .union([pe, Tn]) + .optional() + .describe('Global data transformation applied to all events'), + mapping: Cn.optional().describe('Entity-action specific mapping rules'), + policy: Ct.optional().describe( + 'Pre-processing policy rules applied before mapping', + ), + }) + .describe('Shared mapping configuration for sources and destinations'), + hf = d + .object({ + eventMapping: Le.optional().describe('Resolved mapping rule for event'), + mappingKey: d + .string() + .optional() + .describe('Mapping key used (e.g., "product.view")'), + }) + .describe('Mapping resolution result'), + bf = D(pe), + yf = D(Do), + _f = D(Fi), + $f = D(Wi), + kf = D(qi), + wf = D(Ct), + Sf = D(Le), + xf = D(Cn), + If = D(An), + jf = {}; + lt(jf, { + BatchSchema: () => Co, + ConfigSchema: () => Xt, + ContextSchema: () => Gi, + DLQSchema: () => Tf, + DataSchema: () => Uf, + DestinationPolicySchema: () => Of, + DestinationsSchema: () => Ef, + InitDestinationsSchema: () => Pf, + InitSchema: () => Ao, + InstanceSchema: () => Yt, + PartialConfigSchema: () => Bi, + PushBatchContextSchema: () => zf, + PushContextSchema: () => Ki, + PushEventSchema: () => To, + PushEventsSchema: () => Nf, + PushResultSchema: () => Df, + RefSchema: () => Un, + ResultSchema: () => Zo, + batchJsonSchema: () => Lf, + configJsonSchema: () => Cf, + contextJsonSchema: () => Zf, + instanceJsonSchema: () => Jf, + partialConfigJsonSchema: () => Af, + pushContextJsonSchema: () => Rf, + resultJsonSchema: () => Mf, + }); + var Xt = d + .object({ + consent: Ee.optional().describe( + 'Required consent states to send events to this destination', + ), + settings: d + .any() + .describe('Implementation-specific configuration') + .optional(), + data: d + .union([pe, Tn]) + .optional() + .describe( + 'Global data transformation applied to all events for this destination', + ), + env: d + .any() + .describe('Environment dependencies (platform-specific)') + .optional(), + id: Gt.describe( + 'Destination instance identifier (defaults to destination key)', + ).optional(), + init: d + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: d + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + mapping: Cn.optional().describe( + 'Entity-action specific mapping rules for this destination', + ), + policy: Ct.optional().describe( + 'Pre-processing policy rules applied before event mapping', + ), + queue: d + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + verbose: d + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + onError: dt.optional(), + onLog: Tt.optional(), + }) + .describe('Destination configuration'), + Bi = Xt.partial().describe( + 'Partial destination configuration with all fields optional', + ), + Of = Ct.describe('Destination policy rules for event pre-processing'), + Gi = d + .object({ + collector: d.unknown().describe('Collector instance (runtime object)'), + config: Xt.describe('Destination configuration'), + data: d + .union([d.unknown(), d.array(d.unknown())]) + .optional() + .describe('Transformed event data'), + env: d.unknown().describe('Environment dependencies'), + }) + .describe('Destination context for init and push functions'), + Ki = Gi.extend({ + mapping: Le.optional().describe( + 'Resolved mapping rule for this specific event', + ), + }).describe('Push context with event-specific mapping'), + zf = Ki.describe('Batch push context with event-specific mapping'), + To = d + .object({ + event: be.describe('The event to process'), + mapping: Le.optional().describe('Mapping rule for this event'), + }) + .describe('Event with optional mapping for batch processing'), + Nf = d.array(To).describe('Array of events with mappings'), + Co = d + .object({ + key: d + .string() + .describe('Batch key (usually mapping key like "product.view")'), + events: d.array(be).describe('Array of events in batch'), + data: d + .array(d.union([d.unknown(), d.array(d.unknown())]).optional()) + .describe('Transformed data for each event'), + mapping: Le.optional().describe('Shared mapping rule for batch'), + }) + .describe('Batch of events grouped by mapping key'), + Uf = d + .union([d.unknown(), d.array(d.unknown())]) + .optional() + .describe('Transformed event data (Property, undefined, or array)'), + Yt = d + .object({ + config: Xt.describe('Destination configuration'), + queue: d + .array(be) + .optional() + .describe('Queued events awaiting consent'), + dlq: d + .array(d.tuple([be, d.unknown()])) + .optional() + .describe('Dead letter queue (failed events with errors)'), + type: d.string().optional().describe('Destination type identifier'), + env: d.unknown().optional().describe('Environment dependencies'), + init: d.unknown().optional().describe('Initialization function'), + push: d.unknown().describe('Push function for single events'), + pushBatch: d.unknown().optional().describe('Batch push function'), + on: d.unknown().optional().describe('Event lifecycle hook function'), + }) + .describe('Destination instance (runtime object with functions)'), + Ao = d + .object({ + code: Yt.describe('Destination instance with implementation'), + config: Bi.optional().describe('Partial configuration overrides'), + env: d.unknown().optional().describe('Partial environment overrides'), + }) + .describe('Destination initialization configuration'), + Pf = d + .record(d.string(), Ao) + .describe('Map of destination IDs to initialization configurations'), + Ef = d + .record(d.string(), Yt) + .describe('Map of destination IDs to runtime instances'), + Un = d + .object({ + id: d.string().describe('Destination ID'), + destination: Yt.describe('Destination instance'), + }) + .describe('Destination reference (ID + instance)'), + Df = d + .object({ + queue: d + .array(be) + .optional() + .describe('Events queued (awaiting consent)'), + error: d.unknown().optional().describe('Error if push failed'), + }) + .describe('Push operation result'), + Zo = d + .object({ + successful: d + .array(Un) + .describe('Destinations that processed successfully'), + queued: d.array(Un).describe('Destinations that queued events'), + failed: d.array(Un).describe('Destinations that failed to process'), + }) + .describe('Overall destination processing result'), + Tf = d + .array(d.tuple([be, d.unknown()])) + .describe('Dead letter queue: [(event, error), ...]'), + Cf = D(Xt), + Af = D(Bi), + Zf = D(Gi), + Rf = D(Ki), + Lf = D(Co), + Jf = D(Yt), + Mf = D(Zo), + Vf = {}; + lt(Vf, { + CommandTypeSchema: () => Ro, + ConfigSchema: () => Zn, + DestinationsSchema: () => Vo, + InitConfigSchema: () => Lo, + InstanceSchema: () => Fo, + PushContextSchema: () => Jo, + SessionDataSchema: () => Hi, + SourcesSchema: () => Mo, + commandTypeJsonSchema: () => Ff, + configJsonSchema: () => Wf, + initConfigJsonSchema: () => Bf, + instanceJsonSchema: () => Kf, + pushContextJsonSchema: () => Gf, + sessionDataJsonSchema: () => qf, + }); + var Ro = d + .union([ + d.enum([ + 'action', + 'config', + 'consent', + 'context', + 'destination', + 'elb', + 'globals', + 'hook', + 'init', + 'link', + 'run', + 'user', + 'walker', + ]), + d.string(), + ]) + .describe( + 'Collector command type: standard commands or custom string for extensions', + ), + Zn = d + .object({ + run: d + .boolean() + .describe('Whether to run collector automatically on initialization') + .optional(), + tagging: xo, + globalsStatic: Q.describe( + 'Static global properties that persist across collector runs', + ), + sessionStatic: d + .record(d.string(), d.unknown()) + .describe('Static session data that persists across collector runs'), + verbose: d.boolean().describe('Enable verbose logging for debugging'), + onError: dt.optional(), + onLog: Tt.optional(), + }) + .describe('Core collector configuration'), + Hi = Q.and( + d.object({ + isStart: d.boolean().describe('Whether this is a new session start'), + storage: d.boolean().describe('Whether storage is available'), + id: Gt.describe('Session identifier').optional(), + start: Ri.describe('Session start timestamp').optional(), + marketing: d + .literal(!0) + .optional() + .describe('Marketing attribution flag'), + updated: Ri.describe('Last update timestamp').optional(), + isNew: d.boolean().describe('Whether this is a new session').optional(), + device: Gt.describe('Device identifier').optional(), + count: Li.describe('Event count in session').optional(), + runs: Li.describe('Number of runs').optional(), + }), + ).describe('Session state and tracking data'), + Lo = Zn.partial() + .extend({ + consent: Ee.optional().describe('Initial consent state'), + user: Ht.optional().describe('Initial user data'), + globals: Q.optional().describe('Initial global properties'), + sources: d.unknown().optional().describe('Source configurations'), + destinations: d + .unknown() + .optional() + .describe('Destination configurations'), + custom: Q.optional().describe( + 'Initial custom implementation-specific properties', + ), + }) + .describe('Collector initialization configuration with initial state'), + Jo = d + .object({ + mapping: An.optional().describe('Source-level mapping configuration'), + }) + .describe('Push context with optional source mapping'), + Mo = d + .record(d.string(), d.unknown()) + .describe('Map of source IDs to source instances'), + Vo = d + .record(d.string(), d.unknown()) + .describe('Map of destination IDs to destination instances'), + Fo = d + .object({ + push: d.unknown().describe('Push function for processing events'), + command: d.unknown().describe('Command function for walker commands'), + allowed: d.boolean().describe('Whether event processing is allowed'), + config: Zn.describe('Current collector configuration'), + consent: Ee.describe('Current consent state'), + count: d.number().describe('Event count (increments with each event)'), + custom: Q.describe('Custom implementation-specific properties'), + sources: Mo.describe('Registered source instances'), + destinations: Vo.describe('Registered destination instances'), + globals: Q.describe('Current global properties'), + group: d.string().describe('Event grouping identifier'), + hooks: d.unknown().describe('Lifecycle hook functions'), + on: d.unknown().describe('Event lifecycle configuration'), + queue: d.array(be).describe('Queued events awaiting processing'), + round: d + .number() + .describe('Collector run count (increments with each run)'), + session: d.union([Hi]).describe('Current session state'), + timing: d.number().describe('Event processing timing information'), + user: Ht.describe('Current user data'), + version: d.string().describe('Walker implementation version'), + }) + .describe('Collector instance with state and methods'), + Ff = D(Ro), + Wf = D(Zn), + qf = D(Hi), + Bf = D(Lo), + Gf = D(Jo), + Kf = D(Fo), + Hf = {}; + lt(Hf, { + BaseEnvSchema: () => Rn, + ConfigSchema: () => Ln, + InitSchema: () => qo, + InitSourceSchema: () => Yi, + InitSourcesSchema: () => Bo, + InstanceSchema: () => Wo, + PartialConfigSchema: () => Xi, + baseEnvJsonSchema: () => Xf, + configJsonSchema: () => Yf, + initSourceJsonSchema: () => tv, + initSourcesJsonSchema: () => nv, + instanceJsonSchema: () => ev, + partialConfigJsonSchema: () => Qf, + }); + var Rn = d + .object({ + push: d.unknown().describe('Collector push function'), + command: d.unknown().describe('Collector command function'), + sources: d + .unknown() + .optional() + .describe('Map of registered source instances'), + elb: d + .unknown() + .describe('Public API function (alias for collector.push)'), + }) + .catchall(d.unknown()) + .describe( + 'Base environment for dependency injection - platform-specific sources extend this', + ), + Ln = An.extend({ + settings: d + .any() + .describe('Implementation-specific configuration') + .optional(), + env: Rn.optional().describe( + 'Environment dependencies (platform-specific)', + ), + id: Gt.describe('Source identifier (defaults to source key)').optional(), + onError: dt.optional(), + disabled: d.boolean().describe('Set to true to disable').optional(), + primary: d + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }).describe('Source configuration with mapping and environment'), + Xi = Ln.partial().describe( + 'Partial source configuration with all fields optional', + ), + Wo = d + .object({ + type: d + .string() + .describe('Source type identifier (e.g., "browser", "dataLayer")'), + config: Ln.describe('Current source configuration'), + push: d + .any() + .describe( + 'Push function - THE HANDLER (flexible signature for platform compatibility)', + ), + destroy: d + .any() + .optional() + .describe('Cleanup function called when source is removed'), + on: d + .unknown() + .optional() + .describe('Lifecycle hook function for event types'), + }) + .describe('Source instance with push handler and lifecycle methods'), + qo = d + .any() + .describe( + 'Source initialization function: (config, env) => Instance | Promise', + ), + Yi = d + .object({ + code: qo.describe('Source initialization function'), + config: Xi.optional().describe('Partial configuration overrides'), + env: Rn.partial().optional().describe('Partial environment overrides'), + primary: d + .boolean() + .optional() + .describe('Mark as primary source (only one can be primary)'), + }) + .describe('Source initialization configuration'), + Bo = d + .record(d.string(), Yi) + .describe('Map of source IDs to initialization configurations'), + Xf = D(Rn), + Yf = D(Ln), + Qf = D(Xi), + ev = D(Wo), + tv = D(Yi), + nv = D(Bo), + iv = {}; + lt(iv, { + ConfigSchema: () => Qt, + DestinationReferenceSchema: () => er, + PrimitiveSchema: () => Go, + SetupSchema: () => Jn, + SourceReferenceSchema: () => Qi, + configJsonSchema: () => cv, + destinationReferenceJsonSchema: () => dv, + parseConfig: () => ov, + parseSetup: () => rv, + safeParseConfig: () => sv, + safeParseSetup: () => av, + setupJsonSchema: () => uv, + sourceReferenceJsonSchema: () => lv, + }); + var Go = d + .union([d.string(), d.number(), d.boolean()]) + .describe('Primitive value: string, number, or boolean'), + Qi = d + .object({ + package: d + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")', + ), + config: d + .unknown() + .optional() + .describe('Source-specific configuration object'), + env: d + .unknown() + .optional() + .describe('Source environment configuration'), + primary: d + .boolean() + .optional() + .describe( + 'Mark as primary source (provides main elb). Only one source should be primary.', + ), + }) + .describe('Source package reference with configuration'), + er = d + .object({ + package: d + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")', + ), + config: d + .unknown() + .optional() + .describe('Destination-specific configuration object'), + env: d + .unknown() + .optional() + .describe('Destination environment configuration'), + }) + .describe('Destination package reference with configuration'), + Qt = d + .object({ + platform: d + .enum(['web', 'server'], { + error: 'Platform must be "web" or "server"', + }) + .describe( + 'Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection', + ), + sources: d + .record(d.string(), Qi) + .optional() + .describe( + 'Source configurations (data capture) keyed by unique identifier', + ), + destinations: d + .record(d.string(), er) + .optional() + .describe( + 'Destination configurations (data output) keyed by unique identifier', + ), + collector: d + .unknown() + .optional() + .describe( + 'Collector configuration for event processing (uses Collector.InitConfig)', + ), + env: d + .record(d.string(), d.string()) + .optional() + .describe( + 'Environment-specific variables (override root-level variables)', + ), + }) + .passthrough() + .describe('Single environment configuration for one deployment target'), + Jn = d + .object({ + version: d + .literal(1, { error: 'Only version 1 is currently supported' }) + .describe( + 'Configuration schema version (currently only 1 is supported)', + ), + $schema: d + .string() + .url('Schema URL must be a valid URL') + .optional() + .describe( + 'JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")', + ), + variables: d + .record(d.string(), Go) + .optional() + .describe( + 'Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)', + ), + definitions: d + .record(d.string(), d.unknown()) + .optional() + .describe( + 'Reusable configuration definitions (reference with JSON Schema $ref syntax)', + ), + environments: d + .record(d.string(), Qt) + .refine((e) => Object.keys(e).length > 0, { + message: 'At least one environment is required', + }) + .describe( + 'Named environment configurations (e.g., web_prod, server_stage)', + ), + }) + .describe( + 'Complete multi-environment walkerOS configuration (walkeros.config.json)', + ); + function rv(e) { + return Jn.parse(e); + } + function av(e) { + return Jn.safeParse(e); + } + function ov(e) { + return Qt.parse(e); + } + function sv(e) { + return Qt.safeParse(e); + } + var uv = d.toJSONSchema(Jn, { target: 'draft-7' }), + cv = D(Qt), + lv = D(Qi), + dv = D(er); + var mv = { merge: !0, shallow: !0, extend: !0 }; + function G(e, t = {}, i = {}) { + i = { ...mv, ...i }; + let n = Object.entries(t).reduce((r, [o, s]) => { + let u = e[o]; + return ( + i.merge && Array.isArray(u) && Array.isArray(s) + ? (r[o] = s.reduce((a, c) => (a.includes(c) ? a : [...a, c]), [...u])) + : (i.extend || o in e) && (r[o] = s), + r + ); + }, {}); + return i.shallow ? { ...e, ...n } : (Object.assign(e, n), e); + } + function Pe(e) { + return Array.isArray(e); + } + function pv(e) { + return typeof e == 'boolean'; + } + function je(e) { + return e !== void 0; + } + function Ko(e) { + return typeof e == 'function'; + } + function fv(e) { + return typeof e == 'number' && !Number.isNaN(e); + } + function ee(e) { + return ( + typeof e == 'object' && + e !== null && + !Pe(e) && + Object.prototype.toString.call(e) === '[object Object]' + ); + } + function Mn(e) { + return typeof e == 'string'; + } + function Kt(e, t = new WeakMap()) { + if (typeof e != 'object' || e === null) return e; + if (t.has(e)) return t.get(e); + let i = Object.prototype.toString.call(e); + if (i === '[object Object]') { + let n = {}; + t.set(e, n); + for (let r in e) + Object.prototype.hasOwnProperty.call(e, r) && (n[r] = Kt(e[r], t)); + return n; + } + if (i === '[object Array]') { + let n = []; + return ( + t.set(e, n), + e.forEach((r) => { + n.push(Kt(r, t)); + }), + n + ); + } + if (i === '[object Date]') return new Date(e.getTime()); + if (i === '[object RegExp]') { + let n = e; + return new RegExp(n.source, n.flags); + } + return e; + } + function Ho(e, t = '', i) { + let n = t.split('.'), + r = e; + for (let o = 0; o < n.length; o++) { + let s = n[o]; + if (s === '*' && Pe(r)) { + let u = n.slice(o + 1).join('.'), + a = []; + for (let c of r) { + let m = Ho(c, u, i); + a.push(m); + } + return a; + } + if (((r = r instanceof Object ? r[s] : void 0), !r)) break; + } + return je(r) ? r : i; + } + function wo(e, t, i) { + if (!ee(e)) return e; + let n = Kt(e), + r = t.split('.'), + o = n; + for (let s = 0; s < r.length; s++) { + let u = r[s]; + s === r.length - 1 + ? (o[u] = i) + : ((u in o && typeof o[u] == 'object' && o[u] !== null) || (o[u] = {}), + (o = o[u])); + } + return n; + } + function en(e, t = {}, i = {}) { + let n = { ...t, ...i }, + r = {}, + o = e === void 0; + return ( + Object.keys(n).forEach((s) => { + n[s] && ((r[s] = !0), e && e[s] && (o = !0)); + }), + !!o && r + ); + } + function Vn(e = 6) { + let t = ''; + for (let i = 36; t.length < e; ) t += ((Math.random() * i) | 0).toString(i); + return t; + } + function Xo(e, t = 1e3, i = !1) { + let n, + r = null, + o = !1; + return (...s) => + new Promise((u) => { + let a = i && !o; + (r && clearTimeout(r), + (r = setTimeout(() => { + ((r = null), (i && !o) || ((n = e(...s)), u(n))); + }, t)), + a && ((o = !0), (n = e(...s)), u(n))); + }); + } + function Mi(e) { + return ( + pv(e) || + Mn(e) || + fv(e) || + !je(e) || + (Pe(e) && e.every(Mi)) || + (ee(e) && Object.values(e).every(Mi)) + ); + } + function So(e) { + return Mi(e) ? e : void 0; + } + function At(e, t, i) { + return function (...n) { + try { + return e(...n); + } catch (r) { + return t ? t(r) : void 0; + } finally { + i?.(); + } + }; + } + function oe(e, t, i) { + return async function (...n) { + try { + return await e(...n); + } catch (r) { + return t ? await t(r) : void 0; + } finally { + await i?.(); + } + }; + } + async function vv(e, t) { + let [i, n] = (e.name || '').split(' '); + if (!t || !i || !n) return {}; + let r, + o = '', + s = i, + u = n, + a = (m) => { + if (m) + return (m = Pe(m) ? m : [m]).find( + (p) => !p.condition || p.condition(e), + ); + }; + t[s] || (s = '*'); + let c = t[s]; + return ( + c && (c[u] || (u = '*'), (r = a(c[u]))), + r || ((s = '*'), (u = '*'), (r = a(t[s]?.[u]))), + r && (o = `${s} ${u}`), + { eventMapping: r, mappingKey: o } + ); + } + async function ct(e, t = {}, i = {}) { + if (!je(e)) return; + let n = (ee(e) && e.consent) || i.consent || i.collector?.consent, + r = Pe(t) ? t : [t]; + for (let o of r) { + let s = await oe(Yo)(e, o, { ...i, consent: n }); + if (je(s)) return s; + } + } + async function Yo(e, t, i = {}) { + let { collector: n, consent: r } = i; + return (Pe(t) ? t : [t]).reduce( + async (o, s) => { + let u = await o; + if (u) return u; + let a = Mn(s) ? { key: s } : s; + if (!Object.keys(a).length) return; + let { + condition: c, + consent: m, + fn: p, + key: f, + loop: h, + map: N, + set: k, + validate: g, + value: y, + } = a; + if (c && !(await oe(c)(e, s, n))) return; + if (m && !en(m, r)) return y; + let w = je(y) ? y : e; + if ((p && (w = await oe(p)(e, s, i)), f && (w = Ho(e, f, y)), h)) { + let [I, E] = h, + V = I === 'this' ? [e] : await ct(e, I, i); + Pe(V) && + (w = (await Promise.all(V.map((B) => ct(B, E, i)))).filter(je)); + } else + N + ? (w = await Object.entries(N).reduce(async (I, [E, V]) => { + let B = await I, + H = await ct(e, V, i); + return (je(H) && (B[E] = H), B); + }, Promise.resolve({}))) + : k && (w = await Promise.all(k.map((I) => Yo(e, I, i)))); + g && !(await oe(g)(w)) && (w = void 0); + let j = So(w); + return je(j) ? j : So(y); + }, + Promise.resolve(void 0), + ); + } + async function Fn(e, t, i) { + t.policy && + (await Promise.all( + Object.entries(t.policy).map(async ([s, u]) => { + let a = await ct(e, u, { collector: i }); + e = wo(e, s, a); + }), + )); + let { eventMapping: n, mappingKey: r } = await vv(e, t.mapping); + n?.policy && + (await Promise.all( + Object.entries(n.policy).map(async ([s, u]) => { + let a = await ct(e, u, { collector: i }); + e = wo(e, s, a); + }), + )); + let o = t.data && (await ct(e, t.data, { collector: i })); + if (n) { + if (n.ignore) + return { event: e, data: o, mapping: n, mappingKey: r, ignore: !0 }; + if ((n.name && (e.name = n.name), n.data)) { + let s = n.data && (await ct(e, n.data, { collector: i })); + o = ee(o) && ee(s) ? G(o, s) : s; + } + } + return { event: e, data: o, mapping: n, mappingKey: r, ignore: !1 }; + } + function Qo(e, t = !1) { + t && console.dir(e, { depth: 4 }); + } + function Je(e, t, i) { + return function (...n) { + let r, + o = 'post' + t, + s = i['pre' + t], + u = i[o]; + return ( + (r = s ? s({ fn: e }, ...n) : e(...n)), + u && (r = u({ fn: e, result: r }, ...n)), + r + ); + }; + } + var gv = Object.defineProperty, + hv = { + Action: 'action', + Actions: 'actions', + Config: 'config', + Consent: 'consent', + Context: 'context', + Custom: 'custom', + Destination: 'destination', + Elb: 'elb', + Globals: 'globals', + Hook: 'hook', + Init: 'init', + Link: 'link', + On: 'on', + Prefix: 'data-elb', + Ready: 'ready', + Run: 'run', + Session: 'session', + User: 'user', + Walker: 'walker', + }, + K = { + Commands: hv, + Utils: { + Storage: { Cookie: 'cookie', Local: 'local', Session: 'session' }, + }, + }, + bv = {}; + ((e, t) => { + for (var i in t) gv(e, i, { get: t[i], enumerable: !0 }); + })(bv, { schemas: () => yv, settingsSchema: () => es }); + var es = { + type: 'object', + properties: { + run: { + type: 'boolean', + description: + 'Automatically start the collector pipeline on initialization', + }, + sources: { + type: 'object', + description: + 'Configurations for sources providing events to the collector', + }, + destinations: { + type: 'object', + description: + 'Configurations for destinations receiving processed events', + }, + consent: { + type: 'object', + description: 'Initial consent state to control routing of events', + }, + verbose: { + type: 'boolean', + description: 'Enable verbose logging for debugging', + }, + onError: { + type: 'string', + description: + 'Error handler triggered when the collector encounters failures', + }, + onLog: { + type: 'string', + description: 'Custom log handler for collector messages', + }, + }, + }, + yv = { settings: es }; + async function _v(e, t, i) { + let { code: n, config: r = {}, env: o = {} } = t, + s = i || r || { init: !1 }, + u = { ...n, config: s, env: tn(n.env, o) }, + a = u.config.id; + if (!a) + do a = Vn(4); + while (e.destinations[a]); + return ( + (e.destinations[a] = u), + u.config.queue !== !1 && (u.queue = [...e.queue]), + Wn(e, void 0, { [a]: u }) + ); + } + async function Wn(e, t, i) { + let { allowed: n, consent: r, globals: o, user: s } = e; + if (!n) return mt({ ok: !1 }); + (t && e.queue.push(t), i || (i = e.destinations)); + let u = await Promise.all( + Object.entries(i || {}).map(async ([p, f]) => { + let h = (f.queue || []).map((y) => ({ ...y, consent: r })); + if (((f.queue = []), t)) { + let y = Kt(t); + h.push(y); + } + if (!h.length) return { id: p, destination: f, skipped: !0 }; + let N = [], + k = h.filter((y) => { + let w = en(f.config.consent, r, y.consent); + return !w || ((y.consent = w), N.push(y), !1); + }); + if ((f.queue.concat(k), !N.length)) + return { id: p, destination: f, queue: h }; + if (!(await oe($v)(e, f))) return { id: p, destination: f, queue: h }; + let g = !1; + return ( + f.dlq || (f.dlq = []), + await Promise.all( + N.map( + async (y) => ( + (y.globals = G(o, y.globals)), + (y.user = G(s, y.user)), + await oe( + kv, + (w) => ( + e.config.onError && e.config.onError(w, e), + (g = !0), + f.dlq.push([y, w]), + !1 + ), + )(e, f, y), + y + ), + ), + ), + { id: p, destination: f, error: g } + ); + }), + ), + a = [], + c = [], + m = []; + for (let p of u) { + if (p.skipped) continue; + let f = p.destination, + h = { id: p.id, destination: f }; + p.error + ? m.push(h) + : p.queue && p.queue.length + ? ((f.queue = (f.queue || []).concat(p.queue)), c.push(h)) + : a.push(h); + } + return mt({ ok: !m.length, event: t, successful: a, queued: c, failed: m }); + } + async function $v(e, t) { + if (t.init && !t.config.init) { + let i = { collector: e, config: t.config, env: tn(t.env, t.config.env) }, + n = await Je(t.init, 'DestinationInit', e.hooks)(i); + if (n === !1) return n; + t.config = { ...(n || t.config), init: !0 }; + } + return !0; + } + async function kv(e, t, i) { + let { config: n } = t, + r = await Fn(i, n, e); + if (r.ignore) return !1; + let o = { + collector: e, + config: n, + data: r.data, + mapping: r.mapping, + env: tn(t.env, n.env), + }, + s = r.mapping; + if (s?.batch && t.pushBatch) { + let u = s.batched || { key: r.mappingKey || '', events: [], data: [] }; + (u.events.push(r.event), + je(r.data) && u.data.push(r.data), + (s.batchFn = + s.batchFn || + Xo((a, c) => { + let m = { + collector: c, + config: n, + data: r.data, + mapping: s, + env: tn(a.env, n.env), + }; + (Je(a.pushBatch, 'DestinationPushBatch', c.hooks)(u, m), + (u.events = []), + (u.data = [])); + }, s.batch)), + (s.batched = u), + s.batchFn?.(t, e)); + } else await Je(t.push, 'DestinationPush', e.hooks)(r.event, o); + return !0; + } + function mt(e) { + return G( + { ok: !e?.failed?.length, successful: [], queued: [], failed: [] }, + e, + ); + } + async function wv(e, t = {}) { + let i = {}; + for (let [n, r] of Object.entries(t)) { + let { code: o, config: s = {}, env: u = {} } = r, + a = { ...o.config, ...s }, + c = tn(o.env, u); + i[n] = { ...o, config: a, env: c }; + } + return i; + } + function tn(e, t) { + return e || t ? (t ? (e && ee(e) && ee(t) ? { ...e, ...t } : t) : e) : {}; + } + function Sv(e, t, i) { + let n = e.on, + r = n[t] || [], + o = Pe(i) ? i : [i]; + (o.forEach((s) => { + r.push(s); + }), + (n[t] = r), + nn(e, t, o)); + } + function nn(e, t, i, n) { + let r, + o = i || []; + switch ((i || (o = e.on[t] || []), t)) { + case K.Commands.Consent: + r = n || e.consent; + break; + case K.Commands.Session: + r = e.session; + break; + case K.Commands.Ready: + case K.Commands.Run: + default: + r = void 0; + } + if ( + (Object.values(e.sources).forEach((s) => { + s.on && At(s.on)(t, r); + }), + Object.values(e.destinations).forEach((s) => { + if (s.on) { + let u = s.on; + At(u)(t, r); + } + }), + o.length) + ) + switch (t) { + case K.Commands.Consent: + (function (s, u, a) { + let c = a || s.consent; + u.forEach((m) => { + Object.keys(c) + .filter((p) => p in m) + .forEach((p) => { + At(m[p])(s, c); + }); + }); + })(e, o, n); + break; + case K.Commands.Ready: + case K.Commands.Run: + (function (s, u) { + s.allowed && + u.forEach((a) => { + At(a)(s); + }); + })(e, o); + break; + case K.Commands.Session: + (function (s, u) { + s.session && + u.forEach((a) => { + At(a)(s, s.session); + }); + })(e, o); + } + } + async function xv(e, t) { + let { consent: i } = e, + n = !1, + r = {}; + return ( + Object.entries(t).forEach(([o, s]) => { + let u = !!s; + ((r[o] = u), (n = n || u)); + }), + (e.consent = G(i, r)), + nn(e, 'consent', void 0, r), + n ? Wn(e) : mt({ ok: !0 }) + ); + } + async function Iv(e, t, i, n) { + let r; + switch (t) { + case K.Commands.Config: + ee(i) && G(e.config, i, { shallow: !1 }); + break; + case K.Commands.Consent: + ee(i) && (r = await xv(e, i)); + break; + case K.Commands.Custom: + ee(i) && (e.custom = G(e.custom, i)); + break; + case K.Commands.Destination: + ee(i) && Ko(i.push) && (r = await _v(e, { code: i }, n)); + break; + case K.Commands.Globals: + ee(i) && (e.globals = G(e.globals, i)); + break; + case K.Commands.On: + Mn(i) && Sv(e, i, n); + break; + case K.Commands.Ready: + nn(e, 'ready'); + break; + case K.Commands.Run: + r = await Ov(e, i); + break; + case K.Commands.Session: + nn(e, 'session'); + break; + case K.Commands.User: + ee(i) && G(e.user, i, { shallow: !1 }); + } + return r || { ok: !0, successful: [], queued: [], failed: [] }; + } + function jv(e, t) { + if (!t.name) throw new Error('Event name is required'); + let [i, n] = t.name.split(' '); + if (!i || !n) throw new Error('Event name is invalid'); + ++e.count; + let { + timestamp: r = Date.now(), + group: o = e.group, + count: s = e.count, + } = t, + { + name: u = `${i} ${n}`, + data: a = {}, + context: c = {}, + globals: m = e.globals, + custom: p = {}, + user: f = e.user, + nested: h = [], + consent: N = e.consent, + id: k = `${r}-${o}-${s}`, + trigger: g = '', + entity: y = i, + action: w = n, + timing: j = 0, + version: I = { source: e.version, tagging: e.config.tagging || 0 }, + source: E = { type: 'collector', id: '', previous_id: '' }, + } = t; + return { + name: u, + data: a, + context: c, + globals: m, + custom: p, + user: f, + nested: h, + consent: N, + id: k, + trigger: g, + entity: y, + action: w, + timestamp: r, + timing: j, + group: o, + count: s, + version: I, + source: E, + }; + } + async function Ov(e, t) { + ((e.allowed = !0), + (e.count = 0), + (e.group = Vn()), + (e.timing = Date.now()), + t && + (t.consent && (e.consent = G(e.consent, t.consent)), + t.user && (e.user = G(e.user, t.user)), + t.globals && (e.globals = G(e.config.globalsStatic || {}, t.globals)), + t.custom && (e.custom = G(e.custom, t.custom))), + Object.values(e.destinations).forEach((n) => { + n.queue = []; + }), + (e.queue = []), + e.round++); + let i = await Wn(e); + return (nn(e, 'run'), i); + } + function zv(e, t) { + return Je( + async (i, n = {}) => + await oe( + async () => { + let r = i; + if (n.mapping) { + let u = await Fn(r, n.mapping, e); + if (u.ignore) return mt({ ok: !0 }); + if ( + n.mapping.consent && + !en(n.mapping.consent, e.consent, u.event.consent) + ) + return mt({ ok: !0 }); + r = u.event; + } + let o = t(r), + s = jv(e, o); + return await Wn(e, s); + }, + () => mt({ ok: !1 }), + )(), + 'Push', + e.hooks, + ); + } + async function Nv(e) { + let t = G( + { + globalsStatic: {}, + sessionStatic: {}, + tagging: 0, + verbose: !1, + onLog: i, + run: !0, + }, + e, + { merge: !1, extend: !1 }, + ); + function i(o, s) { + Qo({ message: o }, s || t.verbose); + } + t.onLog = i; + let n = { ...t.globalsStatic, ...e.globals }, + r = { + allowed: !1, + config: t, + consent: e.consent || {}, + count: 0, + custom: e.custom || {}, + destinations: {}, + globals: n, + group: '', + hooks: {}, + on: {}, + queue: [], + round: 0, + session: void 0, + timing: Date.now(), + user: e.user || {}, + version: '0.3.0', + sources: {}, + push: void 0, + command: void 0, + }; + return ( + (r.push = zv(r, (o) => ({ + timing: Math.round((Date.now() - r.timing) / 10) / 100, + source: { type: 'collector', id: '', previous_id: '' }, + ...o, + }))), + (r.command = (function (o, s) { + return Je( + async (u, a, c) => + await oe( + async () => await s(o, u, a, c), + () => mt({ ok: !1 }), + )(), + 'Command', + o.hooks, + ); + })(r, Iv)), + (r.destinations = await wv(0, e.destinations || {})), + r + ); + } + async function Uv(e, t = {}) { + let i = {}; + for (let [n, r] of Object.entries(t)) { + let { code: o, config: s = {}, env: u = {}, primary: a } = r, + c = { + push: (p, f = {}) => e.push(p, { ...f, mapping: s }), + command: e.command, + sources: e.sources, + elb: e.sources.elb.push, + ...u, + }, + m = await oe(o)(s, c); + m && (a && (m.config = { ...m.config, primary: a }), (i[n] = m)); + } + return i; + } + async function ts(e) { + e = e || {}; + let t = await Nv(e), + i = + ((n = t), + { + type: 'elb', + config: {}, + push: async (f, h, N, k, g, y) => { + if (typeof f == 'string' && f.startsWith('walker ')) { + let j = f.replace('walker ', ''); + return n.command(j, h, N); + } + let w; + if (typeof f == 'string') + ((w = { name: f }), + h && typeof h == 'object' && !Array.isArray(h) && (w.data = h)); + else { + if (!f || typeof f != 'object') + return { ok: !1, successful: [], queued: [], failed: [] }; + ((w = f), + h && + typeof h == 'object' && + !Array.isArray(h) && + (w.data = { ...(w.data || {}), ...h })); + } + return ( + k && typeof k == 'object' && (w.context = k), + g && Array.isArray(g) && (w.nested = g), + y && typeof y == 'object' && (w.custom = y), + n.push(w) + ); + }, + }); + var n; + t.sources.elb = i; + let r = await Uv(t, e.sources || {}); + Object.assign(t.sources, r); + let { consent: o, user: s, globals: u, custom: a } = e; + (o && (await t.command('consent', o)), + s && (await t.command('user', s)), + u && Object.assign(t.globals, u), + a && Object.assign(t.custom, a), + t.config.run && (await t.command('run'))); + let c = i.push, + m = Object.values(t.sources).filter((f) => f.type !== 'elb'), + p = m.find((f) => f.config.primary); + return ( + p ? (c = p.push) : m.length > 0 && (c = m[0].push), + { collector: t, elb: c } + ); + } + var Pv = Object.defineProperty, + ns = (e, t) => { + for (var i in t) Pv(e, i, { get: t[i], enumerable: !0 }); + }; + var Ev = {}; + ns(Ev, { env: () => is }); + var is = {}; + ns(is, { init: () => Dv, push: () => Tv, simulation: () => Cv }); + var tr = async () => ({ ok: !0, successful: [], queued: [], failed: [] }), + Dv = void 0, + Tv = { push: tr, command: tr, elb: tr }, + Cv = ['call:elb'], + rs = async (e, t) => { + let { elb: i } = t, + n = { ...e, settings: e?.settings || { events: [] } }; + return ( + (n.settings?.events || []).forEach((r) => { + let { delay: o, ...s } = r; + setTimeout(() => i(s), o || 0); + }), + { type: 'demo', config: n, push: i } + ); + }; + var Av = Object.defineProperty, + as = (e, t) => { + for (var i in t) Av(e, i, { get: t[i], enumerable: !0 }); + }; + var os = {}; + as(os, { env: () => ss }); + var ss = {}; + as(ss, { init: () => Zv, push: () => Rv, simulation: () => Lv }); + var Zv = { log: void 0 }, + Rv = { log: Object.assign(() => {}, {}) }, + Lv = ['call:log'], + us = { + type: 'demo', + config: { settings: { name: 'demo' } }, + init({ config: e, env: t }) { + (t?.log || console.log)( + `[${{ name: 'demo', ...e?.settings }.name}] initialized`, + ); + }, + push(e, { config: t, env: i }) { + let n = i?.log || console.log, + r = { name: 'demo', ...t?.settings }, + o = r.values + ? (function (s, u) { + let a = {}; + for (let c of u) { + let m = c.split('.').reduce((p, f) => p?.[f], s); + m !== void 0 && (a[c] = m); + } + return a; + })(e, r.values) + : e; + n(`[${r.name}] ${JSON.stringify(o, null, 2)}`); + }, + }; + var Jv = Object.defineProperty, + ve = (e, t) => { + for (var i in t) Jv(e, i, { get: t[i], enumerable: !0 }); + }, + l = {}; + ve(l, { + $brand: () => zs, + $input: () => al, + $output: () => rl, + NEVER: () => Os, + TimePrecision: () => ul, + ZodAny: () => yd, + ZodArray: () => wd, + ZodBase64: () => Ta, + ZodBase64URL: () => Ca, + ZodBigInt: () => yi, + ZodBigIntFormat: () => Ra, + ZodBoolean: () => bi, + ZodCIDRv4: () => Ea, + ZodCIDRv6: () => Da, + ZodCUID: () => Ia, + ZodCUID2: () => ja, + ZodCatch: () => Md, + ZodCodec: () => Ha, + ZodCustom: () => ki, + ZodCustomStringFormat: () => $n, + ZodDate: () => Ja, + ZodDefault: () => Cd, + ZodDiscriminatedUnion: () => Sd, + ZodE164: () => Aa, + ZodEmail: () => wa, + ZodEmoji: () => Sa, + ZodEnum: () => cn, + ZodError: () => Yb, + ZodFile: () => Ed, + ZodFirstPartyTypeKind: () => lr, + ZodFunction: () => Xd, + ZodGUID: () => ii, + ZodIPv4: () => Ua, + ZodIPv6: () => Pa, + ZodISODate: () => ya, + ZodISODateTime: () => ba, + ZodISODuration: () => $a, + ZodISOTime: () => _a, + ZodIntersection: () => xd, + ZodIssueCode: () => s_, + ZodJWT: () => Za, + ZodKSUID: () => Na, + ZodLazy: () => Gd, + ZodLiteral: () => Pd, + ZodMap: () => Nd, + ZodNaN: () => Fd, + ZodNanoID: () => xa, + ZodNever: () => $d, + ZodNonOptional: () => Ga, + ZodNull: () => hd, + ZodNullable: () => Td, + ZodNumber: () => hi, + ZodNumberFormat: () => Mt, + ZodObject: () => $i, + ZodOptional: () => Ba, + ZodPipe: () => Ka, + ZodPrefault: () => Zd, + ZodPromise: () => Hd, + ZodReadonly: () => Wd, + ZodRealError: () => ce, + ZodRecord: () => Fa, + ZodSet: () => Ud, + ZodString: () => vi, + ZodStringFormat: () => W, + ZodSuccess: () => Jd, + ZodSymbol: () => vd, + ZodTemplateLiteral: () => Bd, + ZodTransform: () => Dd, + ZodTuple: () => jd, + ZodType: () => R, + ZodULID: () => Oa, + ZodURL: () => gi, + ZodUUID: () => De, + ZodUndefined: () => gd, + ZodUnion: () => Ma, + ZodUnknown: () => _d, + ZodVoid: () => kd, + ZodXID: () => za, + _ZodString: () => ka, + _default: () => Ad, + _function: () => Ss, + any: () => Ty, + array: () => _i, + base64: () => by, + base64url: () => yy, + bigint: () => Ny, + boolean: () => fd, + catch: () => Vd, + check: () => t_, + cidrv4: () => gy, + cidrv6: () => hy, + clone: () => ge, + codec: () => Yy, + coerce: () => em, + config: () => ie, + core: () => js, + cuid: () => cy, + cuid2: () => ly, + custom: () => n_, + date: () => Ay, + decode: () => od, + decodeAsync: () => ud, + discriminatedUnion: () => My, + e164: () => _y, + email: () => Qb, + emoji: () => sy, + encode: () => ad, + encodeAsync: () => sd, + endsWith: () => ma, + enum: () => Wa, + file: () => Gy, + flattenError: () => hr, + float32: () => Iy, + float64: () => jy, + formatError: () => br, + function: () => Ss, + getErrorMap: () => c_, + globalRegistry: () => ft, + gt: () => yt, + gte: () => se, + guid: () => ey, + hash: () => xy, + hex: () => Sy, + hostname: () => wy, + httpUrl: () => oy, + includes: () => la, + instanceof: () => i_, + int: () => cr, + int32: () => Oy, + int64: () => Uy, + intersection: () => Id, + ipv4: () => fy, + ipv6: () => vy, + iso: () => Kl, + json: () => a_, + jwt: () => $y, + keyof: () => Zy, + ksuid: () => py, + lazy: () => Kd, + length: () => fi, + literal: () => By, + locales: () => Ar, + looseObject: () => Jy, + lowercase: () => ua, + lt: () => bt, + lte: () => _e, + map: () => Fy, + maxLength: () => pi, + maxSize: () => mi, + mime: () => pa, + minLength: () => Lt, + minSize: () => un, + multipleOf: () => sn, + nan: () => Xy, + nanoid: () => uy, + nativeEnum: () => qy, + negative: () => Al, + never: () => La, + nonnegative: () => Rl, + nonoptional: () => Ld, + nonpositive: () => Zl, + normalize: () => fa, + null: () => bd, + nullable: () => ai, + nullish: () => Ky, + number: () => pd, + object: () => Ry, + optional: () => ri, + overwrite: () => kt, + parse: () => td, + parseAsync: () => nd, + partialRecord: () => Vy, + pipe: () => oi, + positive: () => Cl, + prefault: () => Rd, + preprocess: () => o_, + prettifyError: () => Ms, + promise: () => e_, + property: () => Ll, + readonly: () => qd, + record: () => zd, + refine: () => Yd, + regex: () => sa, + regexes: () => $t, + registry: () => Rr, + safeDecode: () => ld, + safeDecodeAsync: () => md, + safeEncode: () => cd, + safeEncodeAsync: () => dd, + safeParse: () => id, + safeParseAsync: () => rd, + set: () => Wy, + setErrorMap: () => u_, + size: () => oa, + startsWith: () => da, + strictObject: () => Ly, + string: () => ur, + stringFormat: () => ky, + stringbool: () => r_, + success: () => Hy, + superRefine: () => Qd, + symbol: () => Ey, + templateLiteral: () => Qy, + toJSONSchema: () => Gl, + toLowerCase: () => ga, + toUpperCase: () => ha, + transform: () => qa, + treeifyError: () => Ls, + trim: () => va, + tuple: () => Od, + uint32: () => zy, + uint64: () => Py, + ulid: () => dy, + undefined: () => Dy, + union: () => Va, + unknown: () => Jt, + uppercase: () => ca, + url: () => ay, + util: () => M, + uuid: () => ty, + uuidv4: () => ny, + uuidv6: () => iy, + uuidv7: () => ry, + void: () => Cy, + xid: () => my, + }); + var js = {}; + ve(js, { + $ZodAny: () => $c, + $ZodArray: () => Ic, + $ZodAsyncError: () => gt, + $ZodBase64: () => cc, + $ZodBase64URL: () => dc, + $ZodBigInt: () => Er, + $ZodBigIntFormat: () => hc, + $ZodBoolean: () => Pr, + $ZodCIDRv4: () => sc, + $ZodCIDRv6: () => uc, + $ZodCUID: () => Hu, + $ZodCUID2: () => Xu, + $ZodCatch: () => qc, + $ZodCheck: () => q, + $ZodCheckBigIntFormat: () => Iu, + $ZodCheckEndsWith: () => Zu, + $ZodCheckGreaterThan: () => zr, + $ZodCheckIncludes: () => Cu, + $ZodCheckLengthEquals: () => Pu, + $ZodCheckLessThan: () => Or, + $ZodCheckLowerCase: () => Du, + $ZodCheckMaxLength: () => Nu, + $ZodCheckMaxSize: () => ju, + $ZodCheckMimeType: () => Lu, + $ZodCheckMinLength: () => Uu, + $ZodCheckMinSize: () => Ou, + $ZodCheckMultipleOf: () => Su, + $ZodCheckNumberFormat: () => xu, + $ZodCheckOverwrite: () => Ju, + $ZodCheckProperty: () => Ru, + $ZodCheckRegex: () => Eu, + $ZodCheckSizeEquals: () => zu, + $ZodCheckStartsWith: () => Au, + $ZodCheckStringFormat: () => bn, + $ZodCheckUpperCase: () => Tu, + $ZodCodec: () => Cr, + $ZodCustom: () => el, + $ZodCustomStringFormat: () => vc, + $ZodDate: () => xc, + $ZodDefault: () => Mc, + $ZodDiscriminatedUnion: () => Uc, + $ZodE164: () => mc, + $ZodEmail: () => qu, + $ZodEmoji: () => Gu, + $ZodEncodeError: () => si, + $ZodEnum: () => Cc, + $ZodError: () => gr, + $ZodFile: () => Zc, + $ZodFunction: () => Xc, + $ZodGUID: () => Fu, + $ZodIPv4: () => ac, + $ZodIPv6: () => oc, + $ZodISODate: () => nc, + $ZodISODateTime: () => tc, + $ZodISODuration: () => rc, + $ZodISOTime: () => ic, + $ZodIntersection: () => Pc, + $ZodJWT: () => fc, + $ZodKSUID: () => ec, + $ZodLazy: () => Qc, + $ZodLiteral: () => Ac, + $ZodMap: () => Dc, + $ZodNaN: () => Bc, + $ZodNanoID: () => Ku, + $ZodNever: () => wc, + $ZodNonOptional: () => Fc, + $ZodNull: () => _c, + $ZodNullable: () => Jc, + $ZodNumber: () => Ur, + $ZodNumberFormat: () => gc, + $ZodObject: () => zc, + $ZodObjectJIT: () => Nc, + $ZodOptional: () => Lc, + $ZodPipe: () => Gc, + $ZodPrefault: () => Vc, + $ZodPromise: () => Yc, + $ZodReadonly: () => Kc, + $ZodRealError: () => ue, + $ZodRecord: () => Ec, + $ZodRegistry: () => Zr, + $ZodSet: () => Tc, + $ZodString: () => yn, + $ZodStringFormat: () => F, + $ZodSuccess: () => Wc, + $ZodSymbol: () => bc, + $ZodTemplateLiteral: () => Hc, + $ZodTransform: () => Rc, + $ZodTuple: () => Tr, + $ZodType: () => T, + $ZodULID: () => Yu, + $ZodURL: () => Bu, + $ZodUUID: () => Wu, + $ZodUndefined: () => yc, + $ZodUnion: () => Dr, + $ZodUnknown: () => kc, + $ZodVoid: () => Sc, + $ZodXID: () => Qu, + $brand: () => zs, + $constructor: () => v, + $input: () => al, + $output: () => rl, + Doc: () => Mu, + JSONSchema: () => Xb, + JSONSchemaGenerator: () => sr, + NEVER: () => Os, + TimePrecision: () => ul, + _any: () => zl, + _array: () => Jl, + _base64: () => na, + _base64url: () => ia, + _bigint: () => kl, + _boolean: () => _l, + _catch: () => Wb, + _check: () => ql, + _cidrv4: () => ea, + _cidrv6: () => ta, + _coercedBigint: () => wl, + _coercedBoolean: () => $l, + _coercedDate: () => Dl, + _coercedNumber: () => fl, + _coercedString: () => sl, + _cuid: () => Br, + _cuid2: () => Gr, + _custom: () => Vl, + _date: () => El, + _decode: () => _r, + _decodeAsync: () => kr, + _default: () => Mb, + _discriminatedUnion: () => Nb, + _e164: () => ra, + _email: () => Lr, + _emoji: () => Wr, + _encode: () => yr, + _encodeAsync: () => $r, + _endsWith: () => ma, + _enum: () => Cb, + _file: () => Ml, + _float32: () => gl, + _float64: () => hl, + _gt: () => yt, + _gte: () => se, + _guid: () => ni, + _includes: () => la, + _int: () => vl, + _int32: () => bl, + _int64: () => Sl, + _intersection: () => Ub, + _ipv4: () => Yr, + _ipv6: () => Qr, + _isoDate: () => ll, + _isoDateTime: () => cl, + _isoDuration: () => ml, + _isoTime: () => dl, + _jwt: () => aa, + _ksuid: () => Xr, + _lazy: () => Kb, + _length: () => fi, + _literal: () => Zb, + _lowercase: () => ua, + _lt: () => bt, + _lte: () => _e, + _map: () => Db, + _max: () => _e, + _maxLength: () => pi, + _maxSize: () => mi, + _mime: () => pa, + _min: () => se, + _minLength: () => Lt, + _minSize: () => un, + _multipleOf: () => sn, + _nan: () => Tl, + _nanoid: () => qr, + _nativeEnum: () => Ab, + _negative: () => Al, + _never: () => Ul, + _nonnegative: () => Rl, + _nonoptional: () => Vb, + _nonpositive: () => Zl, + _normalize: () => fa, + _null: () => Ol, + _nullable: () => Jb, + _number: () => pl, + _optional: () => Lb, + _overwrite: () => kt, + _parse: () => mn, + _parseAsync: () => pn, + _pipe: () => qb, + _positive: () => Cl, + _promise: () => Hb, + _property: () => Ll, + _readonly: () => Bb, + _record: () => Eb, + _refine: () => Fl, + _regex: () => sa, + _safeDecode: () => Sr, + _safeDecodeAsync: () => Ir, + _safeEncode: () => wr, + _safeEncodeAsync: () => xr, + _safeParse: () => fn, + _safeParseAsync: () => vn, + _set: () => Tb, + _size: () => oa, + _startsWith: () => da, + _string: () => ol, + _stringFormat: () => _n, + _stringbool: () => Bl, + _success: () => Fb, + _superRefine: () => Wl, + _symbol: () => Il, + _templateLiteral: () => Gb, + _toLowerCase: () => ga, + _toUpperCase: () => ha, + _transform: () => Rb, + _trim: () => va, + _tuple: () => Pb, + _uint32: () => yl, + _uint64: () => xl, + _ulid: () => Kr, + _undefined: () => jl, + _union: () => zb, + _unknown: () => Nl, + _uppercase: () => ca, + _url: () => di, + _uuid: () => Jr, + _uuidv4: () => Mr, + _uuidv6: () => Vr, + _uuidv7: () => Fr, + _void: () => Pl, + _xid: () => Hr, + clone: () => ge, + config: () => ie, + decode: () => vg, + decodeAsync: () => hg, + encode: () => fg, + encodeAsync: () => gg, + flattenError: () => hr, + formatError: () => br, + globalConfig: () => Xn, + globalRegistry: () => ft, + isValidBase64: () => Nr, + isValidBase64URL: () => lc, + isValidJWT: () => pc, + locales: () => Ar, + parse: () => rr, + parseAsync: () => ar, + prettifyError: () => Ms, + regexes: () => $t, + registry: () => Rr, + safeDecode: () => yg, + safeDecodeAsync: () => $g, + safeEncode: () => bg, + safeEncodeAsync: () => _g, + safeParse: () => Vs, + safeParseAsync: () => Fs, + toDotPath: () => Js, + toJSONSchema: () => Gl, + treeifyError: () => Ls, + util: () => M, + version: () => Vu, + }); + var Os = Object.freeze({ status: 'aborted' }); + function v(e, t, i) { + var n; + function r(a, c) { + var m, p; + (Object.defineProperty(a, '_zod', { + value: (m = a._zod) != null ? m : {}, + enumerable: !1, + }), + (p = a._zod).traits != null || (p.traits = new Set()), + a._zod.traits.add(e), + t(a, c)); + for (let f in u.prototype) + f in a || + Object.defineProperty(a, f, { value: u.prototype[f].bind(a) }); + ((a._zod.constr = u), (a._zod.def = c)); + } + let o = (n = i?.Parent) != null ? n : Object; + class s extends o {} + function u(a) { + var c; + let m = i?.Parent ? new s() : this; + (r(m, a), (c = m._zod).deferred != null || (c.deferred = [])); + for (let p of m._zod.deferred) p(); + return m; + } + return ( + Object.defineProperty(s, 'name', { value: e }), + Object.defineProperty(u, 'init', { value: r }), + Object.defineProperty(u, Symbol.hasInstance, { + value: (a) => { + var c, m; + return ( + !!(i?.Parent && a instanceof i.Parent) || + ((m = (c = a?._zod) == null ? void 0 : c.traits) == null + ? void 0 + : m.has(e)) + ); + }, + }), + Object.defineProperty(u, 'name', { value: e }), + u + ); + } + var zs = Symbol('zod_brand'), + gt = class extends Error { + constructor() { + super( + 'Encountered Promise during synchronous parse. Use .parseAsync() instead.', + ); + } + }, + si = class extends Error { + constructor(e) { + (super(`Encountered unidirectional transform during encode: ${e}`), + (this.name = 'ZodEncodeError')); + } + }, + Xn = {}; + function ie(e) { + return (e && Object.assign(Xn, e), Xn); + } + var M = {}; + function Mv(e) { + return e; + } + function Vv(e) { + return e; + } + function Fv(e) {} + function Wv(e) { + throw new Error(); + } + function qv(e) {} + function fr(e) { + let t = Object.values(e).filter((i) => typeof i == 'number'); + return Object.entries(e) + .filter(([i, n]) => t.indexOf(+i) === -1) + .map(([i, n]) => n); + } + function _(e, t = '|') { + return e.map((i) => P(i)).join(t); + } + function Yn(e, t) { + return typeof t == 'bigint' ? t.toString() : t; + } + function dn(e) { + return { + get value() { + { + let t = e(); + return (Object.defineProperty(this, 'value', { value: t }), t); + } + }, + }; + } + function _t(e) { + return e == null; + } + function ui(e) { + let t = e.startsWith('^') ? 1 : 0, + i = e.endsWith('$') ? e.length - 1 : e.length; + return e.slice(t, i); + } + function Ns(e, t) { + let i = (e.toString().split('.')[1] || '').length, + n = t.toString(), + r = (n.split('.')[1] || '').length; + if (r === 0 && /\d?e-\d?/.test(n)) { + let s = n.match(/\d?e-(\d?)/); + s?.[1] && (r = Number.parseInt(s[1])); + } + let o = i > r ? i : r; + return ( + (Number.parseInt(e.toFixed(o).replace('.', '')) % + Number.parseInt(t.toFixed(o).replace('.', ''))) / + 10 ** o + ); + } + ve(M, { + BIGINT_FORMAT_RANGES: () => Cs, + Class: () => pg, + NUMBER_FORMAT_RANGES: () => Ts, + aborted: () => pt, + allowsEval: () => Us, + assert: () => qv, + assertEqual: () => Mv, + assertIs: () => Fv, + assertNever: () => Wv, + assertNotEqual: () => Vv, + assignProp: () => Fe, + base64ToUint8Array: () => As, + base64urlToUint8Array: () => cg, + cached: () => dn, + captureStackTrace: () => vr, + cleanEnum: () => ug, + cleanRegex: () => ui, + clone: () => ge, + cloneDef: () => Gv, + createTransparentProxy: () => eg, + defineLazy: () => J, + esc: () => ir, + escapeRegex: () => Me, + extend: () => ig, + finalizeIssue: () => $e, + floatSafeRemainder: () => Ns, + getElementAtPath: () => Kv, + getEnumValues: () => fr, + getLengthableOrigin: () => li, + getParsedType: () => Qv, + getSizableOrigin: () => ci, + hexToUint8Array: () => dg, + isObject: () => Zt, + isPlainObject: () => ht, + issue: () => ei, + joinValues: () => _, + jsonStringifyReplacer: () => Yn, + merge: () => ag, + mergeDefs: () => We, + normalizeParams: () => $, + nullish: () => _t, + numKeys: () => Yv, + objectClone: () => Bv, + omit: () => ng, + optionalKeys: () => Ds, + partial: () => og, + pick: () => tg, + prefixIssues: () => ye, + primitiveTypes: () => Es, + promiseAllObject: () => Hv, + propertyKeyTypes: () => Qn, + randomString: () => Xv, + required: () => sg, + safeExtend: () => rg, + shallowClone: () => Ps, + stringifyPrimitive: () => P, + uint8ArrayToBase64: () => Zs, + uint8ArrayToBase64url: () => lg, + uint8ArrayToHex: () => mg, + unwrapMessage: () => on, + }); + var cs = Symbol('evaluating'); + function J(e, t, i) { + let n; + Object.defineProperty(e, t, { + get() { + if (n !== cs) return (n === void 0 && ((n = cs), (n = i())), n); + }, + set(r) { + Object.defineProperty(e, t, { value: r }); + }, + configurable: !0, + }); + } + function Bv(e) { + return Object.create( + Object.getPrototypeOf(e), + Object.getOwnPropertyDescriptors(e), + ); + } + function Fe(e, t, i) { + Object.defineProperty(e, t, { + value: i, + writable: !0, + enumerable: !0, + configurable: !0, + }); + } + function We(...e) { + let t = {}; + for (let i of e) { + let n = Object.getOwnPropertyDescriptors(i); + Object.assign(t, n); + } + return Object.defineProperties({}, t); + } + function Gv(e) { + return We(e._zod.def); + } + function Kv(e, t) { + return t ? t.reduce((i, n) => i?.[n], e) : e; + } + function Hv(e) { + let t = Object.keys(e), + i = t.map((n) => e[n]); + return Promise.all(i).then((n) => { + let r = {}; + for (let o = 0; o < t.length; o++) r[t[o]] = n[o]; + return r; + }); + } + function Xv(e = 10) { + let t = 'abcdefghijklmnopqrstuvwxyz', + i = ''; + for (let n = 0; n < e; n++) i += t[Math.floor(26 * Math.random())]; + return i; + } + function ir(e) { + return JSON.stringify(e); + } + var vr = + 'captureStackTrace' in Error ? Error.captureStackTrace : (...e) => {}; + function Zt(e) { + return typeof e == 'object' && e !== null && !Array.isArray(e); + } + var Us = dn(() => { + var e; + if ( + typeof navigator < 'u' && + (e = navigator?.userAgent) != null && + e.includes('Cloudflare') + ) + return !1; + try { + return (new Function(''), !0); + } catch { + return !1; + } + }); + function ht(e) { + if (Zt(e) === !1) return !1; + let t = e.constructor; + if (t === void 0) return !0; + let i = t.prototype; + return ( + Zt(i) !== !1 && + Object.prototype.hasOwnProperty.call(i, 'isPrototypeOf') !== !1 + ); + } + function Ps(e) { + return ht(e) ? { ...e } : Array.isArray(e) ? [...e] : e; + } + function Yv(e) { + let t = 0; + for (let i in e) Object.prototype.hasOwnProperty.call(e, i) && t++; + return t; + } + var Qv = (e) => { + let t = typeof e; + switch (t) { + case 'undefined': + return 'undefined'; + case 'string': + return 'string'; + case 'number': + return Number.isNaN(e) ? 'nan' : 'number'; + case 'boolean': + return 'boolean'; + case 'function': + return 'function'; + case 'bigint': + return 'bigint'; + case 'symbol': + return 'symbol'; + case 'object': + return Array.isArray(e) + ? 'array' + : e === null + ? 'null' + : e.then && + typeof e.then == 'function' && + e.catch && + typeof e.catch == 'function' + ? 'promise' + : typeof Map < 'u' && e instanceof Map + ? 'map' + : typeof Set < 'u' && e instanceof Set + ? 'set' + : typeof Date < 'u' && e instanceof Date + ? 'date' + : typeof File < 'u' && e instanceof File + ? 'file' + : 'object'; + default: + throw new Error(`Unknown data type: ${t}`); + } + }, + Qn = new Set(['string', 'number', 'symbol']), + Es = new Set([ + 'string', + 'number', + 'bigint', + 'boolean', + 'symbol', + 'undefined', + ]); + function Me(e) { + return e.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + function ge(e, t, i) { + let n = new e._zod.constr(t ?? e._zod.def); + return ((t && !i?.parent) || (n._zod.parent = e), n); + } + function $(e) { + let t = e; + if (!t) return {}; + if (typeof t == 'string') return { error: () => t }; + if (t?.message !== void 0) { + if (t?.error !== void 0) + throw new Error('Cannot specify both `message` and `error` params'); + t.error = t.message; + } + return ( + delete t.message, + typeof t.error == 'string' ? { ...t, error: () => t.error } : t + ); + } + function eg(e) { + let t; + return new Proxy( + {}, + { + get: (i, n, r) => (t != null || (t = e()), Reflect.get(t, n, r)), + set: (i, n, r, o) => (t != null || (t = e()), Reflect.set(t, n, r, o)), + has: (i, n) => (t != null || (t = e()), Reflect.has(t, n)), + deleteProperty: (i, n) => ( + t != null || (t = e()), + Reflect.deleteProperty(t, n) + ), + ownKeys: (i) => (t != null || (t = e()), Reflect.ownKeys(t)), + getOwnPropertyDescriptor: (i, n) => ( + t != null || (t = e()), + Reflect.getOwnPropertyDescriptor(t, n) + ), + defineProperty: (i, n, r) => ( + t != null || (t = e()), + Reflect.defineProperty(t, n, r) + ), + }, + ); + } + function P(e) { + return typeof e == 'bigint' + ? e.toString() + 'n' + : typeof e == 'string' + ? `"${e}"` + : `${e}`; + } + function Ds(e) { + return Object.keys(e).filter( + (t) => e[t]._zod.optin === 'optional' && e[t]._zod.optout === 'optional', + ); + } + var Ts = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE], + }, + Cs = { + int64: [BigInt('-9223372036854775808'), BigInt('9223372036854775807')], + uint64: [BigInt(0), BigInt('18446744073709551615')], + }; + function tg(e, t) { + let i = e._zod.def; + return ge( + e, + We(e._zod.def, { + get shape() { + let n = {}; + for (let r in t) { + if (!(r in i.shape)) throw new Error(`Unrecognized key: "${r}"`); + t[r] && (n[r] = i.shape[r]); + } + return (Fe(this, 'shape', n), n); + }, + checks: [], + }), + ); + } + function ng(e, t) { + let i = e._zod.def, + n = We(e._zod.def, { + get shape() { + let r = { ...e._zod.def.shape }; + for (let o in t) { + if (!(o in i.shape)) throw new Error(`Unrecognized key: "${o}"`); + t[o] && delete r[o]; + } + return (Fe(this, 'shape', r), r); + }, + checks: [], + }); + return ge(e, n); + } + function ig(e, t) { + if (!ht(t)) + throw new Error('Invalid input to extend: expected a plain object'); + let i = e._zod.def.checks; + if (i && i.length > 0) + throw new Error( + 'Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.', + ); + let n = We(e._zod.def, { + get shape() { + let r = { ...e._zod.def.shape, ...t }; + return (Fe(this, 'shape', r), r); + }, + checks: [], + }); + return ge(e, n); + } + function rg(e, t) { + if (!ht(t)) + throw new Error('Invalid input to safeExtend: expected a plain object'); + let i = { + ...e._zod.def, + get shape() { + let n = { ...e._zod.def.shape, ...t }; + return (Fe(this, 'shape', n), n); + }, + checks: e._zod.def.checks, + }; + return ge(e, i); + } + function ag(e, t) { + let i = We(e._zod.def, { + get shape() { + let n = { ...e._zod.def.shape, ...t._zod.def.shape }; + return (Fe(this, 'shape', n), n); + }, + get catchall() { + return t._zod.def.catchall; + }, + checks: [], + }); + return ge(e, i); + } + function og(e, t, i) { + let n = We(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in r)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && + (o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]); + } + else + for (let s in r) + o[s] = e ? new e({ type: 'optional', innerType: r[s] }) : r[s]; + return (Fe(this, 'shape', o), o); + }, + checks: [], + }); + return ge(t, n); + } + function sg(e, t, i) { + let n = We(t._zod.def, { + get shape() { + let r = t._zod.def.shape, + o = { ...r }; + if (i) + for (let s in i) { + if (!(s in o)) throw new Error(`Unrecognized key: "${s}"`); + i[s] && (o[s] = new e({ type: 'nonoptional', innerType: r[s] })); + } + else + for (let s in r) + o[s] = new e({ type: 'nonoptional', innerType: r[s] }); + return (Fe(this, 'shape', o), o); + }, + checks: [], + }); + return ge(t, n); + } + function pt(e, t = 0) { + var i; + if (e.aborted === !0) return !0; + for (let n = t; n < e.issues.length; n++) + if (((i = e.issues[n]) == null ? void 0 : i.continue) !== !0) return !0; + return !1; + } + function ye(e, t) { + return t.map((i) => { + var n; + return ((n = i).path != null || (n.path = []), i.path.unshift(e), i); + }); + } + function on(e) { + return typeof e == 'string' ? e : e?.message; + } + function $e(e, t, i) { + var n, r, o, s, u, a, c, m, p, f, h; + let N = { ...e, path: (n = e.path) != null ? n : [] }; + if (!e.message) { + let k = + (h = + (f = + (m = + (a = on( + (s = + (o = (r = e.inst) == null ? void 0 : r._zod.def) == null + ? void 0 + : o.error) == null + ? void 0 + : s.call(o, e), + )) != null + ? a + : on((u = t?.error) == null ? void 0 : u.call(t, e))) != null + ? m + : on((c = i.customError) == null ? void 0 : c.call(i, e))) != null + ? f + : on((p = i.localeError) == null ? void 0 : p.call(i, e))) != null + ? h + : 'Invalid input'; + N.message = k; + } + return ( + delete N.inst, + delete N.continue, + t?.reportInput || delete N.input, + N + ); + } + function ci(e) { + return e instanceof Set + ? 'set' + : e instanceof Map + ? 'map' + : e instanceof File + ? 'file' + : 'unknown'; + } + function li(e) { + return Array.isArray(e) + ? 'array' + : typeof e == 'string' + ? 'string' + : 'unknown'; + } + function ei(...e) { + let [t, i, n] = e; + return typeof t == 'string' + ? { message: t, code: 'custom', input: i, inst: n } + : { ...t }; + } + function ug(e) { + return Object.entries(e) + .filter(([t, i]) => Number.isNaN(Number.parseInt(t, 10))) + .map((t) => t[1]); + } + function As(e) { + let t = atob(e), + i = new Uint8Array(t.length); + for (let n = 0; n < t.length; n++) i[n] = t.charCodeAt(n); + return i; + } + function Zs(e) { + let t = ''; + for (let i = 0; i < e.length; i++) t += String.fromCharCode(e[i]); + return btoa(t); + } + function cg(e) { + let t = e.replace(/-/g, '+').replace(/_/g, '/'); + return As(t + '='.repeat((4 - (t.length % 4)) % 4)); + } + function lg(e) { + return Zs(e).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); + } + function dg(e) { + let t = e.replace(/^0x/, ''); + if (t.length % 2 != 0) throw new Error('Invalid hex string length'); + let i = new Uint8Array(t.length / 2); + for (let n = 0; n < t.length; n += 2) + i[n / 2] = Number.parseInt(t.slice(n, n + 2), 16); + return i; + } + function mg(e) { + return Array.from(e) + .map((t) => t.toString(16).padStart(2, '0')) + .join(''); + } + var pg = class { + constructor(...e) {} + }, + Rs = (e, t) => { + ((e.name = '$ZodError'), + Object.defineProperty(e, '_zod', { value: e._zod, enumerable: !1 }), + Object.defineProperty(e, 'issues', { value: t, enumerable: !1 }), + (e.message = JSON.stringify(t, Yn, 2)), + Object.defineProperty(e, 'toString', { + value: () => e.message, + enumerable: !1, + })); + }, + gr = v('$ZodError', Rs), + ue = v('$ZodError', Rs, { Parent: Error }); + function hr(e, t = (i) => i.message) { + let i = {}, + n = []; + for (let r of e.issues) + r.path.length > 0 + ? ((i[r.path[0]] = i[r.path[0]] || []), i[r.path[0]].push(t(r))) + : n.push(t(r)); + return { formErrors: n, fieldErrors: i }; + } + function br(e, t = (i) => i.message) { + let i = { _errors: [] }, + n = (r) => { + for (let o of r.issues) + if (o.code === 'invalid_union' && o.errors.length) + o.errors.map((s) => n({ issues: s })); + else if (o.code === 'invalid_key') n({ issues: o.issues }); + else if (o.code === 'invalid_element') n({ issues: o.issues }); + else if (o.path.length === 0) i._errors.push(t(o)); + else { + let s = i, + u = 0; + for (; u < o.path.length; ) { + let a = o.path[u]; + (u === o.path.length - 1 + ? ((s[a] = s[a] || { _errors: [] }), s[a]._errors.push(t(o))) + : (s[a] = s[a] || { _errors: [] }), + (s = s[a]), + u++); + } + } + }; + return (n(e), i); + } + function Ls(e, t = (i) => i.message) { + let i = { errors: [] }, + n = (r, o = []) => { + var s, u; + for (let a of r.issues) + if (a.code === 'invalid_union' && a.errors.length) + a.errors.map((c) => n({ issues: c }, a.path)); + else if (a.code === 'invalid_key') n({ issues: a.issues }, a.path); + else if (a.code === 'invalid_element') + n({ issues: a.issues }, a.path); + else { + let c = [...o, ...a.path]; + if (c.length === 0) { + i.errors.push(t(a)); + continue; + } + let m = i, + p = 0; + for (; p < c.length; ) { + let f = c[p], + h = p === c.length - 1; + (typeof f == 'string' + ? (m.properties != null || (m.properties = {}), + (s = m.properties)[f] != null || (s[f] = { errors: [] }), + (m = m.properties[f])) + : (m.items != null || (m.items = []), + (u = m.items)[f] != null || (u[f] = { errors: [] }), + (m = m.items[f])), + h && m.errors.push(t(a)), + p++); + } + } + }; + return (n(e), i); + } + function Js(e) { + let t = [], + i = e.map((n) => (typeof n == 'object' ? n.key : n)); + for (let n of i) + typeof n == 'number' + ? t.push(`[${n}]`) + : typeof n == 'symbol' + ? t.push(`[${JSON.stringify(String(n))}]`) + : /[^\w$]/.test(n) + ? t.push(`[${JSON.stringify(n)}]`) + : (t.length && t.push('.'), t.push(n)); + return t.join(''); + } + function Ms(e) { + var t; + let i = [], + n = [...e.issues].sort((r, o) => { + var s, u; + return ( + ((s = r.path) != null ? s : []).length - + ((u = o.path) != null ? u : []).length + ); + }); + for (let r of n) + (i.push(`✖ ${r.message}`), + (t = r.path) != null && t.length && i.push(` → at ${Js(r.path)}`)); + return i.join(` +`); + } + var mn = (e) => (t, i, n, r) => { + var o; + let s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, + u = t._zod.run({ value: i, issues: [] }, s); + if (u instanceof Promise) throw new gt(); + if (u.issues.length) { + let a = new ((o = r?.Err) != null ? o : e)( + u.issues.map((c) => $e(c, s, ie())), + ); + throw (vr(a, r?.callee), a); + } + return u.value; + }, + rr = mn(ue), + pn = (e) => async (t, i, n, r) => { + var o; + let s = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + u = t._zod.run({ value: i, issues: [] }, s); + if ((u instanceof Promise && (u = await u), u.issues.length)) { + let a = new ((o = r?.Err) != null ? o : e)( + u.issues.map((c) => $e(c, s, ie())), + ); + throw (vr(a, r?.callee), a); + } + return u.value; + }, + ar = pn(ue), + fn = (e) => (t, i, n) => { + let r = n ? { ...n, async: !1 } : { async: !1 }, + o = t._zod.run({ value: i, issues: [] }, r); + if (o instanceof Promise) throw new gt(); + return o.issues.length + ? { + success: !1, + error: new (e ?? gr)(o.issues.map((s) => $e(s, r, ie()))), + } + : { success: !0, data: o.value }; + }, + Vs = fn(ue), + vn = (e) => async (t, i, n) => { + let r = n ? Object.assign(n, { async: !0 }) : { async: !0 }, + o = t._zod.run({ value: i, issues: [] }, r); + return ( + o instanceof Promise && (o = await o), + o.issues.length + ? { success: !1, error: new e(o.issues.map((s) => $e(s, r, ie()))) } + : { success: !0, data: o.value } + ); + }, + Fs = vn(ue), + yr = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return mn(e)(t, i, r); + }, + fg = yr(ue), + _r = (e) => (t, i, n) => mn(e)(t, i, n), + vg = _r(ue), + $r = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return pn(e)(t, i, r); + }, + gg = $r(ue), + kr = (e) => async (t, i, n) => pn(e)(t, i, n), + hg = kr(ue), + wr = (e) => (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return fn(e)(t, i, r); + }, + bg = wr(ue), + Sr = (e) => (t, i, n) => fn(e)(t, i, n), + yg = Sr(ue), + xr = (e) => async (t, i, n) => { + let r = n + ? Object.assign(n, { direction: 'backward' }) + : { direction: 'backward' }; + return vn(e)(t, i, r); + }, + _g = xr(ue), + Ir = (e) => async (t, i, n) => vn(e)(t, i, n), + $g = Ir(ue), + $t = {}; + ve($t, { + base64: () => ou, + base64url: () => jr, + bigint: () => vu, + boolean: () => bu, + browserEmail: () => zg, + cidrv4: () => ru, + cidrv6: () => au, + cuid: () => Ws, + cuid2: () => qs, + date: () => lu, + datetime: () => pu, + domain: () => Ug, + duration: () => Xs, + e164: () => uu, + email: () => Qs, + emoji: () => tu, + extendedDuration: () => kg, + guid: () => Ys, + hex: () => Pg, + hostname: () => su, + html5Email: () => Ig, + idnEmail: () => Og, + integer: () => gu, + ipv4: () => nu, + ipv6: () => iu, + ksuid: () => Ks, + lowercase: () => $u, + md5_base64: () => Dg, + md5_base64url: () => Tg, + md5_hex: () => Eg, + nanoid: () => Hs, + null: () => yu, + number: () => hu, + rfc5322Email: () => jg, + sha1_base64: () => Ag, + sha1_base64url: () => Zg, + sha1_hex: () => Cg, + sha256_base64: () => Lg, + sha256_base64url: () => Jg, + sha256_hex: () => Rg, + sha384_base64: () => Vg, + sha384_base64url: () => Fg, + sha384_hex: () => Mg, + sha512_base64: () => qg, + sha512_base64url: () => Bg, + sha512_hex: () => Wg, + string: () => fu, + time: () => mu, + ulid: () => Bs, + undefined: () => _u, + unicodeEmail: () => eu, + uppercase: () => ku, + uuid: () => Rt, + uuid4: () => wg, + uuid6: () => Sg, + uuid7: () => xg, + xid: () => Gs, + }); + var Ws = /^[cC][^\s-]{8,}$/, + qs = /^[0-9a-z]+$/, + Bs = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, + Gs = /^[0-9a-vA-V]{20}$/, + Ks = /^[A-Za-z0-9]{27}$/, + Hs = /^[a-zA-Z0-9_-]{21}$/, + Xs = + /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, + kg = + /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, + Ys = + /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, + Rt = (e) => + e + ? new RegExp( + `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`, + ) + : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, + wg = Rt(4), + Sg = Rt(6), + xg = Rt(7), + Qs = + /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, + Ig = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + jg = + /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + eu = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, + Og = eu, + zg = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, + Ng = '^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$'; + function tu() { + return new RegExp(Ng, 'u'); + } + var nu = + /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, + iu = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, + ru = + /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, + au = + /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, + ou = + /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, + jr = /^[A-Za-z0-9_-]*$/, + su = + /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, + Ug = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, + uu = /^\+(?:[0-9]){6,14}[0-9]$/, + cu = + '(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))', + lu = new RegExp(`^${cu}$`); + function du(e) { + let t = '(?:[01]\\d|2[0-3]):[0-5]\\d'; + return typeof e.precision == 'number' + ? e.precision === -1 + ? `${t}` + : e.precision === 0 + ? `${t}:[0-5]\\d` + : `${t}:[0-5]\\d\\.\\d{${e.precision}}` + : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; + } + function mu(e) { + return new RegExp(`^${du(e)}$`); + } + function pu(e) { + let t = du({ precision: e.precision }), + i = ['Z']; + (e.local && i.push(''), + e.offset && i.push('([+-](?:[01]\\d|2[0-3]):[0-5]\\d)')); + let n = `${t}(?:${i.join('|')})`; + return new RegExp(`^${cu}T(?:${n})$`); + } + var fu = (e) => { + var t, i; + let n = e + ? `[\\s\\S]{${(t = e?.minimum) != null ? t : 0},${(i = e?.maximum) != null ? i : ''}}` + : '[\\s\\S]*'; + return new RegExp(`^${n}$`); + }, + vu = /^-?\d+n?$/, + gu = /^-?\d+$/, + hu = /^-?\d+(?:\.\d+)?/, + bu = /^(?:true|false)$/i, + yu = /^null$/i, + _u = /^undefined$/i, + $u = /^[^A-Z]*$/, + ku = /^[^a-z]*$/, + Pg = /^[0-9a-fA-F]*$/; + function gn(e, t) { + return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`); + } + function hn(e) { + return new RegExp(`^[A-Za-z0-9_-]{${e}}$`); + } + var Eg = /^[0-9a-fA-F]{32}$/, + Dg = gn(22, '=='), + Tg = hn(22), + Cg = /^[0-9a-fA-F]{40}$/, + Ag = gn(27, '='), + Zg = hn(27), + Rg = /^[0-9a-fA-F]{64}$/, + Lg = gn(43, '='), + Jg = hn(43), + Mg = /^[0-9a-fA-F]{96}$/, + Vg = gn(64, ''), + Fg = hn(64), + Wg = /^[0-9a-fA-F]{128}$/, + qg = gn(86, '=='), + Bg = hn(86), + q = v('$ZodCheck', (e, t) => { + var i; + (e._zod != null || (e._zod = {}), + (e._zod.def = t), + (i = e._zod).onattach != null || (i.onattach = [])); + }), + wu = { number: 'number', bigint: 'bigint', object: 'date' }, + Or = v('$ZodCheckLessThan', (e, t) => { + q.init(e, t); + let i = wu[typeof t.value]; + (e._zod.onattach.push((n) => { + var r; + let o = n._zod.bag, + s = + (r = t.inclusive ? o.maximum : o.exclusiveMaximum) != null + ? r + : Number.POSITIVE_INFINITY; + t.value < s && + (t.inclusive + ? (o.maximum = t.value) + : (o.exclusiveMaximum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value <= t.value : n.value < t.value) || + n.issues.push({ + origin: i, + code: 'too_big', + maximum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + zr = v('$ZodCheckGreaterThan', (e, t) => { + q.init(e, t); + let i = wu[typeof t.value]; + (e._zod.onattach.push((n) => { + var r; + let o = n._zod.bag, + s = + (r = t.inclusive ? o.minimum : o.exclusiveMinimum) != null + ? r + : Number.NEGATIVE_INFINITY; + t.value > s && + (t.inclusive + ? (o.minimum = t.value) + : (o.exclusiveMinimum = t.value)); + }), + (e._zod.check = (n) => { + (t.inclusive ? n.value >= t.value : n.value > t.value) || + n.issues.push({ + origin: i, + code: 'too_small', + minimum: t.value, + input: n.value, + inclusive: t.inclusive, + inst: e, + continue: !t.abort, + }); + })); + }), + Su = v('$ZodCheckMultipleOf', (e, t) => { + (q.init(e, t), + e._zod.onattach.push((i) => { + var n; + (n = i._zod.bag).multipleOf != null || (n.multipleOf = t.value); + }), + (e._zod.check = (i) => { + if (typeof i.value != typeof t.value) + throw new Error( + 'Cannot mix number and bigint in multiple_of check.', + ); + (typeof i.value == 'bigint' + ? i.value % t.value === BigInt(0) + : Ns(i.value, t.value) === 0) || + i.issues.push({ + origin: typeof i.value, + code: 'not_multiple_of', + divisor: t.value, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + xu = v('$ZodCheckNumberFormat', (e, t) => { + var i; + (q.init(e, t), (t.format = t.format || 'float64')); + let n = (i = t.format) == null ? void 0 : i.includes('int'), + r = n ? 'int' : 'number', + [o, s] = Ts[t.format]; + (e._zod.onattach.push((u) => { + let a = u._zod.bag; + ((a.format = t.format), + (a.minimum = o), + (a.maximum = s), + n && (a.pattern = gu)); + }), + (e._zod.check = (u) => { + let a = u.value; + if (n) { + if (!Number.isInteger(a)) + return void u.issues.push({ + expected: r, + format: t.format, + code: 'invalid_type', + continue: !1, + input: a, + inst: e, + }); + if (!Number.isSafeInteger(a)) + return void (a > 0 + ? u.issues.push({ + input: a, + code: 'too_big', + maximum: Number.MAX_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: r, + continue: !t.abort, + }) + : u.issues.push({ + input: a, + code: 'too_small', + minimum: Number.MIN_SAFE_INTEGER, + note: 'Integers must be within the safe integer range.', + inst: e, + origin: r, + continue: !t.abort, + })); + } + (a < o && + u.issues.push({ + origin: 'number', + input: a, + code: 'too_small', + minimum: o, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + a > s && + u.issues.push({ + origin: 'number', + input: a, + code: 'too_big', + maximum: s, + inst: e, + })); + })); + }), + Iu = v('$ZodCheckBigIntFormat', (e, t) => { + q.init(e, t); + let [i, n] = Cs[t.format]; + (e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), (o.minimum = i), (o.maximum = n)); + }), + (e._zod.check = (r) => { + let o = r.value; + (o < i && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_small', + minimum: i, + inclusive: !0, + inst: e, + continue: !t.abort, + }), + o > n && + r.issues.push({ + origin: 'bigint', + input: o, + code: 'too_big', + maximum: n, + inst: e, + })); + })); + }), + ju = v('$ZodCheckMaxSize', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.maximum) != null ? r : Number.POSITIVE_INFINITY; + t.maximum < o && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size <= t.maximum || + n.issues.push({ + origin: ci(r), + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + Ou = v('$ZodCheckMinSize', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.minimum) != null ? r : Number.NEGATIVE_INFINITY; + t.minimum > o && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + r.size >= t.minimum || + n.issues.push({ + origin: ci(r), + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + zu = v('$ZodCheckSizeEquals', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.size !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.size), (r.maximum = t.size), (r.size = t.size)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.size; + if (o === t.size) return; + let s = o > t.size; + n.issues.push({ + origin: ci(r), + ...(s + ? { code: 'too_big', maximum: t.size } + : { code: 'too_small', minimum: t.size }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Nu = v('$ZodCheckMaxLength', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.maximum) != null ? r : Number.POSITIVE_INFINITY; + t.maximum < o && (n._zod.bag.maximum = t.maximum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length <= t.maximum) return; + let o = li(r); + n.issues.push({ + origin: o, + code: 'too_big', + maximum: t.maximum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + Uu = v('$ZodCheckMinLength', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + var r; + let o = + (r = n._zod.bag.minimum) != null ? r : Number.NEGATIVE_INFINITY; + t.minimum > o && (n._zod.bag.minimum = t.minimum); + }), + (e._zod.check = (n) => { + let r = n.value; + if (r.length >= t.minimum) return; + let o = li(r); + n.issues.push({ + origin: o, + code: 'too_small', + minimum: t.minimum, + inclusive: !0, + input: r, + inst: e, + continue: !t.abort, + }); + })); + }), + Pu = v('$ZodCheckLengthEquals', (e, t) => { + var i; + (q.init(e, t), + (i = e._zod.def).when != null || + (i.when = (n) => { + let r = n.value; + return !_t(r) && r.length !== void 0; + }), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + ((r.minimum = t.length), + (r.maximum = t.length), + (r.length = t.length)); + }), + (e._zod.check = (n) => { + let r = n.value, + o = r.length; + if (o === t.length) return; + let s = li(r), + u = o > t.length; + n.issues.push({ + origin: s, + ...(u + ? { code: 'too_big', maximum: t.length } + : { code: 'too_small', minimum: t.length }), + inclusive: !0, + exact: !0, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + bn = v('$ZodCheckStringFormat', (e, t) => { + var i, n; + (q.init(e, t), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + ((o.format = t.format), + t.pattern && + (o.patterns != null || (o.patterns = new Set()), + o.patterns.add(t.pattern))); + }), + t.pattern + ? (i = e._zod).check != null || + (i.check = (r) => { + ((t.pattern.lastIndex = 0), + t.pattern.test(r.value) || + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: t.format, + input: r.value, + ...(t.pattern ? { pattern: t.pattern.toString() } : {}), + inst: e, + continue: !t.abort, + })); + }) + : (n = e._zod).check != null || (n.check = () => {})); + }), + Eu = v('$ZodCheckRegex', (e, t) => { + (bn.init(e, t), + (e._zod.check = (i) => { + ((t.pattern.lastIndex = 0), + t.pattern.test(i.value) || + i.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'regex', + input: i.value, + pattern: t.pattern.toString(), + inst: e, + continue: !t.abort, + })); + })); + }), + Du = v('$ZodCheckLowerCase', (e, t) => { + (t.pattern != null || (t.pattern = $u), bn.init(e, t)); + }), + Tu = v('$ZodCheckUpperCase', (e, t) => { + (t.pattern != null || (t.pattern = ku), bn.init(e, t)); + }), + Cu = v('$ZodCheckIncludes', (e, t) => { + q.init(e, t); + let i = Me(t.includes), + n = new RegExp( + typeof t.position == 'number' ? `^.{${t.position}}${i}` : i, + ); + ((t.pattern = n), + e._zod.onattach.push((r) => { + let o = r._zod.bag; + (o.patterns != null || (o.patterns = new Set()), o.patterns.add(n)); + }), + (e._zod.check = (r) => { + r.value.includes(t.includes, t.position) || + r.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'includes', + includes: t.includes, + input: r.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Au = v('$ZodCheckStartsWith', (e, t) => { + q.init(e, t); + let i = new RegExp(`^${Me(t.prefix)}.*`); + (t.pattern != null || (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns != null || (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.startsWith(t.prefix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'starts_with', + prefix: t.prefix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Zu = v('$ZodCheckEndsWith', (e, t) => { + q.init(e, t); + let i = new RegExp(`.*${Me(t.suffix)}$`); + (t.pattern != null || (t.pattern = i), + e._zod.onattach.push((n) => { + let r = n._zod.bag; + (r.patterns != null || (r.patterns = new Set()), r.patterns.add(i)); + }), + (e._zod.check = (n) => { + n.value.endsWith(t.suffix) || + n.issues.push({ + origin: 'string', + code: 'invalid_format', + format: 'ends_with', + suffix: t.suffix, + input: n.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function ls(e, t, i) { + e.issues.length && t.issues.push(...ye(i, e.issues)); + } + var Ru = v('$ZodCheckProperty', (e, t) => { + (q.init(e, t), + (e._zod.check = (i) => { + let n = t.schema._zod.run( + { value: i.value[t.property], issues: [] }, + {}, + ); + if (n instanceof Promise) return n.then((r) => ls(r, i, t.property)); + ls(n, i, t.property); + })); + }), + Lu = v('$ZodCheckMimeType', (e, t) => { + q.init(e, t); + let i = new Set(t.mime); + (e._zod.onattach.push((n) => { + n._zod.bag.mime = t.mime; + }), + (e._zod.check = (n) => { + i.has(n.value.type) || + n.issues.push({ + code: 'invalid_value', + values: t.mime, + input: n.value.type, + inst: e, + continue: !t.abort, + }); + })); + }), + Ju = v('$ZodCheckOverwrite', (e, t) => { + (q.init(e, t), + (e._zod.check = (i) => { + i.value = t.tx(i.value); + })); + }), + Mu = class { + constructor(e = []) { + ((this.content = []), (this.indent = 0), this && (this.args = e)); + } + indented(e) { + ((this.indent += 1), e(this), (this.indent -= 1)); + } + write(e) { + if (typeof e == 'function') + return ( + e(this, { execution: 'sync' }), + void e(this, { execution: 'async' }) + ); + let t = e + .split( + ` +`, + ) + .filter((r) => r), + i = Math.min(...t.map((r) => r.length - r.trimStart().length)), + n = t + .map((r) => r.slice(i)) + .map((r) => ' '.repeat(2 * this.indent) + r); + for (let r of n) this.content.push(r); + } + compile() { + var e; + return new Function( + ...(this == null ? void 0 : this.args), + [ + ...((e = this == null ? void 0 : this.content) != null + ? e + : [''] + ).map((t) => ` ${t}`), + ].join(` +`), + ); + } + }, + Vu = { major: 4, minor: 1, patch: 12 }, + T = v('$ZodType', (e, t) => { + var i, n, r; + (e != null || (e = {}), + (e._zod.def = t), + (e._zod.bag = e._zod.bag || {}), + (e._zod.version = Vu)); + let o = [...((i = e._zod.def.checks) != null ? i : [])]; + e._zod.traits.has('$ZodCheck') && o.unshift(e); + for (let s of o) for (let u of s._zod.onattach) u(e); + if (o.length === 0) + ((r = e._zod).deferred != null || (r.deferred = []), + (n = e._zod.deferred) == null || + n.push(() => { + e._zod.run = e._zod.parse; + })); + else { + let s = (a, c, m) => { + let p, + f = pt(a); + for (let h of c) { + if (h._zod.def.when) { + if (!h._zod.def.when(a)) continue; + } else if (f) continue; + let N = a.issues.length, + k = h._zod.check(a); + if (k instanceof Promise && m?.async === !1) throw new gt(); + if (p || k instanceof Promise) + p = (p ?? Promise.resolve()).then(async () => { + (await k, a.issues.length !== N && (f || (f = pt(a, N)))); + }); + else { + if (a.issues.length === N) continue; + f || (f = pt(a, N)); + } + } + return p ? p.then(() => a) : a; + }, + u = (a, c, m) => { + if (pt(a)) return ((a.aborted = !0), a); + let p = s(c, o, m); + if (p instanceof Promise) { + if (m.async === !1) throw new gt(); + return p.then((f) => e._zod.parse(f, m)); + } + return e._zod.parse(p, m); + }; + e._zod.run = (a, c) => { + if (c.skipChecks) return e._zod.parse(a, c); + if (c.direction === 'backward') { + let p = e._zod.parse( + { value: a.value, issues: [] }, + { ...c, skipChecks: !0 }, + ); + return p instanceof Promise + ? p.then((f) => u(f, a, c)) + : u(p, a, c); + } + let m = e._zod.parse(a, c); + if (m instanceof Promise) { + if (c.async === !1) throw new gt(); + return m.then((p) => s(p, o, c)); + } + return s(m, o, c); + }; + } + e['~standard'] = { + validate: (s) => { + var u; + try { + let a = Vs(e, s); + return a.success + ? { value: a.data } + : { issues: (u = a.error) == null ? void 0 : u.issues }; + } catch { + return Fs(e, s).then((c) => { + var m; + return c.success + ? { value: c.data } + : { issues: (m = c.error) == null ? void 0 : m.issues }; + }); + } + }, + vendor: 'zod', + version: 1, + }; + }), + yn = v('$ZodString', (e, t) => { + var i, n, r; + (T.init(e, t), + (e._zod.pattern = + (r = [ + ...((n = (i = e?._zod.bag) == null ? void 0 : i.patterns) != null + ? n + : []), + ].pop()) != null + ? r + : fu(e._zod.bag)), + (e._zod.parse = (o, s) => { + if (t.coerce) + try { + o.value = String(o.value); + } catch {} + return ( + typeof o.value == 'string' || + o.issues.push({ + expected: 'string', + code: 'invalid_type', + input: o.value, + inst: e, + }), + o + ); + })); + }), + F = v('$ZodStringFormat', (e, t) => { + (bn.init(e, t), yn.init(e, t)); + }), + Fu = v('$ZodGUID', (e, t) => { + (t.pattern != null || (t.pattern = Ys), F.init(e, t)); + }), + Wu = v('$ZodUUID', (e, t) => { + if (t.version) { + let i = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[ + t.version + ]; + if (i === void 0) + throw new Error(`Invalid UUID version: "${t.version}"`); + t.pattern != null || (t.pattern = Rt(i)); + } else t.pattern != null || (t.pattern = Rt()); + F.init(e, t); + }), + qu = v('$ZodEmail', (e, t) => { + (t.pattern != null || (t.pattern = Qs), F.init(e, t)); + }), + Bu = v('$ZodURL', (e, t) => { + (F.init(e, t), + (e._zod.check = (i) => { + try { + let n = i.value.trim(), + r = new URL(n); + return ( + t.hostname && + ((t.hostname.lastIndex = 0), + t.hostname.test(r.hostname) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid hostname', + pattern: su.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + t.protocol && + ((t.protocol.lastIndex = 0), + t.protocol.test( + r.protocol.endsWith(':') + ? r.protocol.slice(0, -1) + : r.protocol, + ) || + i.issues.push({ + code: 'invalid_format', + format: 'url', + note: 'Invalid protocol', + pattern: t.protocol.source, + input: i.value, + inst: e, + continue: !t.abort, + })), + void (t.normalize ? (i.value = r.href) : (i.value = n)) + ); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'url', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + Gu = v('$ZodEmoji', (e, t) => { + (t.pattern != null || (t.pattern = tu()), F.init(e, t)); + }), + Ku = v('$ZodNanoID', (e, t) => { + (t.pattern != null || (t.pattern = Hs), F.init(e, t)); + }), + Hu = v('$ZodCUID', (e, t) => { + (t.pattern != null || (t.pattern = Ws), F.init(e, t)); + }), + Xu = v('$ZodCUID2', (e, t) => { + (t.pattern != null || (t.pattern = qs), F.init(e, t)); + }), + Yu = v('$ZodULID', (e, t) => { + (t.pattern != null || (t.pattern = Bs), F.init(e, t)); + }), + Qu = v('$ZodXID', (e, t) => { + (t.pattern != null || (t.pattern = Gs), F.init(e, t)); + }), + ec = v('$ZodKSUID', (e, t) => { + (t.pattern != null || (t.pattern = Ks), F.init(e, t)); + }), + tc = v('$ZodISODateTime', (e, t) => { + (t.pattern != null || (t.pattern = pu(t)), F.init(e, t)); + }), + nc = v('$ZodISODate', (e, t) => { + (t.pattern != null || (t.pattern = lu), F.init(e, t)); + }), + ic = v('$ZodISOTime', (e, t) => { + (t.pattern != null || (t.pattern = mu(t)), F.init(e, t)); + }), + rc = v('$ZodISODuration', (e, t) => { + (t.pattern != null || (t.pattern = Xs), F.init(e, t)); + }), + ac = v('$ZodIPv4', (e, t) => { + (t.pattern != null || (t.pattern = nu), + F.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.format = 'ipv4'; + })); + }), + oc = v('$ZodIPv6', (e, t) => { + (t.pattern != null || (t.pattern = iu), + F.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.format = 'ipv6'; + }), + (e._zod.check = (i) => { + try { + new URL(`http://[${i.value}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'ipv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }), + sc = v('$ZodCIDRv4', (e, t) => { + (t.pattern != null || (t.pattern = ru), F.init(e, t)); + }), + uc = v('$ZodCIDRv6', (e, t) => { + (t.pattern != null || (t.pattern = au), + F.init(e, t), + (e._zod.check = (i) => { + let n = i.value.split('/'); + try { + if (n.length !== 2) throw new Error(); + let [r, o] = n; + if (!o) throw new Error(); + let s = Number(o); + if (`${s}` !== o) throw new Error(); + if (s < 0 || s > 128) throw new Error(); + new URL(`http://[${r}]`); + } catch { + i.issues.push({ + code: 'invalid_format', + format: 'cidrv6', + input: i.value, + inst: e, + continue: !t.abort, + }); + } + })); + }); + function Nr(e) { + if (e === '') return !0; + if (e.length % 4 != 0) return !1; + try { + return (atob(e), !0); + } catch { + return !1; + } + } + var cc = v('$ZodBase64', (e, t) => { + (t.pattern != null || (t.pattern = ou), + F.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64'; + }), + (e._zod.check = (i) => { + Nr(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }); + function lc(e) { + if (!jr.test(e)) return !1; + let t = e.replace(/[-_]/g, (i) => (i === '-' ? '+' : '/')); + return Nr(t.padEnd(4 * Math.ceil(t.length / 4), '=')); + } + var dc = v('$ZodBase64URL', (e, t) => { + (t.pattern != null || (t.pattern = jr), + F.init(e, t), + e._zod.onattach.push((i) => { + i._zod.bag.contentEncoding = 'base64url'; + }), + (e._zod.check = (i) => { + lc(i.value) || + i.issues.push({ + code: 'invalid_format', + format: 'base64url', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + mc = v('$ZodE164', (e, t) => { + (t.pattern != null || (t.pattern = uu), F.init(e, t)); + }); + function pc(e, t = null) { + try { + let i = e.split('.'); + if (i.length !== 3) return !1; + let [n] = i; + if (!n) return !1; + let r = JSON.parse(atob(n)); + return ( + (!('typ' in r) || r?.typ === 'JWT') && + !!r.alg && + (!t || ('alg' in r && r.alg === t)) + ); + } catch { + return !1; + } + } + var fc = v('$ZodJWT', (e, t) => { + (F.init(e, t), + (e._zod.check = (i) => { + pc(i.value, t.alg) || + i.issues.push({ + code: 'invalid_format', + format: 'jwt', + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + vc = v('$ZodCustomStringFormat', (e, t) => { + (F.init(e, t), + (e._zod.check = (i) => { + t.fn(i.value) || + i.issues.push({ + code: 'invalid_format', + format: t.format, + input: i.value, + inst: e, + continue: !t.abort, + }); + })); + }), + Ur = v('$ZodNumber', (e, t) => { + var i; + (T.init(e, t), + (e._zod.pattern = (i = e._zod.bag.pattern) != null ? i : hu), + (e._zod.parse = (n, r) => { + if (t.coerce) + try { + n.value = Number(n.value); + } catch {} + let o = n.value; + if (typeof o == 'number' && !Number.isNaN(o) && Number.isFinite(o)) + return n; + let s = + typeof o == 'number' + ? Number.isNaN(o) + ? 'NaN' + : Number.isFinite(o) + ? void 0 + : 'Infinity' + : void 0; + return ( + n.issues.push({ + expected: 'number', + code: 'invalid_type', + input: o, + inst: e, + ...(s ? { received: s } : {}), + }), + n + ); + })); + }), + gc = v('$ZodNumber', (e, t) => { + (xu.init(e, t), Ur.init(e, t)); + }), + Pr = v('$ZodBoolean', (e, t) => { + (T.init(e, t), + (e._zod.pattern = bu), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = !!i.value; + } catch {} + let r = i.value; + return ( + typeof r == 'boolean' || + i.issues.push({ + expected: 'boolean', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + Er = v('$ZodBigInt', (e, t) => { + (T.init(e, t), + (e._zod.pattern = vu), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = BigInt(i.value); + } catch {} + return ( + typeof i.value == 'bigint' || + i.issues.push({ + expected: 'bigint', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ); + })); + }), + hc = v('$ZodBigInt', (e, t) => { + (Iu.init(e, t), Er.init(e, t)); + }), + bc = v('$ZodSymbol', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + typeof r == 'symbol' || + i.issues.push({ + expected: 'symbol', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + yc = v('$ZodUndefined', (e, t) => { + (T.init(e, t), + (e._zod.pattern = _u), + (e._zod.values = new Set([void 0])), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === void 0 || + i.issues.push({ + expected: 'undefined', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + _c = v('$ZodNull', (e, t) => { + (T.init(e, t), + (e._zod.pattern = yu), + (e._zod.values = new Set([null])), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === null || + i.issues.push({ + expected: 'null', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + $c = v('$ZodAny', (e, t) => { + (T.init(e, t), (e._zod.parse = (i) => i)); + }), + kc = v('$ZodUnknown', (e, t) => { + (T.init(e, t), (e._zod.parse = (i) => i)); + }), + wc = v('$ZodNever', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => ( + i.issues.push({ + expected: 'never', + code: 'invalid_type', + input: i.value, + inst: e, + }), + i + ))); + }), + Sc = v('$ZodVoid', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r === void 0 || + i.issues.push({ + expected: 'void', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + xc = v('$ZodDate', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + if (t.coerce) + try { + i.value = new Date(i.value); + } catch {} + let r = i.value, + o = r instanceof Date; + return ( + (o && !Number.isNaN(r.getTime())) || + i.issues.push({ + expected: 'date', + code: 'invalid_type', + input: r, + ...(o ? { received: 'Invalid Date' } : {}), + inst: e, + }), + i + ); + })); + }); + function ds(e, t, i) { + (e.issues.length && t.issues.push(...ye(i, e.issues)), + (t.value[i] = e.value)); + } + var Ic = v('$ZodArray', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!Array.isArray(r)) + return ( + i.issues.push({ + expected: 'array', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + i.value = Array(r.length); + let o = []; + for (let s = 0; s < r.length; s++) { + let u = r[s], + a = t.element._zod.run({ value: u, issues: [] }, n); + a instanceof Promise + ? o.push(a.then((c) => ds(c, i, s))) + : ds(a, i, s); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function ti(e, t, i, n) { + (e.issues.length && t.issues.push(...ye(i, e.issues)), + e.value === void 0 + ? i in n && (t.value[i] = void 0) + : (t.value[i] = e.value)); + } + function jc(e) { + var t, i, n, r; + let o = Object.keys(e.shape); + for (let u of o) + if ( + !( + (r = + (n = + (i = (t = e.shape) == null ? void 0 : t[u]) == null + ? void 0 + : i._zod) == null + ? void 0 + : n.traits) != null && r.has('$ZodType') + ) + ) + throw new Error(`Invalid element at key "${u}": expected a Zod schema`); + let s = Ds(e.shape); + return { + ...e, + keys: o, + keySet: new Set(o), + numKeys: o.length, + optionalKeys: new Set(s), + }; + } + function Oc(e, t, i, n, r, o) { + let s = [], + u = r.keySet, + a = r.catchall._zod, + c = a.def.type; + for (let m of Object.keys(t)) { + if (u.has(m)) continue; + if (c === 'never') { + s.push(m); + continue; + } + let p = a.run({ value: t[m], issues: [] }, n); + p instanceof Promise + ? e.push(p.then((f) => ti(f, i, m, t))) + : ti(p, i, m, t); + } + return ( + s.length && + i.issues.push({ + code: 'unrecognized_keys', + keys: s, + input: t, + inst: o, + }), + e.length ? Promise.all(e).then(() => i) : i + ); + } + var zc = v('$ZodObject', (e, t) => { + T.init(e, t); + let i = Object.getOwnPropertyDescriptor(t, 'shape'); + if (!i?.get) { + let u = t.shape; + Object.defineProperty(t, 'shape', { + get: () => { + let a = { ...u }; + return (Object.defineProperty(t, 'shape', { value: a }), a); + }, + }); + } + let n = dn(() => jc(t)); + J(e._zod, 'propValues', () => { + let u = t.shape, + a = {}; + for (let c in u) { + let m = u[c]._zod; + if (m.values) { + a[c] != null || (a[c] = new Set()); + for (let p of m.values) a[c].add(p); + } + } + return a; + }); + let r = Zt, + o = t.catchall, + s; + e._zod.parse = (u, a) => { + s != null || (s = n.value); + let c = u.value; + if (!r(c)) + return ( + u.issues.push({ + expected: 'object', + code: 'invalid_type', + input: c, + inst: e, + }), + u + ); + u.value = {}; + let m = [], + p = s.shape; + for (let f of s.keys) { + let h = p[f]._zod.run({ value: c[f], issues: [] }, a); + h instanceof Promise + ? m.push(h.then((N) => ti(N, u, f, c))) + : ti(h, u, f, c); + } + return o + ? Oc(m, c, u, a, n.value, e) + : m.length + ? Promise.all(m).then(() => u) + : u; + }; + }), + Nc = v('$ZodObjectJIT', (e, t) => { + zc.init(e, t); + let i = e._zod.parse, + n = dn(() => jc(t)), + r, + o = Zt, + s = !Xn.jitless, + u = s && Us.value, + a = t.catchall, + c; + e._zod.parse = (m, p) => { + c != null || (c = n.value); + let f = m.value; + return o(f) + ? s && u && p?.async === !1 && p.jitless !== !0 + ? (r || + (r = ((h) => { + let N = new Mu(['shape', 'payload', 'ctx']), + k = n.value, + g = (I) => { + let E = ir(I); + return `shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`; + }; + N.write('const input = payload.value;'); + let y = Object.create(null), + w = 0; + for (let I of k.keys) y[I] = 'key_' + w++; + N.write('const newResult = {};'); + for (let I of k.keys) { + let E = y[I], + V = ir(I); + (N.write(`const ${E} = ${g(I)};`), + N.write(` + if (${E}.issues.length) { + payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${V}, ...iss.path] : [${V}] + }))); + } + + + if (${E}.value === undefined) { + if (${V} in input) { + newResult[${V}] = undefined; + } + } else { + newResult[${V}] = ${E}.value; + } + + `)); + } + (N.write('payload.value = newResult;'), + N.write('return payload;')); + let j = N.compile(); + return (I, E) => j(h, I, E); + })(t.shape)), + (m = r(m, p)), + a ? Oc([], f, m, p, c, e) : m) + : i(m, p) + : (m.issues.push({ + expected: 'object', + code: 'invalid_type', + input: f, + inst: e, + }), + m); + }; + }); + function ms(e, t, i, n) { + for (let o of e) if (o.issues.length === 0) return ((t.value = o.value), t); + let r = e.filter((o) => !pt(o)); + return r.length === 1 + ? ((t.value = r[0].value), r[0]) + : (t.issues.push({ + code: 'invalid_union', + input: t.value, + inst: i, + errors: e.map((o) => o.issues.map((s) => $e(s, n, ie()))), + }), + t); + } + var Dr = v('$ZodUnion', (e, t) => { + (T.init(e, t), + J(e._zod, 'optin', () => + t.options.some((r) => r._zod.optin === 'optional') + ? 'optional' + : void 0, + ), + J(e._zod, 'optout', () => + t.options.some((r) => r._zod.optout === 'optional') + ? 'optional' + : void 0, + ), + J(e._zod, 'values', () => { + if (t.options.every((r) => r._zod.values)) + return new Set(t.options.flatMap((r) => Array.from(r._zod.values))); + }), + J(e._zod, 'pattern', () => { + if (t.options.every((r) => r._zod.pattern)) { + let r = t.options.map((o) => o._zod.pattern); + return new RegExp(`^(${r.map((o) => ui(o.source)).join('|')})$`); + } + })); + let i = t.options.length === 1, + n = t.options[0]._zod.run; + e._zod.parse = (r, o) => { + if (i) return n(r, o); + let s = !1, + u = []; + for (let a of t.options) { + let c = a._zod.run({ value: r.value, issues: [] }, o); + if (c instanceof Promise) (u.push(c), (s = !0)); + else { + if (c.issues.length === 0) return c; + u.push(c); + } + } + return s ? Promise.all(u).then((a) => ms(a, r, e, o)) : ms(u, r, e, o); + }; + }), + Uc = v('$ZodDiscriminatedUnion', (e, t) => { + Dr.init(e, t); + let i = e._zod.parse; + J(e._zod, 'propValues', () => { + let r = {}; + for (let o of t.options) { + let s = o._zod.propValues; + if (!s || Object.keys(s).length === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(o)}"`, + ); + for (let [u, a] of Object.entries(s)) { + r[u] || (r[u] = new Set()); + for (let c of a) r[u].add(c); + } + } + return r; + }); + let n = dn(() => { + var r; + let o = t.options, + s = new Map(); + for (let u of o) { + let a = (r = u._zod.propValues) == null ? void 0 : r[t.discriminator]; + if (!a || a.size === 0) + throw new Error( + `Invalid discriminated union option at index "${t.options.indexOf(u)}"`, + ); + for (let c of a) { + if (s.has(c)) + throw new Error(`Duplicate discriminator value "${String(c)}"`); + s.set(c, u); + } + } + return s; + }); + e._zod.parse = (r, o) => { + let s = r.value; + if (!Zt(s)) + return ( + r.issues.push({ + code: 'invalid_type', + expected: 'object', + input: s, + inst: e, + }), + r + ); + let u = n.value.get(s?.[t.discriminator]); + return u + ? u._zod.run(r, o) + : t.unionFallback + ? i(r, o) + : (r.issues.push({ + code: 'invalid_union', + errors: [], + note: 'No matching discriminator', + discriminator: t.discriminator, + input: s, + path: [t.discriminator], + inst: e, + }), + r); + }; + }), + Pc = v('$ZodIntersection', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value, + o = t.left._zod.run({ value: r, issues: [] }, n), + s = t.right._zod.run({ value: r, issues: [] }, n); + return o instanceof Promise || s instanceof Promise + ? Promise.all([o, s]).then(([u, a]) => ps(i, u, a)) + : ps(i, o, s); + })); + }); + function or(e, t) { + if (e === t) return { valid: !0, data: e }; + if (e instanceof Date && t instanceof Date && +e == +t) + return { valid: !0, data: e }; + if (ht(e) && ht(t)) { + let i = Object.keys(t), + n = Object.keys(e).filter((o) => i.indexOf(o) !== -1), + r = { ...e, ...t }; + for (let o of n) { + let s = or(e[o], t[o]); + if (!s.valid) + return { valid: !1, mergeErrorPath: [o, ...s.mergeErrorPath] }; + r[o] = s.data; + } + return { valid: !0, data: r }; + } + if (Array.isArray(e) && Array.isArray(t)) { + if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; + let i = []; + for (let n = 0; n < e.length; n++) { + let r = or(e[n], t[n]); + if (!r.valid) + return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; + i.push(r.data); + } + return { valid: !0, data: i }; + } + return { valid: !1, mergeErrorPath: [] }; + } + function ps(e, t, i) { + if ( + (t.issues.length && e.issues.push(...t.issues), + i.issues.length && e.issues.push(...i.issues), + pt(e)) + ) + return e; + let n = or(t.value, i.value); + if (!n.valid) + throw new Error( + `Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`, + ); + return ((e.value = n.data), e); + } + var Tr = v('$ZodTuple', (e, t) => { + T.init(e, t); + let i = t.items, + n = + i.length - + [...i].reverse().findIndex((r) => r._zod.optin !== 'optional'); + e._zod.parse = (r, o) => { + let s = r.value; + if (!Array.isArray(s)) + return ( + r.issues.push({ + input: s, + inst: e, + expected: 'tuple', + code: 'invalid_type', + }), + r + ); + r.value = []; + let u = []; + if (!t.rest) { + let c = s.length > i.length, + m = s.length < n - 1; + if (c || m) + return ( + r.issues.push({ + ...(c + ? { code: 'too_big', maximum: i.length } + : { code: 'too_small', minimum: i.length }), + input: s, + inst: e, + origin: 'array', + }), + r + ); + } + let a = -1; + for (let c of i) { + if ((a++, a >= s.length && a >= n)) continue; + let m = c._zod.run({ value: s[a], issues: [] }, o); + m instanceof Promise ? u.push(m.then((p) => qn(p, r, a))) : qn(m, r, a); + } + if (t.rest) { + let c = s.slice(i.length); + for (let m of c) { + a++; + let p = t.rest._zod.run({ value: m, issues: [] }, o); + p instanceof Promise + ? u.push(p.then((f) => qn(f, r, a))) + : qn(p, r, a); + } + } + return u.length ? Promise.all(u).then(() => r) : r; + }; + }); + function qn(e, t, i) { + (e.issues.length && t.issues.push(...ye(i, e.issues)), + (t.value[i] = e.value)); + } + var Ec = v('$ZodRecord', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!ht(r)) + return ( + i.issues.push({ + expected: 'record', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + if (t.keyType._zod.values) { + let s = t.keyType._zod.values; + i.value = {}; + for (let a of s) + if ( + typeof a == 'string' || + typeof a == 'number' || + typeof a == 'symbol' + ) { + let c = t.valueType._zod.run({ value: r[a], issues: [] }, n); + c instanceof Promise + ? o.push( + c.then((m) => { + (m.issues.length && i.issues.push(...ye(a, m.issues)), + (i.value[a] = m.value)); + }), + ) + : (c.issues.length && i.issues.push(...ye(a, c.issues)), + (i.value[a] = c.value)); + } + let u; + for (let a in r) s.has(a) || ((u = u ?? []), u.push(a)); + u && + u.length > 0 && + i.issues.push({ + code: 'unrecognized_keys', + input: r, + inst: e, + keys: u, + }); + } else { + i.value = {}; + for (let s of Reflect.ownKeys(r)) { + if (s === '__proto__') continue; + let u = t.keyType._zod.run({ value: s, issues: [] }, n); + if (u instanceof Promise) + throw new Error( + 'Async schemas not supported in object keys currently', + ); + if (u.issues.length) { + (i.issues.push({ + code: 'invalid_key', + origin: 'record', + issues: u.issues.map((c) => $e(c, n, ie())), + input: s, + path: [s], + inst: e, + }), + (i.value[u.value] = u.value)); + continue; + } + let a = t.valueType._zod.run({ value: r[s], issues: [] }, n); + a instanceof Promise + ? o.push( + a.then((c) => { + (c.issues.length && i.issues.push(...ye(s, c.issues)), + (i.value[u.value] = c.value)); + }), + ) + : (a.issues.length && i.issues.push(...ye(s, a.issues)), + (i.value[u.value] = a.value)); + } + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }), + Dc = v('$ZodMap', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Map)) + return ( + i.issues.push({ + expected: 'map', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + let o = []; + i.value = new Map(); + for (let [s, u] of r) { + let a = t.keyType._zod.run({ value: s, issues: [] }, n), + c = t.valueType._zod.run({ value: u, issues: [] }, n); + a instanceof Promise || c instanceof Promise + ? o.push( + Promise.all([a, c]).then(([m, p]) => { + fs(m, p, i, s, r, e, n); + }), + ) + : fs(a, c, i, s, r, e, n); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function fs(e, t, i, n, r, o, s) { + (e.issues.length && + (Qn.has(typeof n) + ? i.issues.push(...ye(n, e.issues)) + : i.issues.push({ + code: 'invalid_key', + origin: 'map', + input: r, + inst: o, + issues: e.issues.map((u) => $e(u, s, ie())), + })), + t.issues.length && + (Qn.has(typeof n) + ? i.issues.push(...ye(n, t.issues)) + : i.issues.push({ + origin: 'map', + code: 'invalid_element', + input: r, + inst: o, + key: n, + issues: t.issues.map((u) => $e(u, s, ie())), + })), + i.value.set(e.value, t.value)); + } + var Tc = v('$ZodSet', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + if (!(r instanceof Set)) + return ( + i.issues.push({ + input: r, + inst: e, + expected: 'set', + code: 'invalid_type', + }), + i + ); + let o = []; + i.value = new Set(); + for (let s of r) { + let u = t.valueType._zod.run({ value: s, issues: [] }, n); + u instanceof Promise ? o.push(u.then((a) => vs(a, i))) : vs(u, i); + } + return o.length ? Promise.all(o).then(() => i) : i; + })); + }); + function vs(e, t) { + (e.issues.length && t.issues.push(...e.issues), t.value.add(e.value)); + } + var Cc = v('$ZodEnum', (e, t) => { + T.init(e, t); + let i = fr(t.entries), + n = new Set(i); + ((e._zod.values = n), + (e._zod.pattern = new RegExp( + `^(${i + .filter((r) => Qn.has(typeof r)) + .map((r) => (typeof r == 'string' ? Me(r) : r.toString())) + .join('|')})$`, + )), + (e._zod.parse = (r, o) => { + let s = r.value; + return ( + n.has(s) || + r.issues.push({ + code: 'invalid_value', + values: i, + input: s, + inst: e, + }), + r + ); + })); + }), + Ac = v('$ZodLiteral', (e, t) => { + if ((T.init(e, t), t.values.length === 0)) + throw new Error('Cannot create literal schema with no valid values'); + ((e._zod.values = new Set(t.values)), + (e._zod.pattern = new RegExp( + `^(${t.values.map((i) => (typeof i == 'string' ? Me(i) : i ? Me(i.toString()) : String(i))).join('|')})$`, + )), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + e._zod.values.has(r) || + i.issues.push({ + code: 'invalid_value', + values: t.values, + input: r, + inst: e, + }), + i + ); + })); + }), + Zc = v('$ZodFile', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + let r = i.value; + return ( + r instanceof File || + i.issues.push({ + expected: 'file', + code: 'invalid_type', + input: r, + inst: e, + }), + i + ); + })); + }), + Rc = v('$ZodTransform', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new si(e.constructor.name); + let r = t.transform(i.value, i); + if (n.async) + return (r instanceof Promise ? r : Promise.resolve(r)).then( + (o) => ((i.value = o), i), + ); + if (r instanceof Promise) throw new gt(); + return ((i.value = r), i); + })); + }); + function gs(e, t) { + return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e; + } + var Lc = v('$ZodOptional', (e, t) => { + (T.init(e, t), + (e._zod.optin = 'optional'), + (e._zod.optout = 'optional'), + J(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, void 0]) + : void 0, + ), + J(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${ui(i.source)})?$`) : void 0; + }), + (e._zod.parse = (i, n) => { + if (t.innerType._zod.optin === 'optional') { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => gs(o, i.value)) + : gs(r, i.value); + } + return i.value === void 0 ? i : t.innerType._zod.run(i, n); + })); + }), + Jc = v('$ZodNullable', (e, t) => { + (T.init(e, t), + J(e._zod, 'optin', () => t.innerType._zod.optin), + J(e._zod, 'optout', () => t.innerType._zod.optout), + J(e._zod, 'pattern', () => { + let i = t.innerType._zod.pattern; + return i ? new RegExp(`^(${ui(i.source)}|null)$`) : void 0; + }), + J(e._zod, 'values', () => + t.innerType._zod.values + ? new Set([...t.innerType._zod.values, null]) + : void 0, + ), + (e._zod.parse = (i, n) => + i.value === null ? i : t.innerType._zod.run(i, n))); + }), + Mc = v('$ZodDefault', (e, t) => { + (T.init(e, t), + (e._zod.optin = 'optional'), + J(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + if (i.value === void 0) return ((i.value = t.defaultValue), i); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => hs(o, t)) : hs(r, t); + })); + }); + function hs(e, t) { + return (e.value === void 0 && (e.value = t.defaultValue), e); + } + var Vc = v('$ZodPrefault', (e, t) => { + (T.init(e, t), + (e._zod.optin = 'optional'), + J(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => ( + n.direction === 'backward' || + (i.value === void 0 && (i.value = t.defaultValue)), + t.innerType._zod.run(i, n) + ))); + }), + Fc = v('$ZodNonOptional', (e, t) => { + (T.init(e, t), + J(e._zod, 'values', () => { + let i = t.innerType._zod.values; + return i ? new Set([...i].filter((n) => n !== void 0)) : void 0; + }), + (e._zod.parse = (i, n) => { + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then((o) => bs(o, e)) : bs(r, e); + })); + }); + function bs(e, t) { + return ( + e.issues.length || + e.value !== void 0 || + e.issues.push({ + code: 'invalid_type', + expected: 'nonoptional', + input: e.value, + inst: t, + }), + e + ); + } + var Wc = v('$ZodSuccess', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new si('ZodSuccess'); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => ((i.value = o.issues.length === 0), i)) + : ((i.value = r.issues.length === 0), i); + })); + }), + qc = v('$ZodCatch', (e, t) => { + (T.init(e, t), + J(e._zod, 'optin', () => t.innerType._zod.optin), + J(e._zod, 'optout', () => t.innerType._zod.optout), + J(e._zod, 'values', () => t.innerType._zod.values), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise + ? r.then( + (o) => ( + (i.value = o.value), + o.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: o.issues.map((s) => $e(s, n, ie())) }, + input: i.value, + })), + (i.issues = [])), + i + ), + ) + : ((i.value = r.value), + r.issues.length && + ((i.value = t.catchValue({ + ...i, + error: { issues: r.issues.map((o) => $e(o, n, ie())) }, + input: i.value, + })), + (i.issues = [])), + i); + })); + }), + Bc = v('$ZodNaN', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => ( + (typeof i.value == 'number' && Number.isNaN(i.value)) || + i.issues.push({ + input: i.value, + inst: e, + expected: 'nan', + code: 'invalid_type', + }), + i + ))); + }), + Gc = v('$ZodPipe', (e, t) => { + (T.init(e, t), + J(e._zod, 'values', () => t.in._zod.values), + J(e._zod, 'optin', () => t.in._zod.optin), + J(e._zod, 'optout', () => t.out._zod.optout), + J(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') { + let o = t.out._zod.run(i, n); + return o instanceof Promise + ? o.then((s) => Bn(s, t.in, n)) + : Bn(o, t.in, n); + } + let r = t.in._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Bn(o, t.out, n)) + : Bn(r, t.out, n); + })); + }); + function Bn(e, t, i) { + return e.issues.length + ? ((e.aborted = !0), e) + : t._zod.run({ value: e.value, issues: e.issues }, i); + } + var Cr = v('$ZodCodec', (e, t) => { + (T.init(e, t), + J(e._zod, 'values', () => t.in._zod.values), + J(e._zod, 'optin', () => t.in._zod.optin), + J(e._zod, 'optout', () => t.out._zod.optout), + J(e._zod, 'propValues', () => t.in._zod.propValues), + (e._zod.parse = (i, n) => { + if ((n.direction || 'forward') === 'forward') { + let r = t.in._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Gn(o, t, n)) + : Gn(r, t, n); + } + { + let r = t.out._zod.run(i, n); + return r instanceof Promise + ? r.then((o) => Gn(o, t, n)) + : Gn(r, t, n); + } + })); + }); + function Gn(e, t, i) { + if (e.issues.length) return ((e.aborted = !0), e); + if ((i.direction || 'forward') === 'forward') { + let n = t.transform(e.value, e); + return n instanceof Promise + ? n.then((r) => Kn(e, r, t.out, i)) + : Kn(e, n, t.out, i); + } + { + let n = t.reverseTransform(e.value, e); + return n instanceof Promise + ? n.then((r) => Kn(e, r, t.in, i)) + : Kn(e, n, t.in, i); + } + } + function Kn(e, t, i, n) { + return e.issues.length + ? ((e.aborted = !0), e) + : i._zod.run({ value: t, issues: e.issues }, n); + } + var Kc = v('$ZodReadonly', (e, t) => { + (T.init(e, t), + J(e._zod, 'propValues', () => t.innerType._zod.propValues), + J(e._zod, 'values', () => t.innerType._zod.values), + J(e._zod, 'optin', () => t.innerType._zod.optin), + J(e._zod, 'optout', () => t.innerType._zod.optout), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') return t.innerType._zod.run(i, n); + let r = t.innerType._zod.run(i, n); + return r instanceof Promise ? r.then(ys) : ys(r); + })); + }); + function ys(e) { + return ((e.value = Object.freeze(e.value)), e); + } + var Hc = v('$ZodTemplateLiteral', (e, t) => { + T.init(e, t); + let i = []; + for (let n of t.parts) + if (typeof n == 'object' && n !== null) { + if (!n._zod.pattern) + throw new Error( + `Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`, + ); + let r = + n._zod.pattern instanceof RegExp + ? n._zod.pattern.source + : n._zod.pattern; + if (!r) + throw new Error(`Invalid template literal part: ${n._zod.traits}`); + let o = r.startsWith('^') ? 1 : 0, + s = r.endsWith('$') ? r.length - 1 : r.length; + i.push(r.slice(o, s)); + } else { + if (n !== null && !Es.has(typeof n)) + throw new Error(`Invalid template literal part: ${n}`); + i.push(Me(`${n}`)); + } + ((e._zod.pattern = new RegExp(`^${i.join('')}$`)), + (e._zod.parse = (n, r) => { + var o; + return typeof n.value != 'string' + ? (n.issues.push({ + input: n.value, + inst: e, + expected: 'template_literal', + code: 'invalid_type', + }), + n) + : ((e._zod.pattern.lastIndex = 0), + e._zod.pattern.test(n.value) || + n.issues.push({ + input: n.value, + inst: e, + code: 'invalid_format', + format: (o = t.format) != null ? o : 'template_literal', + pattern: e._zod.pattern.source, + }), + n); + })); + }), + Xc = v( + '$ZodFunction', + (e, t) => ( + T.init(e, t), + (e._def = t), + (e._zod.def = t), + (e.implement = (i) => { + if (typeof i != 'function') + throw new Error('implement() must be called with a function'); + return function (...n) { + let r = e._def.input ? rr(e._def.input, n) : n, + o = Reflect.apply(i, this, r); + return e._def.output ? rr(e._def.output, o) : o; + }; + }), + (e.implementAsync = (i) => { + if (typeof i != 'function') + throw new Error('implementAsync() must be called with a function'); + return async function (...n) { + let r = e._def.input ? await ar(e._def.input, n) : n, + o = await Reflect.apply(i, this, r); + return e._def.output ? await ar(e._def.output, o) : o; + }; + }), + (e._zod.parse = (i, n) => { + if (typeof i.value != 'function') + return ( + i.issues.push({ + code: 'invalid_type', + expected: 'function', + input: i.value, + inst: e, + }), + i + ); + let r = e._def.output && e._def.output._zod.def.type === 'promise'; + return ( + (i.value = r ? e.implementAsync(i.value) : e.implement(i.value)), + i + ); + }), + (e.input = (...i) => { + let n = e.constructor; + return Array.isArray(i[0]) + ? new n({ + type: 'function', + input: new Tr({ type: 'tuple', items: i[0], rest: i[1] }), + output: e._def.output, + }) + : new n({ type: 'function', input: i[0], output: e._def.output }); + }), + (e.output = (i) => + new e.constructor({ + type: 'function', + input: e._def.input, + output: i, + })), + e + ), + ), + Yc = v('$ZodPromise', (e, t) => { + (T.init(e, t), + (e._zod.parse = (i, n) => + Promise.resolve(i.value).then((r) => + t.innerType._zod.run({ value: r, issues: [] }, n), + ))); + }), + Qc = v('$ZodLazy', (e, t) => { + (T.init(e, t), + J(e._zod, 'innerType', () => t.getter()), + J(e._zod, 'pattern', () => e._zod.innerType._zod.pattern), + J(e._zod, 'propValues', () => e._zod.innerType._zod.propValues), + J(e._zod, 'optin', () => { + var i; + return (i = e._zod.innerType._zod.optin) != null ? i : void 0; + }), + J(e._zod, 'optout', () => { + var i; + return (i = e._zod.innerType._zod.optout) != null ? i : void 0; + }), + (e._zod.parse = (i, n) => e._zod.innerType._zod.run(i, n))); + }), + el = v('$ZodCustom', (e, t) => { + (q.init(e, t), + T.init(e, t), + (e._zod.parse = (i, n) => i), + (e._zod.check = (i) => { + let n = i.value, + r = t.fn(n); + if (r instanceof Promise) return r.then((o) => _s(o, i, n, e)); + _s(r, i, n, e); + })); + }); + function _s(e, t, i, n) { + var r; + if (!e) { + let o = { + code: 'custom', + input: i, + inst: n, + path: [...((r = n._zod.def.path) != null ? r : [])], + continue: !n._zod.def.abort, + }; + (n._zod.def.params && (o.params = n._zod.def.params), + t.issues.push(ei(o))); + } + } + var Ar = {}; + ve(Ar, { + ar: () => Kg, + az: () => Xg, + be: () => Qg, + bg: () => th, + ca: () => ih, + cs: () => ah, + da: () => sh, + de: () => ch, + en: () => tl, + eo: () => mh, + es: () => fh, + fa: () => gh, + fi: () => bh, + fr: () => _h, + frCA: () => kh, + he: () => Sh, + hu: () => Ih, + id: () => Oh, + is: () => Nh, + it: () => Ph, + ja: () => Dh, + ka: () => Ch, + kh: () => Zh, + km: () => nl, + ko: () => Lh, + lt: () => Mh, + mk: () => Fh, + ms: () => qh, + nl: () => Gh, + no: () => Hh, + ota: () => Yh, + pl: () => nb, + ps: () => eb, + pt: () => rb, + ru: () => ob, + sl: () => ub, + sv: () => lb, + ta: () => mb, + th: () => fb, + tr: () => gb, + ua: () => bb, + uk: () => il, + ur: () => _b, + vi: () => kb, + yo: () => Ob, + zhCN: () => Sb, + zhTW: () => Ib, + }); + var Gg = () => { + let e = { + string: { unit: 'حرف', verb: 'أن يحوي' }, + file: { unit: 'بايت', verb: 'أن يحوي' }, + array: { unit: 'عنصر', verb: 'أن يحوي' }, + set: { unit: 'عنصر', verb: 'أن يحوي' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'مدخل', + email: 'بريد إلكتروني', + url: 'رابط', + emoji: 'إيموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاريخ ووقت بمعيار ISO', + date: 'تاريخ بمعيار ISO', + time: 'وقت بمعيار ISO', + duration: 'مدة بمعيار ISO', + ipv4: 'عنوان IPv4', + ipv6: 'عنوان IPv6', + cidrv4: 'مدى عناوين بصيغة IPv4', + cidrv6: 'مدى عناوين بصيغة IPv6', + base64: 'نَص بترميز base64-encoded', + base64url: 'نَص بترميز base64url-encoded', + json_string: 'نَص على هيئة JSON', + e164: 'رقم هاتف بمعيار E.164', + jwt: 'JWT', + template_literal: 'مدخل', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `مدخلات غير مقبولة: يفترض إدخال ${P(n.values[0])}` + : `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? ` أكبر من اللازم: يفترض أن تكون ${(r = n.origin) != null ? r : 'القيمة'} ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصر'}` + : `أكبر من اللازم: يفترض أن تكون ${(s = n.origin) != null ? s : 'القيمة'} ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${a} ${n.minimum.toString()} ${c.unit}` + : `أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"` + : a.format === 'ends_with' + ? `نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"` + : a.format === 'includes' + ? `نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"` + : a.format === 'regex' + ? `نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} غير مقبول`; + } + case 'not_multiple_of': + return `رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`; + case 'unrecognized_keys': + return `معرف${n.keys.length > 1 ? 'ات' : ''} غريب${n.keys.length > 1 ? 'ة' : ''}: ${_(n.keys, '، ')}`; + case 'invalid_key': + return `معرف غير مقبول في ${n.origin}`; + case 'invalid_union': + default: + return 'مدخل غير مقبول'; + case 'invalid_element': + return `مدخل غير مقبول في ${n.origin}`; + } + }; + }; + function Kg() { + return { localeError: Gg() }; + } + var Hg = () => { + let e = { + string: { unit: 'simvol', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'element', verb: 'olmalıdır' }, + set: { unit: 'element', verb: 'olmalıdır' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Yanlış dəyər: gözlənilən ${P(n.values[0])}` + : `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Çox böyük: gözlənilən ${(r = n.origin) != null ? r : 'dəyər'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'element'}` + : `Çox böyük: gözlənilən ${(s = n.origin) != null ? s : 'dəyər'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Çox kiçik: gözlənilən ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `Çox kiçik: gözlənilən ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Yanlış mətn: "${a.prefix}" ilə başlamalıdır` + : a.format === 'ends_with' + ? `Yanlış mətn: "${a.suffix}" ilə bitməlidir` + : a.format === 'includes' + ? `Yanlış mətn: "${a.includes}" daxil olmalıdır` + : a.format === 'regex' + ? `Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır` + : `Yanlış ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`; + case 'unrecognized_keys': + return `Tanınmayan açar${n.keys.length > 1 ? 'lar' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} daxilində yanlış açar`; + case 'invalid_union': + default: + return 'Yanlış dəyər'; + case 'invalid_element': + return `${n.origin} daxilində yanlış dəyər`; + } + }; + }; + function Xg() { + return { localeError: Hg() }; + } + function $s(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var Yg = () => { + let e = { + string: { + unit: { one: 'сімвал', few: 'сімвалы', many: 'сімвалаў' }, + verb: 'мець', + }, + array: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + set: { + unit: { one: 'элемент', few: 'элементы', many: 'элементаў' }, + verb: 'мець', + }, + file: { + unit: { one: 'байт', few: 'байты', many: 'байтаў' }, + verb: 'мець', + }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'увод', + email: 'email адрас', + url: 'URL', + emoji: 'эмодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата і час', + date: 'ISO дата', + time: 'ISO час', + duration: 'ISO працягласць', + ipv4: 'IPv4 адрас', + ipv6: 'IPv6 адрас', + cidrv4: 'IPv4 дыяпазон', + cidrv6: 'IPv6 дыяпазон', + base64: 'радок у фармаце base64', + base64url: 'радок у фармаце base64url', + json_string: 'JSON радок', + e164: 'нумар E.164', + jwt: 'JWT', + template_literal: 'увод', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Няправільны ўвод: чакаўся ${n.expected}, атрымана ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'лік'; + case 'object': + if (Array.isArray(u)) return 'масіў'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Няправільны ўвод: чакалася ${P(n.values[0])}` + : `Няправільны варыянт: чакаўся адзін з ${_(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + if (a) { + let c = $s(Number(n.maximum), a.unit.one, a.unit.few, a.unit.many); + return `Занадта вялікі: чакалася, што ${(r = n.origin) != null ? r : 'значэнне'} павінна ${a.verb} ${u}${n.maximum.toString()} ${c}`; + } + return `Занадта вялікі: чакалася, што ${(o = n.origin) != null ? o : 'значэнне'} павінна быць ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + if (a) { + let c = $s(Number(n.minimum), a.unit.one, a.unit.few, a.unit.many); + return `Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${u}${n.minimum.toString()} ${c}`; + } + return `Занадта малы: чакалася, што ${n.origin} павінна быць ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Няправільны радок: павінен пачынацца з "${u.prefix}"` + : u.format === 'ends_with' + ? `Няправільны радок: павінен заканчвацца на "${u.suffix}"` + : u.format === 'includes' + ? `Няправільны радок: павінен змяшчаць "${u.includes}"` + : u.format === 'regex' + ? `Няправільны радок: павінен адпавядаць шаблону ${u.pattern}` + : `Няправільны ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `Няправільны лік: павінен быць кратным ${n.divisor}`; + case 'unrecognized_keys': + return `Нераспазнаны ${n.keys.length > 1 ? 'ключы' : 'ключ'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Няправільны ключ у ${n.origin}`; + case 'invalid_union': + default: + return 'Няправільны ўвод'; + case 'invalid_element': + return `Няправільнае значэнне ў ${n.origin}`; + } + }; + }; + function Qg() { + return { localeError: Yg() }; + } + var eh = () => { + let e = { + string: { unit: 'символа', verb: 'да съдържа' }, + file: { unit: 'байта', verb: 'да съдържа' }, + array: { unit: 'елемента', verb: 'да съдържа' }, + set: { unit: 'елемента', verb: 'да съдържа' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'вход', + email: 'имейл адрес', + url: 'URL', + emoji: 'емоджи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO време', + date: 'ISO дата', + time: 'ISO време', + duration: 'ISO продължителност', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'base64-кодиран низ', + base64url: 'base64url-кодиран низ', + json_string: 'JSON низ', + e164: 'E.164 номер', + jwt: 'JWT', + template_literal: 'вход', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Невалиден вход: очакван ${n.expected}, получен ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(a)) return 'масив'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Невалиден вход: очакван ${P(n.values[0])}` + : `Невалидна опция: очаквано едно от ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Твърде голямо: очаква се ${(r = n.origin) != null ? r : 'стойност'} да съдържа ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елемента'}` + : `Твърде голямо: очаква се ${(s = n.origin) != null ? s : 'стойност'} да бъде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Твърде малко: очаква се ${n.origin} да съдържа ${a}${n.minimum.toString()} ${c.unit}` + : `Твърде малко: очаква се ${n.origin} да бъде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + if (a.format === 'starts_with') + return `Невалиден низ: трябва да започва с "${a.prefix}"`; + if (a.format === 'ends_with') + return `Невалиден низ: трябва да завършва с "${a.suffix}"`; + if (a.format === 'includes') + return `Невалиден низ: трябва да включва "${a.includes}"`; + if (a.format === 'regex') + return `Невалиден низ: трябва да съвпада с ${a.pattern}`; + let c = 'Невалиден'; + return ( + a.format === 'emoji' && (c = 'Невалидно'), + a.format === 'datetime' && (c = 'Невалидно'), + a.format === 'date' && (c = 'Невалидна'), + a.format === 'time' && (c = 'Невалидно'), + a.format === 'duration' && (c = 'Невалидна'), + `${c} ${(u = i[a.format]) != null ? u : n.format}` + ); + } + case 'not_multiple_of': + return `Невалидно число: трябва да бъде кратно на ${n.divisor}`; + case 'unrecognized_keys': + return `Неразпознат${n.keys.length > 1 ? 'и' : ''} ключ${n.keys.length > 1 ? 'ове' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Невалиден ключ в ${n.origin}`; + case 'invalid_union': + default: + return 'Невалиден вход'; + case 'invalid_element': + return `Невалидна стойност в ${n.origin}`; + } + }; + }; + function th() { + return { localeError: eh() }; + } + var nh = () => { + let e = { + string: { unit: 'caràcters', verb: 'contenir' }, + file: { unit: 'bytes', verb: 'contenir' }, + array: { unit: 'elements', verb: 'contenir' }, + set: { unit: 'elements', verb: 'contenir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrada', + email: 'adreça electrònica', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'durada ISO', + ipv4: 'adreça IPv4', + ipv6: 'adreça IPv6', + cidrv4: 'rang IPv4', + cidrv6: 'rang IPv6', + base64: 'cadena codificada en base64', + base64url: 'cadena codificada en base64url', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Valor invàlid: s'esperava ${P(n.values[0])}` + : `Opció invàlida: s'esperava una de ${_(n.values, ' o ')}`; + case 'too_big': { + let a = n.inclusive ? 'com a màxim' : 'menys de', + c = t(n.origin); + return c + ? `Massa gran: s'esperava que ${(r = n.origin) != null ? r : 'el valor'} contingués ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `Massa gran: s'esperava que ${(s = n.origin) != null ? s : 'el valor'} fos ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? 'com a mínim' : 'més de', + c = t(n.origin); + return c + ? `Massa petit: s'esperava que ${n.origin} contingués ${a} ${n.minimum.toString()} ${c.unit}` + : `Massa petit: s'esperava que ${n.origin} fos ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Format invàlid: ha de començar amb "${a.prefix}"` + : a.format === 'ends_with' + ? `Format invàlid: ha d'acabar amb "${a.suffix}"` + : a.format === 'includes' + ? `Format invàlid: ha d'incloure "${a.includes}"` + : a.format === 'regex' + ? `Format invàlid: ha de coincidir amb el patró ${a.pattern}` + : `Format invàlid per a ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Número invàlid: ha de ser múltiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clau${n.keys.length > 1 ? 's' : ''} no reconeguda${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Clau invàlida a ${n.origin}`; + case 'invalid_union': + default: + return 'Entrada invàlida'; + case 'invalid_element': + return `Element invàlid a ${n.origin}`; + } + }; + }; + function ih() { + return { localeError: nh() }; + } + var rh = () => { + let e = { + string: { unit: 'znaků', verb: 'mít' }, + file: { unit: 'bajtů', verb: 'mít' }, + array: { unit: 'prvků', verb: 'mít' }, + set: { unit: 'prvků', verb: 'mít' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'regulární výraz', + email: 'e-mailová adresa', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'datum a čas ve formátu ISO', + date: 'datum ve formátu ISO', + time: 'čas ve formátu ISO', + duration: 'doba trvání ISO', + ipv4: 'IPv4 adresa', + ipv6: 'IPv6 adresa', + cidrv4: 'rozsah IPv4', + cidrv6: 'rozsah IPv6', + base64: 'řetězec zakódovaný ve formátu base64', + base64url: 'řetězec zakódovaný ve formátu base64url', + json_string: 'řetězec ve formátu JSON', + e164: 'číslo E.164', + jwt: 'JWT', + template_literal: 'vstup', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `Neplatný vstup: očekáváno ${n.expected}, obdrženo ${((p) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'číslo'; + case 'string': + return 'řetězec'; + case 'boolean': + return 'boolean'; + case 'bigint': + return 'bigint'; + case 'function': + return 'funkce'; + case 'symbol': + return 'symbol'; + case 'undefined': + return 'undefined'; + case 'object': + if (Array.isArray(p)) return 'pole'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Neplatný vstup: očekáváno ${P(n.values[0])}` + : `Neplatná možnost: očekávána jedna z hodnot ${_(n.values, '|')}`; + case 'too_big': { + let p = n.inclusive ? '<=' : '<', + f = t(n.origin); + return f + ? `Hodnota je příliš velká: ${(r = n.origin) != null ? r : 'hodnota'} musí mít ${p}${n.maximum.toString()} ${(o = f.unit) != null ? o : 'prvků'}` + : `Hodnota je příliš velká: ${(s = n.origin) != null ? s : 'hodnota'} musí být ${p}${n.maximum.toString()}`; + } + case 'too_small': { + let p = n.inclusive ? '>=' : '>', + f = t(n.origin); + return f + ? `Hodnota je příliš malá: ${(u = n.origin) != null ? u : 'hodnota'} musí mít ${p}${n.minimum.toString()} ${(a = f.unit) != null ? a : 'prvků'}` + : `Hodnota je příliš malá: ${(c = n.origin) != null ? c : 'hodnota'} musí být ${p}${n.minimum.toString()}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `Neplatný řetězec: musí začínat na "${p.prefix}"` + : p.format === 'ends_with' + ? `Neplatný řetězec: musí končit na "${p.suffix}"` + : p.format === 'includes' + ? `Neplatný řetězec: musí obsahovat "${p.includes}"` + : p.format === 'regex' + ? `Neplatný řetězec: musí odpovídat vzoru ${p.pattern}` + : `Neplatný formát ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `Neplatné číslo: musí být násobkem ${n.divisor}`; + case 'unrecognized_keys': + return `Neznámé klíče: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Neplatný klíč v ${n.origin}`; + case 'invalid_union': + default: + return 'Neplatný vstup'; + case 'invalid_element': + return `Neplatná hodnota v ${n.origin}`; + } + }; + }; + function ah() { + return { localeError: rh() }; + } + var oh = () => { + let e = { + string: { unit: 'tegn', verb: 'havde' }, + file: { unit: 'bytes', verb: 'havde' }, + array: { unit: 'elementer', verb: 'indeholdt' }, + set: { unit: 'elementer', verb: 'indeholdt' }, + }, + t = { + string: 'streng', + number: 'tal', + boolean: 'boolean', + array: 'liste', + object: 'objekt', + set: 'sæt', + file: 'fil', + }; + function i(o) { + var s; + return (s = e[o]) != null ? s : null; + } + function n(o) { + var s; + return (s = t[o]) != null ? s : o; + } + let r = { + regex: 'input', + email: 'e-mailadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslæt', + date: 'ISO-dato', + time: 'ISO-klokkeslæt', + duration: 'ISO-varighed', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodet streng', + base64url: 'base64url-kodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (o) => { + var s, u; + switch (o.code) { + case 'invalid_type': + return `Ugyldigt input: forventede ${n(o.expected)}, fik ${n( + ((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'tal'; + case 'object': + return Array.isArray(a) + ? 'liste' + : a === null + ? 'null' + : Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ? a.constructor.name + : 'objekt'; + } + return c; + })(o.input), + )}`; + case 'invalid_value': + return o.values.length === 1 + ? `Ugyldig værdi: forventede ${P(o.values[0])}` + : `Ugyldigt valg: forventede en af følgende ${_(o.values, '|')}`; + case 'too_big': { + let a = o.inclusive ? '<=' : '<', + c = i(o.origin), + m = n(o.origin); + return c + ? `For stor: forventede ${m ?? 'value'} ${c.verb} ${a} ${o.maximum.toString()} ${(s = c.unit) != null ? s : 'elementer'}` + : `For stor: forventede ${m ?? 'value'} havde ${a} ${o.maximum.toString()}`; + } + case 'too_small': { + let a = o.inclusive ? '>=' : '>', + c = i(o.origin), + m = n(o.origin); + return c + ? `For lille: forventede ${m} ${c.verb} ${a} ${o.minimum.toString()} ${c.unit}` + : `For lille: forventede ${m} havde ${a} ${o.minimum.toString()}`; + } + case 'invalid_format': { + let a = o; + return a.format === 'starts_with' + ? `Ugyldig streng: skal starte med "${a.prefix}"` + : a.format === 'ends_with' + ? `Ugyldig streng: skal ende med "${a.suffix}"` + : a.format === 'includes' + ? `Ugyldig streng: skal indeholde "${a.includes}"` + : a.format === 'regex' + ? `Ugyldig streng: skal matche mønsteret ${a.pattern}` + : `Ugyldig ${(u = r[a.format]) != null ? u : o.format}`; + } + case 'not_multiple_of': + return `Ugyldigt tal: skal være deleligt med ${o.divisor}`; + case 'unrecognized_keys': + return `${o.keys.length > 1 ? 'Ukendte nøgler' : 'Ukendt nøgle'}: ${_(o.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøgle i ${o.origin}`; + case 'invalid_union': + return 'Ugyldigt input: matcher ingen af de tilladte typer'; + case 'invalid_element': + return `Ugyldig værdi i ${o.origin}`; + default: + return 'Ugyldigt input'; + } + }; + }; + function sh() { + return { localeError: oh() }; + } + var uh = () => { + let e = { + string: { unit: 'Zeichen', verb: 'zu haben' }, + file: { unit: 'Bytes', verb: 'zu haben' }, + array: { unit: 'Elemente', verb: 'zu haben' }, + set: { unit: 'Elemente', verb: 'zu haben' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'Eingabe', + email: 'E-Mail-Adresse', + url: 'URL', + emoji: 'Emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-Datum und -Uhrzeit', + date: 'ISO-Datum', + time: 'ISO-Uhrzeit', + duration: 'ISO-Dauer', + ipv4: 'IPv4-Adresse', + ipv6: 'IPv6-Adresse', + cidrv4: 'IPv4-Bereich', + cidrv6: 'IPv6-Bereich', + base64: 'Base64-codierter String', + base64url: 'Base64-URL-codierter String', + json_string: 'JSON-String', + e164: 'E.164-Nummer', + jwt: 'JWT', + template_literal: 'Eingabe', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ungültige Eingabe: erwartet ${n.expected}, erhalten ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'Zahl'; + case 'object': + if (Array.isArray(a)) return 'Array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ungültige Eingabe: erwartet ${P(n.values[0])}` + : `Ungültige Option: erwartet eine von ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Zu groß: erwartet, dass ${(r = n.origin) != null ? r : 'Wert'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'Elemente'} hat` + : `Zu groß: erwartet, dass ${(s = n.origin) != null ? s : 'Wert'} ${a}${n.maximum.toString()} ist`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ${c.unit} hat` + : `Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ist`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ungültiger String: muss mit "${a.prefix}" beginnen` + : a.format === 'ends_with' + ? `Ungültiger String: muss mit "${a.suffix}" enden` + : a.format === 'includes' + ? `Ungültiger String: muss "${a.includes}" enthalten` + : a.format === 'regex' + ? `Ungültiger String: muss dem Muster ${a.pattern} entsprechen` + : `Ungültig: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Unbekannte Schlüssel' : 'Unbekannter Schlüssel'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Ungültiger Schlüssel in ${n.origin}`; + case 'invalid_union': + default: + return 'Ungültige Eingabe'; + case 'invalid_element': + return `Ungültiger Wert in ${n.origin}`; + } + }; + }; + function ch() { + return { localeError: uh() }; + } + var lh = () => { + let e = { + string: { unit: 'characters', verb: 'to have' }, + file: { unit: 'bytes', verb: 'to have' }, + array: { unit: 'items', verb: 'to have' }, + set: { unit: 'items', verb: 'to have' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'email address', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datetime', + date: 'ISO date', + time: 'ISO time', + duration: 'ISO duration', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded string', + base64url: 'base64url-encoded string', + json_string: 'JSON string', + e164: 'E.164 number', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Invalid input: expected ${n.expected}, received ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Invalid input: expected ${P(n.values[0])}` + : `Invalid option: expected one of ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Too big: expected ${(r = n.origin) != null ? r : 'value'} to have ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `Too big: expected ${(s = n.origin) != null ? s : 'value'} to be ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Too small: expected ${n.origin} to have ${a}${n.minimum.toString()} ${c.unit}` + : `Too small: expected ${n.origin} to be ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Invalid string: must start with "${a.prefix}"` + : a.format === 'ends_with' + ? `Invalid string: must end with "${a.suffix}"` + : a.format === 'includes' + ? `Invalid string: must include "${a.includes}"` + : a.format === 'regex' + ? `Invalid string: must match pattern ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Invalid number: must be a multiple of ${n.divisor}`; + case 'unrecognized_keys': + return `Unrecognized key${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Invalid key in ${n.origin}`; + case 'invalid_union': + default: + return 'Invalid input'; + case 'invalid_element': + return `Invalid value in ${n.origin}`; + } + }; + }; + function tl() { + return { localeError: lh() }; + } + var dh = () => { + let e = { + string: { unit: 'karaktrojn', verb: 'havi' }, + file: { unit: 'bajtojn', verb: 'havi' }, + array: { unit: 'elementojn', verb: 'havi' }, + set: { unit: 'elementojn', verb: 'havi' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'enigo', + email: 'retadreso', + url: 'URL', + emoji: 'emoĝio', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datotempo', + date: 'ISO-dato', + time: 'ISO-tempo', + duration: 'ISO-daŭro', + ipv4: 'IPv4-adreso', + ipv6: 'IPv6-adreso', + cidrv4: 'IPv4-rango', + cidrv6: 'IPv6-rango', + base64: '64-ume kodita karaktraro', + base64url: 'URL-64-ume kodita karaktraro', + json_string: 'JSON-karaktraro', + e164: 'E.164-nombro', + jwt: 'JWT', + template_literal: 'enigo', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Nevalida enigo: atendiĝis ${n.expected}, riceviĝis ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombro'; + case 'object': + if (Array.isArray(a)) return 'tabelo'; + if (a === null) return 'senvalora'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Nevalida enigo: atendiĝis ${P(n.values[0])}` + : `Nevalida opcio: atendiĝis unu el ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Tro granda: atendiĝis ke ${(r = n.origin) != null ? r : 'valoro'} havu ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementojn'}` + : `Tro granda: atendiĝis ke ${(s = n.origin) != null ? s : 'valoro'} havu ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Tro malgranda: atendiĝis ke ${n.origin} havu ${a}${n.minimum.toString()} ${c.unit}` + : `Tro malgranda: atendiĝis ke ${n.origin} estu ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Nevalida karaktraro: devas komenciĝi per "${a.prefix}"` + : a.format === 'ends_with' + ? `Nevalida karaktraro: devas finiĝi per "${a.suffix}"` + : a.format === 'includes' + ? `Nevalida karaktraro: devas inkluzivi "${a.includes}"` + : a.format === 'regex' + ? `Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}` + : `Nevalida ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Nevalida nombro: devas esti oblo de ${n.divisor}`; + case 'unrecognized_keys': + return `Nekonata${n.keys.length > 1 ? 'j' : ''} ŝlosilo${n.keys.length > 1 ? 'j' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Nevalida ŝlosilo en ${n.origin}`; + case 'invalid_union': + default: + return 'Nevalida enigo'; + case 'invalid_element': + return `Nevalida valoro en ${n.origin}`; + } + }; + }; + function mh() { + return { localeError: dh() }; + } + var ph = () => { + let e = { + string: { unit: 'caracteres', verb: 'tener' }, + file: { unit: 'bytes', verb: 'tener' }, + array: { unit: 'elementos', verb: 'tener' }, + set: { unit: 'elementos', verb: 'tener' }, + }, + t = { + string: 'texto', + number: 'número', + boolean: 'booleano', + array: 'arreglo', + object: 'objeto', + set: 'conjunto', + file: 'archivo', + date: 'fecha', + bigint: 'número grande', + symbol: 'símbolo', + undefined: 'indefinido', + null: 'nulo', + function: 'función', + map: 'mapa', + record: 'registro', + tuple: 'tupla', + enum: 'enumeración', + union: 'unión', + literal: 'literal', + promise: 'promesa', + void: 'vacío', + never: 'nunca', + unknown: 'desconocido', + any: 'cualquiera', + }; + function i(o) { + var s; + return (s = e[o]) != null ? s : null; + } + function n(o) { + var s; + return (s = t[o]) != null ? s : o; + } + let r = { + regex: 'entrada', + email: 'dirección de correo electrónico', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'fecha y hora ISO', + date: 'fecha ISO', + time: 'hora ISO', + duration: 'duración ISO', + ipv4: 'dirección IPv4', + ipv6: 'dirección IPv6', + cidrv4: 'rango IPv4', + cidrv6: 'rango IPv6', + base64: 'cadena codificada en base64', + base64url: 'URL codificada en base64', + json_string: 'cadena JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (o) => { + var s, u; + switch (o.code) { + case 'invalid_type': + return `Entrada inválida: se esperaba ${n(o.expected)}, recibido ${n( + ((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + return Array.isArray(a) + ? 'array' + : a === null + ? 'null' + : Object.getPrototypeOf(a) !== Object.prototype + ? a.constructor.name + : 'object'; + } + return c; + })(o.input), + )}`; + case 'invalid_value': + return o.values.length === 1 + ? `Entrada inválida: se esperaba ${P(o.values[0])}` + : `Opción inválida: se esperaba una de ${_(o.values, '|')}`; + case 'too_big': { + let a = o.inclusive ? '<=' : '<', + c = i(o.origin), + m = n(o.origin); + return c + ? `Demasiado grande: se esperaba que ${m ?? 'valor'} tuviera ${a}${o.maximum.toString()} ${(s = c.unit) != null ? s : 'elementos'}` + : `Demasiado grande: se esperaba que ${m ?? 'valor'} fuera ${a}${o.maximum.toString()}`; + } + case 'too_small': { + let a = o.inclusive ? '>=' : '>', + c = i(o.origin), + m = n(o.origin); + return c + ? `Demasiado pequeño: se esperaba que ${m} tuviera ${a}${o.minimum.toString()} ${c.unit}` + : `Demasiado pequeño: se esperaba que ${m} fuera ${a}${o.minimum.toString()}`; + } + case 'invalid_format': { + let a = o; + return a.format === 'starts_with' + ? `Cadena inválida: debe comenzar con "${a.prefix}"` + : a.format === 'ends_with' + ? `Cadena inválida: debe terminar en "${a.suffix}"` + : a.format === 'includes' + ? `Cadena inválida: debe incluir "${a.includes}"` + : a.format === 'regex' + ? `Cadena inválida: debe coincidir con el patrón ${a.pattern}` + : `Inválido ${(u = r[a.format]) != null ? u : o.format}`; + } + case 'not_multiple_of': + return `Número inválido: debe ser múltiplo de ${o.divisor}`; + case 'unrecognized_keys': + return `Llave${o.keys.length > 1 ? 's' : ''} desconocida${o.keys.length > 1 ? 's' : ''}: ${_(o.keys, ', ')}`; + case 'invalid_key': + return `Llave inválida en ${n(o.origin)}`; + case 'invalid_union': + default: + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido en ${n(o.origin)}`; + } + }; + }; + function fh() { + return { localeError: ph() }; + } + var vh = () => { + let e = { + string: { unit: 'کاراکتر', verb: 'داشته باشد' }, + file: { unit: 'بایت', verb: 'داشته باشد' }, + array: { unit: 'آیتم', verb: 'داشته باشد' }, + set: { unit: 'آیتم', verb: 'داشته باشد' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ورودی', + email: 'آدرس ایمیل', + url: 'URL', + emoji: 'ایموجی', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'تاریخ و زمان ایزو', + date: 'تاریخ ایزو', + time: 'زمان ایزو', + duration: 'مدت زمان ایزو', + ipv4: 'IPv4 آدرس', + ipv6: 'IPv6 آدرس', + cidrv4: 'IPv4 دامنه', + cidrv6: 'IPv6 دامنه', + base64: 'base64-encoded رشته', + base64url: 'base64url-encoded رشته', + json_string: 'JSON رشته', + e164: 'E.164 عدد', + jwt: 'JWT', + template_literal: 'ورودی', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ورودی نامعتبر: می‌بایست ${n.expected} می‌بود، ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'عدد'; + case 'object': + if (Array.isArray(a)) return 'آرایه'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} دریافت شد`; + case 'invalid_value': + return n.values.length === 1 + ? `ورودی نامعتبر: می‌بایست ${P(n.values[0])} می‌بود` + : `گزینه نامعتبر: می‌بایست یکی از ${_(n.values, '|')} می‌بود`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `خیلی بزرگ: ${(r = n.origin) != null ? r : 'مقدار'} باید ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصر'} باشد` + : `خیلی بزرگ: ${(s = n.origin) != null ? s : 'مقدار'} باید ${a}${n.maximum.toString()} باشد`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `خیلی کوچک: ${n.origin} باید ${a}${n.minimum.toString()} ${c.unit} باشد` + : `خیلی کوچک: ${n.origin} باید ${a}${n.minimum.toString()} باشد`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `رشته نامعتبر: باید با "${a.prefix}" شروع شود` + : a.format === 'ends_with' + ? `رشته نامعتبر: باید با "${a.suffix}" تمام شود` + : a.format === 'includes' + ? `رشته نامعتبر: باید شامل "${a.includes}" باشد` + : a.format === 'regex' + ? `رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد` + : `${(u = i[a.format]) != null ? u : n.format} نامعتبر`; + } + case 'not_multiple_of': + return `عدد نامعتبر: باید مضرب ${n.divisor} باشد`; + case 'unrecognized_keys': + return `کلید${n.keys.length > 1 ? 'های' : ''} ناشناس: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `کلید ناشناس در ${n.origin}`; + case 'invalid_union': + default: + return 'ورودی نامعتبر'; + case 'invalid_element': + return `مقدار نامعتبر در ${n.origin}`; + } + }; + }; + function gh() { + return { localeError: vh() }; + } + var hh = () => { + let e = { + string: { unit: 'merkkiä', subject: 'merkkijonon' }, + file: { unit: 'tavua', subject: 'tiedoston' }, + array: { unit: 'alkiota', subject: 'listan' }, + set: { unit: 'alkiota', subject: 'joukon' }, + number: { unit: '', subject: 'luvun' }, + bigint: { unit: '', subject: 'suuren kokonaisluvun' }, + int: { unit: '', subject: 'kokonaisluvun' }, + date: { unit: '', subject: 'päivämäärän' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'säännöllinen lauseke', + email: 'sähköpostiosoite', + url: 'URL-osoite', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-aikaleima', + date: 'ISO-päivämäärä', + time: 'ISO-aika', + duration: 'ISO-kesto', + ipv4: 'IPv4-osoite', + ipv6: 'IPv6-osoite', + cidrv4: 'IPv4-alue', + cidrv6: 'IPv6-alue', + base64: 'base64-koodattu merkkijono', + base64url: 'base64url-koodattu merkkijono', + json_string: 'JSON-merkkijono', + e164: 'E.164-luku', + jwt: 'JWT', + template_literal: 'templaattimerkkijono', + }; + return (n) => { + var r; + switch (n.code) { + case 'invalid_type': + return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${((o) => { + let s = typeof o; + switch (s) { + case 'number': + return Number.isNaN(o) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(o)) return 'array'; + if (o === null) return 'null'; + if ( + Object.getPrototypeOf(o) !== Object.prototype && + o.constructor + ) + return o.constructor.name; + } + return s; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Virheellinen syöte: täytyy olla ${P(n.values[0])}` + : `Virheellinen valinta: täytyy olla yksi seuraavista: ${_(n.values, '|')}`; + case 'too_big': { + let o = n.inclusive ? '<=' : '<', + s = t(n.origin); + return s + ? `Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim() + : `Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`; + } + case 'too_small': { + let o = n.inclusive ? '>=' : '>', + s = t(n.origin); + return s + ? `Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim() + : `Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`; + } + case 'invalid_format': { + let o = n; + return o.format === 'starts_with' + ? `Virheellinen syöte: täytyy alkaa "${o.prefix}"` + : o.format === 'ends_with' + ? `Virheellinen syöte: täytyy loppua "${o.suffix}"` + : o.format === 'includes' + ? `Virheellinen syöte: täytyy sisältää "${o.includes}"` + : o.format === 'regex' + ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}` + : `Virheellinen ${(r = i[o.format]) != null ? r : n.format}`; + } + case 'not_multiple_of': + return `Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Tuntemattomat avaimet' : 'Tuntematon avain'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return 'Virheellinen avain tietueessa'; + case 'invalid_union': + return 'Virheellinen unioni'; + case 'invalid_element': + return 'Virheellinen arvo joukossa'; + default: + return 'Virheellinen syöte'; + } + }; + }; + function bh() { + return { localeError: hh() }; + } + var yh = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrée', + email: 'adresse e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date et heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Entrée invalide : ${n.expected} attendu, ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombre'; + case 'object': + if (Array.isArray(a)) return 'tableau'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} reçu`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrée invalide : ${P(n.values[0])} attendu` + : `Option invalide : une valeur parmi ${_(n.values, '|')} attendue`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Trop grand : ${(r = n.origin) != null ? r : 'valeur'} doit ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'élément(s)'}` + : `Trop grand : ${(s = n.origin) != null ? s : 'valeur'} doit être ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Trop petit : ${n.origin} doit ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Trop petit : ${n.origin} doit être ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${a.prefix}"` + : a.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${a.suffix}"` + : a.format === 'includes' + ? `Chaîne invalide : doit inclure "${a.includes}"` + : a.format === 'regex' + ? `Chaîne invalide : doit correspondre au modèle ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clé${n.keys.length > 1 ? 's' : ''} non reconnue${n.keys.length > 1 ? 's' : ''} : ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${n.origin}`; + case 'invalid_union': + default: + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${n.origin}`; + } + }; + }; + function _h() { + return { localeError: yh() }; + } + var $h = () => { + let e = { + string: { unit: 'caractères', verb: 'avoir' }, + file: { unit: 'octets', verb: 'avoir' }, + array: { unit: 'éléments', verb: 'avoir' }, + set: { unit: 'éléments', verb: 'avoir' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'entrée', + email: 'adresse courriel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'date-heure ISO', + date: 'date ISO', + time: 'heure ISO', + duration: 'durée ISO', + ipv4: 'adresse IPv4', + ipv6: 'adresse IPv6', + cidrv4: 'plage IPv4', + cidrv6: 'plage IPv6', + base64: 'chaîne encodée en base64', + base64url: 'chaîne encodée en base64url', + json_string: 'chaîne JSON', + e164: 'numéro E.164', + jwt: 'JWT', + template_literal: 'entrée', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Entrée invalide : attendu ${n.expected}, reçu ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(u)) return 'array'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrée invalide : attendu ${P(n.values[0])}` + : `Option invalide : attendu l'une des valeurs suivantes ${_(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '≤' : '<', + a = t(n.origin); + return a + ? `Trop grand : attendu que ${(r = n.origin) != null ? r : 'la valeur'} ait ${u}${n.maximum.toString()} ${a.unit}` + : `Trop grand : attendu que ${(o = n.origin) != null ? o : 'la valeur'} soit ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '≥' : '>', + a = t(n.origin); + return a + ? `Trop petit : attendu que ${n.origin} ait ${u}${n.minimum.toString()} ${a.unit}` + : `Trop petit : attendu que ${n.origin} soit ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Chaîne invalide : doit commencer par "${u.prefix}"` + : u.format === 'ends_with' + ? `Chaîne invalide : doit se terminer par "${u.suffix}"` + : u.format === 'includes' + ? `Chaîne invalide : doit inclure "${u.includes}"` + : u.format === 'regex' + ? `Chaîne invalide : doit correspondre au motif ${u.pattern}` + : `${(s = i[u.format]) != null ? s : n.format} invalide`; + } + case 'not_multiple_of': + return `Nombre invalide : doit être un multiple de ${n.divisor}`; + case 'unrecognized_keys': + return `Clé${n.keys.length > 1 ? 's' : ''} non reconnue${n.keys.length > 1 ? 's' : ''} : ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Clé invalide dans ${n.origin}`; + case 'invalid_union': + default: + return 'Entrée invalide'; + case 'invalid_element': + return `Valeur invalide dans ${n.origin}`; + } + }; + }; + function kh() { + return { localeError: $h() }; + } + var wh = () => { + let e = { + string: { unit: 'אותיות', verb: 'לכלול' }, + file: { unit: 'בייטים', verb: 'לכלול' }, + array: { unit: 'פריטים', verb: 'לכלול' }, + set: { unit: 'פריטים', verb: 'לכלול' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'קלט', + email: 'כתובת אימייל', + url: 'כתובת רשת', + emoji: "אימוג'י", + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'תאריך וזמן ISO', + date: 'תאריך ISO', + time: 'זמן ISO', + duration: 'משך זמן ISO', + ipv4: 'כתובת IPv4', + ipv6: 'כתובת IPv6', + cidrv4: 'טווח IPv4', + cidrv6: 'טווח IPv6', + base64: 'מחרוזת בבסיס 64', + base64url: 'מחרוזת בבסיס 64 לכתובות רשת', + json_string: 'מחרוזת JSON', + e164: 'מספר E.164', + jwt: 'JWT', + template_literal: 'קלט', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `קלט לא תקין: צריך ${n.expected}, התקבל ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `קלט לא תקין: צריך ${P(n.values[0])}` + : `קלט לא תקין: צריך אחת מהאפשרויות ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `גדול מדי: ${(r = n.origin) != null ? r : 'value'} צריך להיות ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'}` + : `גדול מדי: ${(s = n.origin) != null ? s : 'value'} צריך להיות ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `קטן מדי: ${n.origin} צריך להיות ${a}${n.minimum.toString()} ${c.unit}` + : `קטן מדי: ${n.origin} צריך להיות ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `מחרוזת לא תקינה: חייבת להתחיל ב"${a.prefix}"` + : a.format === 'ends_with' + ? `מחרוזת לא תקינה: חייבת להסתיים ב "${a.suffix}"` + : a.format === 'includes' + ? `מחרוזת לא תקינה: חייבת לכלול "${a.includes}"` + : a.format === 'regex' + ? `מחרוזת לא תקינה: חייבת להתאים לתבנית ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} לא תקין`; + } + case 'not_multiple_of': + return `מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`; + case 'unrecognized_keys': + return `מפתח${n.keys.length > 1 ? 'ות' : ''} לא מזוה${n.keys.length > 1 ? 'ים' : 'ה'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `מפתח לא תקין ב${n.origin}`; + case 'invalid_union': + default: + return 'קלט לא תקין'; + case 'invalid_element': + return `ערך לא תקין ב${n.origin}`; + } + }; + }; + function Sh() { + return { localeError: wh() }; + } + var xh = () => { + let e = { + string: { unit: 'karakter', verb: 'legyen' }, + file: { unit: 'byte', verb: 'legyen' }, + array: { unit: 'elem', verb: 'legyen' }, + set: { unit: 'elem', verb: 'legyen' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'bemenet', + email: 'email cím', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO időbélyeg', + date: 'ISO dátum', + time: 'ISO idő', + duration: 'ISO időintervallum', + ipv4: 'IPv4 cím', + ipv6: 'IPv6 cím', + cidrv4: 'IPv4 tartomány', + cidrv6: 'IPv6 tartomány', + base64: 'base64-kódolt string', + base64url: 'base64url-kódolt string', + json_string: 'JSON string', + e164: 'E.164 szám', + jwt: 'JWT', + template_literal: 'bemenet', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'szám'; + case 'object': + if (Array.isArray(a)) return 'tömb'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Érvénytelen bemenet: a várt érték ${P(n.values[0])}` + : `Érvénytelen opció: valamelyik érték várt ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Túl nagy: ${(r = n.origin) != null ? r : 'érték'} mérete túl nagy ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elem'}` + : `Túl nagy: a bemeneti érték ${(s = n.origin) != null ? s : 'érték'} túl nagy: ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${a}${n.minimum.toString()} ${c.unit}` + : `Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie` + : a.format === 'ends_with' + ? `Érvénytelen string: "${a.suffix}" értékkel kell végződnie` + : a.format === 'includes' + ? `Érvénytelen string: "${a.includes}" értéket kell tartalmaznia` + : a.format === 'regex' + ? `Érvénytelen string: ${a.pattern} mintának kell megfelelnie` + : `Érvénytelen ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Érvénytelen szám: ${n.divisor} többszörösének kell lennie`; + case 'unrecognized_keys': + return `Ismeretlen kulcs${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Érvénytelen kulcs ${n.origin}`; + case 'invalid_union': + default: + return 'Érvénytelen bemenet'; + case 'invalid_element': + return `Érvénytelen érték: ${n.origin}`; + } + }; + }; + function Ih() { + return { localeError: xh() }; + } + var jh = () => { + let e = { + string: { unit: 'karakter', verb: 'memiliki' }, + file: { unit: 'byte', verb: 'memiliki' }, + array: { unit: 'item', verb: 'memiliki' }, + set: { unit: 'item', verb: 'memiliki' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'alamat email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tanggal dan waktu format ISO', + date: 'tanggal format ISO', + time: 'jam format ISO', + duration: 'durasi format ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'rentang alamat IPv4', + cidrv6: 'rentang alamat IPv6', + base64: 'string dengan enkode base64', + base64url: 'string dengan enkode base64url', + json_string: 'string JSON', + e164: 'angka E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input tidak valid: diharapkan ${n.expected}, diterima ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input tidak valid: diharapkan ${P(n.values[0])}` + : `Pilihan tidak valid: diharapkan salah satu dari ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Terlalu besar: diharapkan ${(r = n.origin) != null ? r : 'value'} memiliki ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elemen'}` + : `Terlalu besar: diharapkan ${(s = n.origin) != null ? s : 'value'} menjadi ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Terlalu kecil: diharapkan ${n.origin} memiliki ${a}${n.minimum.toString()} ${c.unit}` + : `Terlalu kecil: diharapkan ${n.origin} menjadi ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `String tidak valid: harus dimulai dengan "${a.prefix}"` + : a.format === 'ends_with' + ? `String tidak valid: harus berakhir dengan "${a.suffix}"` + : a.format === 'includes' + ? `String tidak valid: harus menyertakan "${a.includes}"` + : a.format === 'regex' + ? `String tidak valid: harus sesuai pola ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} tidak valid`; + } + case 'not_multiple_of': + return `Angka tidak valid: harus kelipatan dari ${n.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali ${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak valid di ${n.origin}`; + case 'invalid_union': + default: + return 'Input tidak valid'; + case 'invalid_element': + return `Nilai tidak valid di ${n.origin}`; + } + }; + }; + function Oh() { + return { localeError: jh() }; + } + var zh = () => { + let e = { + string: { unit: 'stafi', verb: 'að hafa' }, + file: { unit: 'bæti', verb: 'að hafa' }, + array: { unit: 'hluti', verb: 'að hafa' }, + set: { unit: 'hluti', verb: 'að hafa' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'gildi', + email: 'netfang', + url: 'vefslóð', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dagsetning og tími', + date: 'ISO dagsetning', + time: 'ISO tími', + duration: 'ISO tímalengd', + ipv4: 'IPv4 address', + ipv6: 'IPv6 address', + cidrv4: 'IPv4 range', + cidrv6: 'IPv6 range', + base64: 'base64-encoded strengur', + base64url: 'base64url-encoded strengur', + json_string: 'JSON strengur', + e164: 'E.164 tölugildi', + jwt: 'JWT', + template_literal: 'gildi', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Rangt gildi: Þú slóst inn ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'númer'; + case 'object': + if (Array.isArray(a)) return 'fylki'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} þar sem á að vera ${n.expected}`; + case 'invalid_value': + return n.values.length === 1 + ? `Rangt gildi: gert ráð fyrir ${P(n.values[0])}` + : `Ógilt val: má vera eitt af eftirfarandi ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Of stórt: gert er ráð fyrir að ${(r = n.origin) != null ? r : 'gildi'} hafi ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'hluti'}` + : `Of stórt: gert er ráð fyrir að ${(s = n.origin) != null ? s : 'gildi'} sé ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Of lítið: gert er ráð fyrir að ${n.origin} hafi ${a}${n.minimum.toString()} ${c.unit}` + : `Of lítið: gert er ráð fyrir að ${n.origin} sé ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ógildur strengur: verður að byrja á "${a.prefix}"` + : a.format === 'ends_with' + ? `Ógildur strengur: verður að enda á "${a.suffix}"` + : a.format === 'includes' + ? `Ógildur strengur: verður að innihalda "${a.includes}"` + : a.format === 'regex' + ? `Ógildur strengur: verður að fylgja mynstri ${a.pattern}` + : `Rangt ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Röng tala: verður að vera margfeldi af ${n.divisor}`; + case 'unrecognized_keys': + return `Óþekkt ${n.keys.length > 1 ? 'ir lyklar' : 'ur lykill'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Rangur lykill í ${n.origin}`; + case 'invalid_union': + default: + return 'Rangt gildi'; + case 'invalid_element': + return `Rangt gildi í ${n.origin}`; + } + }; + }; + function Nh() { + return { localeError: zh() }; + } + var Uh = () => { + let e = { + string: { unit: 'caratteri', verb: 'avere' }, + file: { unit: 'byte', verb: 'avere' }, + array: { unit: 'elementi', verb: 'avere' }, + set: { unit: 'elementi', verb: 'avere' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'indirizzo email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e ora ISO', + date: 'data ISO', + time: 'ora ISO', + duration: 'durata ISO', + ipv4: 'indirizzo IPv4', + ipv6: 'indirizzo IPv6', + cidrv4: 'intervallo IPv4', + cidrv6: 'intervallo IPv6', + base64: 'stringa codificata in base64', + base64url: 'URL codificata in base64', + json_string: 'stringa JSON', + e164: 'numero E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input non valido: atteso ${n.expected}, ricevuto ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'numero'; + case 'object': + if (Array.isArray(a)) return 'vettore'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input non valido: atteso ${P(n.values[0])}` + : `Opzione non valida: atteso uno tra ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Troppo grande: ${(r = n.origin) != null ? r : 'valore'} deve avere ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementi'}` + : `Troppo grande: ${(s = n.origin) != null ? s : 'valore'} deve essere ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Troppo piccolo: ${n.origin} deve avere ${a}${n.minimum.toString()} ${c.unit}` + : `Troppo piccolo: ${n.origin} deve essere ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Stringa non valida: deve iniziare con "${a.prefix}"` + : a.format === 'ends_with' + ? `Stringa non valida: deve terminare con "${a.suffix}"` + : a.format === 'includes' + ? `Stringa non valida: deve includere "${a.includes}"` + : a.format === 'regex' + ? `Stringa non valida: deve corrispondere al pattern ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Numero non valido: deve essere un multiplo di ${n.divisor}`; + case 'unrecognized_keys': + return `Chiav${n.keys.length > 1 ? 'i' : 'e'} non riconosciut${n.keys.length > 1 ? 'e' : 'a'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Chiave non valida in ${n.origin}`; + case 'invalid_union': + default: + return 'Input non valido'; + case 'invalid_element': + return `Valore non valido in ${n.origin}`; + } + }; + }; + function Ph() { + return { localeError: Uh() }; + } + var Eh = () => { + let e = { + string: { unit: '文字', verb: 'である' }, + file: { unit: 'バイト', verb: 'である' }, + array: { unit: '要素', verb: 'である' }, + set: { unit: '要素', verb: 'である' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '入力値', + email: 'メールアドレス', + url: 'URL', + emoji: '絵文字', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日時', + date: 'ISO日付', + time: 'ISO時刻', + duration: 'ISO期間', + ipv4: 'IPv4アドレス', + ipv6: 'IPv6アドレス', + cidrv4: 'IPv4範囲', + cidrv6: 'IPv6範囲', + base64: 'base64エンコード文字列', + base64url: 'base64urlエンコード文字列', + json_string: 'JSON文字列', + e164: 'E.164番号', + jwt: 'JWT', + template_literal: '入力値', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `無効な入力: ${n.expected}が期待されましたが、${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : '数値'; + case 'object': + if (Array.isArray(a)) return '配列'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}が入力されました`; + case 'invalid_value': + return n.values.length === 1 + ? `無効な入力: ${P(n.values[0])}が期待されました` + : `無効な選択: ${_(n.values, '、')}のいずれかである必要があります`; + case 'too_big': { + let a = n.inclusive ? '以下である' : 'より小さい', + c = t(n.origin); + return c + ? `大きすぎる値: ${(r = n.origin) != null ? r : '値'}は${n.maximum.toString()}${(o = c.unit) != null ? o : '要素'}${a}必要があります` + : `大きすぎる値: ${(s = n.origin) != null ? s : '値'}は${n.maximum.toString()}${a}必要があります`; + } + case 'too_small': { + let a = n.inclusive ? '以上である' : 'より大きい', + c = t(n.origin); + return c + ? `小さすぎる値: ${n.origin}は${n.minimum.toString()}${c.unit}${a}必要があります` + : `小さすぎる値: ${n.origin}は${n.minimum.toString()}${a}必要があります`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `無効な文字列: "${a.prefix}"で始まる必要があります` + : a.format === 'ends_with' + ? `無効な文字列: "${a.suffix}"で終わる必要があります` + : a.format === 'includes' + ? `無効な文字列: "${a.includes}"を含む必要があります` + : a.format === 'regex' + ? `無効な文字列: パターン${a.pattern}に一致する必要があります` + : `無効な${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `無効な数値: ${n.divisor}の倍数である必要があります`; + case 'unrecognized_keys': + return `認識されていないキー${n.keys.length > 1 ? '群' : ''}: ${_(n.keys, '、')}`; + case 'invalid_key': + return `${n.origin}内の無効なキー`; + case 'invalid_union': + default: + return '無効な入力'; + case 'invalid_element': + return `${n.origin}内の無効な値`; + } + }; + }; + function Dh() { + return { localeError: Eh() }; + } + var Th = () => { + let e = { + string: { unit: 'სიმბოლო', verb: 'უნდა შეიცავდეს' }, + file: { unit: 'ბაიტი', verb: 'უნდა შეიცავდეს' }, + array: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + set: { unit: 'ელემენტი', verb: 'უნდა შეიცავდეს' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'შეყვანა', + email: 'ელ-ფოსტის მისამართი', + url: 'URL', + emoji: 'ემოჯი', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'თარიღი-დრო', + date: 'თარიღი', + time: 'დრო', + duration: 'ხანგრძლივობა', + ipv4: 'IPv4 მისამართი', + ipv6: 'IPv6 მისამართი', + cidrv4: 'IPv4 დიაპაზონი', + cidrv6: 'IPv6 დიაპაზონი', + base64: 'base64-კოდირებული სტრინგი', + base64url: 'base64url-კოდირებული სტრინგი', + json_string: 'JSON სტრინგი', + e164: 'E.164 ნომერი', + jwt: 'JWT', + template_literal: 'შეყვანა', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `არასწორი შეყვანა: მოსალოდნელი ${n.expected}, მიღებული ${(( + u, + ) => { + var a; + let c = typeof u; + switch (c) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'რიცხვი'; + case 'object': + if (Array.isArray(u)) return 'მასივი'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return (a = { + string: 'სტრინგი', + boolean: 'ბულეანი', + undefined: 'undefined', + bigint: 'bigint', + symbol: 'symbol', + function: 'ფუნქცია', + }[c]) != null + ? a + : c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `არასწორი შეყვანა: მოსალოდნელი ${P(n.values[0])}` + : `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${_(n.values, '|')}-დან`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + return a + ? `ზედმეტად დიდი: მოსალოდნელი ${(r = n.origin) != null ? r : 'მნიშვნელობა'} ${a.verb} ${u}${n.maximum.toString()} ${a.unit}` + : `ზედმეტად დიდი: მოსალოდნელი ${(o = n.origin) != null ? o : 'მნიშვნელობა'} იყოს ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + return a + ? `ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${u}${n.minimum.toString()} ${a.unit}` + : `ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `არასწორი სტრინგი: უნდა იწყებოდეს "${u.prefix}"-ით` + : u.format === 'ends_with' + ? `არასწორი სტრინგი: უნდა მთავრდებოდეს "${u.suffix}"-ით` + : u.format === 'includes' + ? `არასწორი სტრინგი: უნდა შეიცავდეს "${u.includes}"-ს` + : u.format === 'regex' + ? `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${u.pattern}` + : `არასწორი ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`; + case 'unrecognized_keys': + return `უცნობი გასაღებ${n.keys.length > 1 ? 'ები' : 'ი'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `არასწორი გასაღები ${n.origin}-ში`; + case 'invalid_union': + default: + return 'არასწორი შეყვანა'; + case 'invalid_element': + return `არასწორი მნიშვნელობა ${n.origin}-ში`; + } + }; + }; + function Ch() { + return { localeError: Th() }; + } + var Ah = () => { + let e = { + string: { unit: 'តួអក្សរ', verb: 'គួរមាន' }, + file: { unit: 'បៃ', verb: 'គួរមាន' }, + array: { unit: 'ធាតុ', verb: 'គួរមាន' }, + set: { unit: 'ធាតុ', verb: 'គួរមាន' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ទិន្នន័យបញ្ចូល', + email: 'អាសយដ្ឋានអ៊ីមែល', + url: 'URL', + emoji: 'សញ្ញាអារម្មណ៍', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'កាលបរិច្ឆេទ និងម៉ោង ISO', + date: 'កាលបរិច្ឆេទ ISO', + time: 'ម៉ោង ISO', + duration: 'រយៈពេល ISO', + ipv4: 'អាសយដ្ឋាន IPv4', + ipv6: 'អាសយដ្ឋាន IPv6', + cidrv4: 'ដែនអាសយដ្ឋាន IPv4', + cidrv6: 'ដែនអាសយដ្ឋាន IPv6', + base64: 'ខ្សែអក្សរអ៊ិកូដ base64', + base64url: 'ខ្សែអក្សរអ៊ិកូដ base64url', + json_string: 'ខ្សែអក្សរ JSON', + e164: 'លេខ E.164', + jwt: 'JWT', + template_literal: 'ទិន្នន័យបញ្ចូល', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'មិនមែនជាលេខ (NaN)' : 'លេខ'; + case 'object': + if (Array.isArray(a)) return 'អារេ (Array)'; + if (a === null) return 'គ្មានតម្លៃ (null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${P(n.values[0])}` + : `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `ធំពេក៖ ត្រូវការ ${(r = n.origin) != null ? r : 'តម្លៃ'} ${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'ធាតុ'}` + : `ធំពេក៖ ត្រូវការ ${(s = n.origin) != null ? s : 'តម្លៃ'} ${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `តូចពេក៖ ត្រូវការ ${n.origin} ${a} ${n.minimum.toString()} ${c.unit}` + : `តូចពេក៖ ត្រូវការ ${n.origin} ${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"` + : a.format === 'ends_with' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"` + : a.format === 'includes' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"` + : a.format === 'regex' + ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}` + : `មិនត្រឹមត្រូវ៖ ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`; + case 'unrecognized_keys': + return `រកឃើញសោមិនស្គាល់៖ ${_(n.keys, ', ')}`; + case 'invalid_key': + return `សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`; + case 'invalid_union': + default: + return 'ទិន្នន័យមិនត្រឹមត្រូវ'; + case 'invalid_element': + return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`; + } + }; + }; + function nl() { + return { localeError: Ah() }; + } + function Zh() { + return nl(); + } + var Rh = () => { + let e = { + string: { unit: '문자', verb: 'to have' }, + file: { unit: '바이트', verb: 'to have' }, + array: { unit: '개', verb: 'to have' }, + set: { unit: '개', verb: 'to have' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '입력', + email: '이메일 주소', + url: 'URL', + emoji: '이모지', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 날짜시간', + date: 'ISO 날짜', + time: 'ISO 시간', + duration: 'ISO 기간', + ipv4: 'IPv4 주소', + ipv6: 'IPv6 주소', + cidrv4: 'IPv4 범위', + cidrv6: 'IPv6 범위', + base64: 'base64 인코딩 문자열', + base64url: 'base64url 인코딩 문자열', + json_string: 'JSON 문자열', + e164: 'E.164 번호', + jwt: 'JWT', + template_literal: '입력', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${(( + p, + ) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(p)) return 'array'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}입니다`; + case 'invalid_value': + return n.values.length === 1 + ? `잘못된 입력: 값은 ${P(n.values[0])} 이어야 합니다` + : `잘못된 옵션: ${_(n.values, '또는 ')} 중 하나여야 합니다`; + case 'too_big': { + let p = n.inclusive ? '이하' : '미만', + f = p === '미만' ? '이어야 합니다' : '여야 합니다', + h = t(n.origin), + N = (r = h?.unit) != null ? r : '요소'; + return h + ? `${(o = n.origin) != null ? o : '값'}이 너무 큽니다: ${n.maximum.toString()}${N} ${p}${f}` + : `${(s = n.origin) != null ? s : '값'}이 너무 큽니다: ${n.maximum.toString()} ${p}${f}`; + } + case 'too_small': { + let p = n.inclusive ? '이상' : '초과', + f = p === '이상' ? '이어야 합니다' : '여야 합니다', + h = t(n.origin), + N = (u = h?.unit) != null ? u : '요소'; + return h + ? `${(a = n.origin) != null ? a : '값'}이 너무 작습니다: ${n.minimum.toString()}${N} ${p}${f}` + : `${(c = n.origin) != null ? c : '값'}이 너무 작습니다: ${n.minimum.toString()} ${p}${f}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `잘못된 문자열: "${p.prefix}"(으)로 시작해야 합니다` + : p.format === 'ends_with' + ? `잘못된 문자열: "${p.suffix}"(으)로 끝나야 합니다` + : p.format === 'includes' + ? `잘못된 문자열: "${p.includes}"을(를) 포함해야 합니다` + : p.format === 'regex' + ? `잘못된 문자열: 정규식 ${p.pattern} 패턴과 일치해야 합니다` + : `잘못된 ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `잘못된 숫자: ${n.divisor}의 배수여야 합니다`; + case 'unrecognized_keys': + return `인식할 수 없는 키: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `잘못된 키: ${n.origin}`; + case 'invalid_union': + default: + return '잘못된 입력'; + case 'invalid_element': + return `잘못된 값: ${n.origin}`; + } + }; + }; + function Lh() { + return { localeError: Rh() }; + } + var rn = (e, t = void 0) => { + switch (e) { + case 'number': + return Number.isNaN(t) ? 'NaN' : 'skaičius'; + case 'bigint': + return 'sveikasis skaičius'; + case 'string': + return 'eilutė'; + case 'boolean': + return 'loginė reikšmė'; + case 'undefined': + case 'void': + return 'neapibrėžta reikšmė'; + case 'function': + return 'funkcija'; + case 'symbol': + return 'simbolis'; + case 'object': + return t === void 0 + ? 'nežinomas objektas' + : t === null + ? 'nulinė reikšmė' + : Array.isArray(t) + ? 'masyvas' + : Object.getPrototypeOf(t) !== Object.prototype && t.constructor + ? t.constructor.name + : 'objektas'; + case 'null': + return 'nulinė reikšmė'; + } + return e; + }, + an = (e) => e.charAt(0).toUpperCase() + e.slice(1); + function ks(e) { + let t = Math.abs(e), + i = t % 10, + n = t % 100; + return (n >= 11 && n <= 19) || i === 0 ? 'many' : i === 1 ? 'one' : 'few'; + } + var Jh = () => { + let e = { + string: { + unit: { one: 'simbolis', few: 'simboliai', many: 'simbolių' }, + verb: { + smaller: { + inclusive: 'turi būti ne ilgesnė kaip', + notInclusive: 'turi būti trumpesnė kaip', + }, + bigger: { + inclusive: 'turi būti ne trumpesnė kaip', + notInclusive: 'turi būti ilgesnė kaip', + }, + }, + }, + file: { + unit: { one: 'baitas', few: 'baitai', many: 'baitų' }, + verb: { + smaller: { + inclusive: 'turi būti ne didesnis kaip', + notInclusive: 'turi būti mažesnis kaip', + }, + bigger: { + inclusive: 'turi būti ne mažesnis kaip', + notInclusive: 'turi būti didesnis kaip', + }, + }, + }, + array: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + set: { + unit: { one: 'elementą', few: 'elementus', many: 'elementų' }, + verb: { + smaller: { + inclusive: 'turi turėti ne daugiau kaip', + notInclusive: 'turi turėti mažiau kaip', + }, + bigger: { + inclusive: 'turi turėti ne mažiau kaip', + notInclusive: 'turi turėti daugiau kaip', + }, + }, + }, + }; + function t(n, r, o, s) { + var u; + let a = (u = e[n]) != null ? u : null; + return a === null + ? a + : { + unit: a.unit[r], + verb: a.verb[s][o ? 'inclusive' : 'notInclusive'], + }; + } + let i = { + regex: 'įvestis', + email: 'el. pašto adresas', + url: 'URL', + emoji: 'jaustukas', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO data ir laikas', + date: 'ISO data', + time: 'ISO laikas', + duration: 'ISO trukmė', + ipv4: 'IPv4 adresas', + ipv6: 'IPv6 adresas', + cidrv4: 'IPv4 tinklo prefiksas (CIDR)', + cidrv6: 'IPv6 tinklo prefiksas (CIDR)', + base64: 'base64 užkoduota eilutė', + base64url: 'base64url užkoduota eilutė', + json_string: 'JSON eilutė', + e164: 'E.164 numeris', + jwt: 'JWT', + template_literal: 'įvestis', + }; + return (n) => { + var r, o, s, u, a, c, m, p, f, h, N; + switch (n.code) { + case 'invalid_type': + return `Gautas tipas ${((N = n.input), rn(typeof N, N))}, o tikėtasi - ${rn(n.expected)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Privalo būti ${P(n.values[0])}` + : `Privalo būti vienas iš ${_(n.values, '|')} pasirinkimų`; + case 'too_big': { + let k = rn(n.origin), + g = t( + n.origin, + ks(Number(n.maximum)), + (r = n.inclusive) != null && r, + 'smaller', + ); + if (g?.verb) + return `${an((o = k ?? n.origin) != null ? o : 'reikšmė')} ${g.verb} ${n.maximum.toString()} ${(s = g.unit) != null ? s : 'elementų'}`; + let y = n.inclusive ? 'ne didesnis kaip' : 'mažesnis kaip'; + return `${an((u = k ?? n.origin) != null ? u : 'reikšmė')} turi būti ${y} ${n.maximum.toString()} ${g?.unit}`; + } + case 'too_small': { + let k = rn(n.origin), + g = t( + n.origin, + ks(Number(n.minimum)), + (a = n.inclusive) != null && a, + 'bigger', + ); + if (g?.verb) + return `${an((c = k ?? n.origin) != null ? c : 'reikšmė')} ${g.verb} ${n.minimum.toString()} ${(m = g.unit) != null ? m : 'elementų'}`; + let y = n.inclusive ? 'ne mažesnis kaip' : 'didesnis kaip'; + return `${an((p = k ?? n.origin) != null ? p : 'reikšmė')} turi būti ${y} ${n.minimum.toString()} ${g?.unit}`; + } + case 'invalid_format': { + let k = n; + return k.format === 'starts_with' + ? `Eilutė privalo prasidėti "${k.prefix}"` + : k.format === 'ends_with' + ? `Eilutė privalo pasibaigti "${k.suffix}"` + : k.format === 'includes' + ? `Eilutė privalo įtraukti "${k.includes}"` + : k.format === 'regex' + ? `Eilutė privalo atitikti ${k.pattern}` + : `Neteisingas ${(f = i[k.format]) != null ? f : n.format}`; + } + case 'not_multiple_of': + return `Skaičius privalo būti ${n.divisor} kartotinis.`; + case 'unrecognized_keys': + return `Neatpažint${n.keys.length > 1 ? 'i' : 'as'} rakt${n.keys.length > 1 ? 'ai' : 'as'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return 'Rastas klaidingas raktas'; + case 'invalid_union': + default: + return 'Klaidinga įvestis'; + case 'invalid_element': { + let k = rn(n.origin); + return `${an((h = k ?? n.origin) != null ? h : 'reikšmė')} turi klaidingą įvestį`; + } + } + }; + }; + function Mh() { + return { localeError: Jh() }; + } + var Vh = () => { + let e = { + string: { unit: 'знаци', verb: 'да имаат' }, + file: { unit: 'бајти', verb: 'да имаат' }, + array: { unit: 'ставки', verb: 'да имаат' }, + set: { unit: 'ставки', verb: 'да имаат' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'внес', + email: 'адреса на е-пошта', + url: 'URL', + emoji: 'емоџи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO датум и време', + date: 'ISO датум', + time: 'ISO време', + duration: 'ISO времетраење', + ipv4: 'IPv4 адреса', + ipv6: 'IPv6 адреса', + cidrv4: 'IPv4 опсег', + cidrv6: 'IPv6 опсег', + base64: 'base64-енкодирана низа', + base64url: 'base64url-енкодирана низа', + json_string: 'JSON низа', + e164: 'E.164 број', + jwt: 'JWT', + template_literal: 'внес', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Грешен внес: се очекува ${n.expected}, примено ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'број'; + case 'object': + if (Array.isArray(a)) return 'низа'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Invalid input: expected ${P(n.values[0])}` + : `Грешана опција: се очекува една ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Премногу голем: се очекува ${(r = n.origin) != null ? r : 'вредноста'} да има ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елементи'}` + : `Премногу голем: се очекува ${(s = n.origin) != null ? s : 'вредноста'} да биде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Премногу мал: се очекува ${n.origin} да има ${a}${n.minimum.toString()} ${c.unit}` + : `Премногу мал: се очекува ${n.origin} да биде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Неважечка низа: мора да започнува со "${a.prefix}"` + : a.format === 'ends_with' + ? `Неважечка низа: мора да завршува со "${a.suffix}"` + : a.format === 'includes' + ? `Неважечка низа: мора да вклучува "${a.includes}"` + : a.format === 'regex' + ? `Неважечка низа: мора да одгоара на патернот ${a.pattern}` + : `Invalid ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Грешен број: мора да биде делив со ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Непрепознаени клучеви' : 'Непрепознаен клуч'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Грешен клуч во ${n.origin}`; + case 'invalid_union': + default: + return 'Грешен внес'; + case 'invalid_element': + return `Грешна вредност во ${n.origin}`; + } + }; + }; + function Fh() { + return { localeError: Vh() }; + } + var Wh = () => { + let e = { + string: { unit: 'aksara', verb: 'mempunyai' }, + file: { unit: 'bait', verb: 'mempunyai' }, + array: { unit: 'elemen', verb: 'mempunyai' }, + set: { unit: 'elemen', verb: 'mempunyai' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'alamat e-mel', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'tarikh masa ISO', + date: 'tarikh ISO', + time: 'masa ISO', + duration: 'tempoh ISO', + ipv4: 'alamat IPv4', + ipv6: 'alamat IPv6', + cidrv4: 'julat IPv4', + cidrv6: 'julat IPv6', + base64: 'string dikodkan base64', + base64url: 'string dikodkan base64url', + json_string: 'string JSON', + e164: 'nombor E.164', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Input tidak sah: dijangka ${n.expected}, diterima ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'nombor'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Input tidak sah: dijangka ${P(n.values[0])}` + : `Pilihan tidak sah: dijangka salah satu daripada ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Terlalu besar: dijangka ${(r = n.origin) != null ? r : 'nilai'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elemen'}` + : `Terlalu besar: dijangka ${(s = n.origin) != null ? s : 'nilai'} adalah ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Terlalu kecil: dijangka ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Terlalu kecil: dijangka ${n.origin} adalah ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `String tidak sah: mesti bermula dengan "${a.prefix}"` + : a.format === 'ends_with' + ? `String tidak sah: mesti berakhir dengan "${a.suffix}"` + : a.format === 'includes' + ? `String tidak sah: mesti mengandungi "${a.includes}"` + : a.format === 'regex' + ? `String tidak sah: mesti sepadan dengan corak ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} tidak sah`; + } + case 'not_multiple_of': + return `Nombor tidak sah: perlu gandaan ${n.divisor}`; + case 'unrecognized_keys': + return `Kunci tidak dikenali: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Kunci tidak sah dalam ${n.origin}`; + case 'invalid_union': + default: + return 'Input tidak sah'; + case 'invalid_element': + return `Nilai tidak sah dalam ${n.origin}`; + } + }; + }; + function qh() { + return { localeError: Wh() }; + } + var Bh = () => { + let e = { + string: { unit: 'tekens' }, + file: { unit: 'bytes' }, + array: { unit: 'elementen' }, + set: { unit: 'elementen' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'invoer', + email: 'emailadres', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum en tijd', + date: 'ISO datum', + time: 'ISO tijd', + duration: 'ISO duur', + ipv4: 'IPv4-adres', + ipv6: 'IPv6-adres', + cidrv4: 'IPv4-bereik', + cidrv6: 'IPv6-bereik', + base64: 'base64-gecodeerde tekst', + base64url: 'base64 URL-gecodeerde tekst', + json_string: 'JSON string', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'invoer', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ongeldige invoer: verwacht ${n.expected}, ontving ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'getal'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ongeldige invoer: verwacht ${P(n.values[0])}` + : `Ongeldige optie: verwacht één van ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Te lang: verwacht dat ${(r = n.origin) != null ? r : 'waarde'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementen'} bevat` + : `Te lang: verwacht dat ${(s = n.origin) != null ? s : 'waarde'} ${a}${n.maximum.toString()} is`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} ${c.unit} bevat` + : `Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} is`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ongeldige tekst: moet met "${a.prefix}" beginnen` + : a.format === 'ends_with' + ? `Ongeldige tekst: moet op "${a.suffix}" eindigen` + : a.format === 'includes' + ? `Ongeldige tekst: moet "${a.includes}" bevatten` + : a.format === 'regex' + ? `Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}` + : `Ongeldig: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`; + case 'unrecognized_keys': + return `Onbekende key${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Ongeldige key in ${n.origin}`; + case 'invalid_union': + default: + return 'Ongeldige invoer'; + case 'invalid_element': + return `Ongeldige waarde in ${n.origin}`; + } + }; + }; + function Gh() { + return { localeError: Bh() }; + } + var Kh = () => { + let e = { + string: { unit: 'tegn', verb: 'å ha' }, + file: { unit: 'bytes', verb: 'å ha' }, + array: { unit: 'elementer', verb: 'å inneholde' }, + set: { unit: 'elementer', verb: 'å inneholde' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'input', + email: 'e-postadresse', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO dato- og klokkeslett', + date: 'ISO-dato', + time: 'ISO-klokkeslett', + duration: 'ISO-varighet', + ipv4: 'IPv4-område', + ipv6: 'IPv6-område', + cidrv4: 'IPv4-spekter', + cidrv6: 'IPv6-spekter', + base64: 'base64-enkodet streng', + base64url: 'base64url-enkodet streng', + json_string: 'JSON-streng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Ugyldig input: forventet ${n.expected}, fikk ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'tall'; + case 'object': + if (Array.isArray(a)) return 'liste'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ugyldig verdi: forventet ${P(n.values[0])}` + : `Ugyldig valg: forventet en av ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `For stor(t): forventet ${(r = n.origin) != null ? r : 'value'} til å ha ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementer'}` + : `For stor(t): forventet ${(s = n.origin) != null ? s : 'value'} til å ha ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `For lite(n): forventet ${n.origin} til å ha ${a}${n.minimum.toString()} ${c.unit}` + : `For lite(n): forventet ${n.origin} til å ha ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Ugyldig streng: må starte med "${a.prefix}"` + : a.format === 'ends_with' + ? `Ugyldig streng: må ende med "${a.suffix}"` + : a.format === 'includes' + ? `Ugyldig streng: må inneholde "${a.includes}"` + : a.format === 'regex' + ? `Ugyldig streng: må matche mønsteret ${a.pattern}` + : `Ugyldig ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Ugyldig tall: må være et multiplum av ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Ukjente nøkler' : 'Ukjent nøkkel'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Ugyldig nøkkel i ${n.origin}`; + case 'invalid_union': + default: + return 'Ugyldig input'; + case 'invalid_element': + return `Ugyldig verdi i ${n.origin}`; + } + }; + }; + function Hh() { + return { localeError: Kh() }; + } + var Xh = () => { + let e = { + string: { unit: 'harf', verb: 'olmalıdır' }, + file: { unit: 'bayt', verb: 'olmalıdır' }, + array: { unit: 'unsur', verb: 'olmalıdır' }, + set: { unit: 'unsur', verb: 'olmalıdır' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'giren', + email: 'epostagâh', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO hengâmı', + date: 'ISO tarihi', + time: 'ISO zamanı', + duration: 'ISO müddeti', + ipv4: 'IPv4 nişânı', + ipv6: 'IPv6 nişânı', + cidrv4: 'IPv4 menzili', + cidrv6: 'IPv6 menzili', + base64: 'base64-şifreli metin', + base64url: 'base64url-şifreli metin', + json_string: 'JSON metin', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'giren', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Fâsit giren: umulan ${n.expected}, alınan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'numara'; + case 'object': + if (Array.isArray(a)) return 'saf'; + if (a === null) return 'gayb'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Fâsit giren: umulan ${P(n.values[0])}` + : `Fâsit tercih: mûteberler ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Fazla büyük: ${(r = n.origin) != null ? r : 'value'}, ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elements'} sahip olmalıydı.` + : `Fazla büyük: ${(s = n.origin) != null ? s : 'value'}, ${a}${n.maximum.toString()} olmalıydı.`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Fazla küçük: ${n.origin}, ${a}${n.minimum.toString()} ${c.unit} sahip olmalıydı.` + : `Fazla küçük: ${n.origin}, ${a}${n.minimum.toString()} olmalıydı.`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Fâsit metin: "${a.prefix}" ile başlamalı.` + : a.format === 'ends_with' + ? `Fâsit metin: "${a.suffix}" ile bitmeli.` + : a.format === 'includes' + ? `Fâsit metin: "${a.includes}" ihtivâ etmeli.` + : a.format === 'regex' + ? `Fâsit metin: ${a.pattern} nakşına uymalı.` + : `Fâsit ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Fâsit sayı: ${n.divisor} katı olmalıydı.`; + case 'unrecognized_keys': + return `Tanınmayan anahtar ${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} için tanınmayan anahtar var.`; + case 'invalid_union': + return 'Giren tanınamadı.'; + case 'invalid_element': + return `${n.origin} için tanınmayan kıymet var.`; + default: + return 'Kıymet tanınamadı.'; + } + }; + }; + function Yh() { + return { localeError: Xh() }; + } + var Qh = () => { + let e = { + string: { unit: 'توکي', verb: 'ولري' }, + file: { unit: 'بایټس', verb: 'ولري' }, + array: { unit: 'توکي', verb: 'ولري' }, + set: { unit: 'توکي', verb: 'ولري' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ورودي', + email: 'بریښنالیک', + url: 'یو آر ال', + emoji: 'ایموجي', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'نیټه او وخت', + date: 'نېټه', + time: 'وخت', + duration: 'موده', + ipv4: 'د IPv4 پته', + ipv6: 'د IPv6 پته', + cidrv4: 'د IPv4 ساحه', + cidrv6: 'د IPv6 ساحه', + base64: 'base64-encoded متن', + base64url: 'base64url-encoded متن', + json_string: 'JSON متن', + e164: 'د E.164 شمېره', + jwt: 'JWT', + template_literal: 'ورودي', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ناسم ورودي: باید ${n.expected} وای, مګر ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'عدد'; + case 'object': + if (Array.isArray(a)) return 'ارې'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} ترلاسه شو`; + case 'invalid_value': + return n.values.length === 1 + ? `ناسم ورودي: باید ${P(n.values[0])} وای` + : `ناسم انتخاب: باید یو له ${_(n.values, '|')} څخه وای`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `ډیر لوی: ${(r = n.origin) != null ? r : 'ارزښت'} باید ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عنصرونه'} ولري` + : `ډیر لوی: ${(s = n.origin) != null ? s : 'ارزښت'} باید ${a}${n.maximum.toString()} وي`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `ډیر کوچنی: ${n.origin} باید ${a}${n.minimum.toString()} ${c.unit} ولري` + : `ډیر کوچنی: ${n.origin} باید ${a}${n.minimum.toString()} وي`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `ناسم متن: باید د "${a.prefix}" سره پیل شي` + : a.format === 'ends_with' + ? `ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي` + : a.format === 'includes' + ? `ناسم متن: باید "${a.includes}" ولري` + : a.format === 'regex' + ? `ناسم متن: باید د ${a.pattern} سره مطابقت ولري` + : `${(u = i[a.format]) != null ? u : n.format} ناسم دی`; + } + case 'not_multiple_of': + return `ناسم عدد: باید د ${n.divisor} مضرب وي`; + case 'unrecognized_keys': + return `ناسم ${n.keys.length > 1 ? 'کلیډونه' : 'کلیډ'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `ناسم کلیډ په ${n.origin} کې`; + case 'invalid_union': + default: + return 'ناسمه ورودي'; + case 'invalid_element': + return `ناسم عنصر په ${n.origin} کې`; + } + }; + }; + function eb() { + return { localeError: Qh() }; + } + var tb = () => { + let e = { + string: { unit: 'znaków', verb: 'mieć' }, + file: { unit: 'bajtów', verb: 'mieć' }, + array: { unit: 'elementów', verb: 'mieć' }, + set: { unit: 'elementów', verb: 'mieć' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'wyrażenie', + email: 'adres email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data i godzina w formacie ISO', + date: 'data w formacie ISO', + time: 'godzina w formacie ISO', + duration: 'czas trwania ISO', + ipv4: 'adres IPv4', + ipv6: 'adres IPv6', + cidrv4: 'zakres IPv4', + cidrv6: 'zakres IPv6', + base64: 'ciąg znaków zakodowany w formacie base64', + base64url: 'ciąg znaków zakodowany w formacie base64url', + json_string: 'ciąg znaków w formacie JSON', + e164: 'liczba E.164', + jwt: 'JWT', + template_literal: 'wejście', + }; + return (n) => { + var r, o, s, u, a, c, m; + switch (n.code) { + case 'invalid_type': + return `Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${(( + p, + ) => { + let f = typeof p; + switch (f) { + case 'number': + return Number.isNaN(p) ? 'NaN' : 'liczba'; + case 'object': + if (Array.isArray(p)) return 'tablica'; + if (p === null) return 'null'; + if ( + Object.getPrototypeOf(p) !== Object.prototype && + p.constructor + ) + return p.constructor.name; + } + return f; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Nieprawidłowe dane wejściowe: oczekiwano ${P(n.values[0])}` + : `Nieprawidłowa opcja: oczekiwano jednej z wartości ${_(n.values, '|')}`; + case 'too_big': { + let p = n.inclusive ? '<=' : '<', + f = t(n.origin); + return f + ? `Za duża wartość: oczekiwano, że ${(r = n.origin) != null ? r : 'wartość'} będzie mieć ${p}${n.maximum.toString()} ${(o = f.unit) != null ? o : 'elementów'}` + : `Zbyt duż(y/a/e): oczekiwano, że ${(s = n.origin) != null ? s : 'wartość'} będzie wynosić ${p}${n.maximum.toString()}`; + } + case 'too_small': { + let p = n.inclusive ? '>=' : '>', + f = t(n.origin); + return f + ? `Za mała wartość: oczekiwano, że ${(u = n.origin) != null ? u : 'wartość'} będzie mieć ${p}${n.minimum.toString()} ${(a = f.unit) != null ? a : 'elementów'}` + : `Zbyt mał(y/a/e): oczekiwano, że ${(c = n.origin) != null ? c : 'wartość'} będzie wynosić ${p}${n.minimum.toString()}`; + } + case 'invalid_format': { + let p = n; + return p.format === 'starts_with' + ? `Nieprawidłowy ciąg znaków: musi zaczynać się od "${p.prefix}"` + : p.format === 'ends_with' + ? `Nieprawidłowy ciąg znaków: musi kończyć się na "${p.suffix}"` + : p.format === 'includes' + ? `Nieprawidłowy ciąg znaków: musi zawierać "${p.includes}"` + : p.format === 'regex' + ? `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${p.pattern}` + : `Nieprawidłow(y/a/e) ${(m = i[p.format]) != null ? m : n.format}`; + } + case 'not_multiple_of': + return `Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`; + case 'unrecognized_keys': + return `Nierozpoznane klucze${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Nieprawidłowy klucz w ${n.origin}`; + case 'invalid_union': + default: + return 'Nieprawidłowe dane wejściowe'; + case 'invalid_element': + return `Nieprawidłowa wartość w ${n.origin}`; + } + }; + }; + function nb() { + return { localeError: tb() }; + } + var ib = () => { + let e = { + string: { unit: 'caracteres', verb: 'ter' }, + file: { unit: 'bytes', verb: 'ter' }, + array: { unit: 'itens', verb: 'ter' }, + set: { unit: 'itens', verb: 'ter' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'padrão', + email: 'endereço de e-mail', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'data e hora ISO', + date: 'data ISO', + time: 'hora ISO', + duration: 'duração ISO', + ipv4: 'endereço IPv4', + ipv6: 'endereço IPv6', + cidrv4: 'faixa de IPv4', + cidrv6: 'faixa de IPv6', + base64: 'texto codificado em base64', + base64url: 'URL codificada em base64', + json_string: 'texto JSON', + e164: 'número E.164', + jwt: 'JWT', + template_literal: 'entrada', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Tipo inválido: esperado ${n.expected}, recebido ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'número'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'nulo'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Entrada inválida: esperado ${P(n.values[0])}` + : `Opção inválida: esperada uma das ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Muito grande: esperado que ${(r = n.origin) != null ? r : 'valor'} tivesse ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementos'}` + : `Muito grande: esperado que ${(s = n.origin) != null ? s : 'valor'} fosse ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Muito pequeno: esperado que ${n.origin} tivesse ${a}${n.minimum.toString()} ${c.unit}` + : `Muito pequeno: esperado que ${n.origin} fosse ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Texto inválido: deve começar com "${a.prefix}"` + : a.format === 'ends_with' + ? `Texto inválido: deve terminar com "${a.suffix}"` + : a.format === 'includes' + ? `Texto inválido: deve incluir "${a.includes}"` + : a.format === 'regex' + ? `Texto inválido: deve corresponder ao padrão ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} inválido`; + } + case 'not_multiple_of': + return `Número inválido: deve ser múltiplo de ${n.divisor}`; + case 'unrecognized_keys': + return `Chave${n.keys.length > 1 ? 's' : ''} desconhecida${n.keys.length > 1 ? 's' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Chave inválida em ${n.origin}`; + case 'invalid_union': + return 'Entrada inválida'; + case 'invalid_element': + return `Valor inválido em ${n.origin}`; + default: + return 'Campo inválido'; + } + }; + }; + function rb() { + return { localeError: ib() }; + } + function ws(e, t, i, n) { + let r = Math.abs(e), + o = r % 10, + s = r % 100; + return s >= 11 && s <= 19 ? n : o === 1 ? t : o >= 2 && o <= 4 ? i : n; + } + var ab = () => { + let e = { + string: { + unit: { one: 'символ', few: 'символа', many: 'символов' }, + verb: 'иметь', + }, + file: { + unit: { one: 'байт', few: 'байта', many: 'байт' }, + verb: 'иметь', + }, + array: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + set: { + unit: { one: 'элемент', few: 'элемента', many: 'элементов' }, + verb: 'иметь', + }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ввод', + email: 'email адрес', + url: 'URL', + emoji: 'эмодзи', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO дата и время', + date: 'ISO дата', + time: 'ISO время', + duration: 'ISO длительность', + ipv4: 'IPv4 адрес', + ipv6: 'IPv6 адрес', + cidrv4: 'IPv4 диапазон', + cidrv6: 'IPv6 диапазон', + base64: 'строка в формате base64', + base64url: 'строка в формате base64url', + json_string: 'JSON строка', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'ввод', + }; + return (n) => { + var r, o, s; + switch (n.code) { + case 'invalid_type': + return `Неверный ввод: ожидалось ${n.expected}, получено ${((u) => { + let a = typeof u; + switch (a) { + case 'number': + return Number.isNaN(u) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(u)) return 'массив'; + if (u === null) return 'null'; + if ( + Object.getPrototypeOf(u) !== Object.prototype && + u.constructor + ) + return u.constructor.name; + } + return a; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Неверный ввод: ожидалось ${P(n.values[0])}` + : `Неверный вариант: ожидалось одно из ${_(n.values, '|')}`; + case 'too_big': { + let u = n.inclusive ? '<=' : '<', + a = t(n.origin); + if (a) { + let c = ws(Number(n.maximum), a.unit.one, a.unit.few, a.unit.many); + return `Слишком большое значение: ожидалось, что ${(r = n.origin) != null ? r : 'значение'} будет иметь ${u}${n.maximum.toString()} ${c}`; + } + return `Слишком большое значение: ожидалось, что ${(o = n.origin) != null ? o : 'значение'} будет ${u}${n.maximum.toString()}`; + } + case 'too_small': { + let u = n.inclusive ? '>=' : '>', + a = t(n.origin); + if (a) { + let c = ws(Number(n.minimum), a.unit.one, a.unit.few, a.unit.many); + return `Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${u}${n.minimum.toString()} ${c}`; + } + return `Слишком маленькое значение: ожидалось, что ${n.origin} будет ${u}${n.minimum.toString()}`; + } + case 'invalid_format': { + let u = n; + return u.format === 'starts_with' + ? `Неверная строка: должна начинаться с "${u.prefix}"` + : u.format === 'ends_with' + ? `Неверная строка: должна заканчиваться на "${u.suffix}"` + : u.format === 'includes' + ? `Неверная строка: должна содержать "${u.includes}"` + : u.format === 'regex' + ? `Неверная строка: должна соответствовать шаблону ${u.pattern}` + : `Неверный ${(s = i[u.format]) != null ? s : n.format}`; + } + case 'not_multiple_of': + return `Неверное число: должно быть кратным ${n.divisor}`; + case 'unrecognized_keys': + return `Нераспознанн${n.keys.length > 1 ? 'ые' : 'ый'} ключ${n.keys.length > 1 ? 'и' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Неверный ключ в ${n.origin}`; + case 'invalid_union': + default: + return 'Неверные входные данные'; + case 'invalid_element': + return `Неверное значение в ${n.origin}`; + } + }; + }; + function ob() { + return { localeError: ab() }; + } + var sb = () => { + let e = { + string: { unit: 'znakov', verb: 'imeti' }, + file: { unit: 'bajtov', verb: 'imeti' }, + array: { unit: 'elementov', verb: 'imeti' }, + set: { unit: 'elementov', verb: 'imeti' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'vnos', + email: 'e-poštni naslov', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO datum in čas', + date: 'ISO datum', + time: 'ISO čas', + duration: 'ISO trajanje', + ipv4: 'IPv4 naslov', + ipv6: 'IPv6 naslov', + cidrv4: 'obseg IPv4', + cidrv6: 'obseg IPv6', + base64: 'base64 kodiran niz', + base64url: 'base64url kodiran niz', + json_string: 'JSON niz', + e164: 'E.164 številka', + jwt: 'JWT', + template_literal: 'vnos', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Neveljaven vnos: pričakovano ${n.expected}, prejeto ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'število'; + case 'object': + if (Array.isArray(a)) return 'tabela'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Neveljaven vnos: pričakovano ${P(n.values[0])}` + : `Neveljavna možnost: pričakovano eno izmed ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Preveliko: pričakovano, da bo ${(r = n.origin) != null ? r : 'vrednost'} imelo ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'elementov'}` + : `Preveliko: pričakovano, da bo ${(s = n.origin) != null ? s : 'vrednost'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Premajhno: pričakovano, da bo ${n.origin} imelo ${a}${n.minimum.toString()} ${c.unit}` + : `Premajhno: pričakovano, da bo ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Neveljaven niz: mora se začeti z "${a.prefix}"` + : a.format === 'ends_with' + ? `Neveljaven niz: mora se končati z "${a.suffix}"` + : a.format === 'includes' + ? `Neveljaven niz: mora vsebovati "${a.includes}"` + : a.format === 'regex' + ? `Neveljaven niz: mora ustrezati vzorcu ${a.pattern}` + : `Neveljaven ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Neveljavno število: mora biti večkratnik ${n.divisor}`; + case 'unrecognized_keys': + return `Neprepoznan${n.keys.length > 1 ? 'i ključi' : ' ključ'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Neveljaven ključ v ${n.origin}`; + case 'invalid_union': + default: + return 'Neveljaven vnos'; + case 'invalid_element': + return `Neveljavna vrednost v ${n.origin}`; + } + }; + }; + function ub() { + return { localeError: sb() }; + } + var cb = () => { + let e = { + string: { unit: 'tecken', verb: 'att ha' }, + file: { unit: 'bytes', verb: 'att ha' }, + array: { unit: 'objekt', verb: 'att innehålla' }, + set: { unit: 'objekt', verb: 'att innehålla' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'reguljärt uttryck', + email: 'e-postadress', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO-datum och tid', + date: 'ISO-datum', + time: 'ISO-tid', + duration: 'ISO-varaktighet', + ipv4: 'IPv4-intervall', + ipv6: 'IPv6-intervall', + cidrv4: 'IPv4-spektrum', + cidrv6: 'IPv6-spektrum', + base64: 'base64-kodad sträng', + base64url: 'base64url-kodad sträng', + json_string: 'JSON-sträng', + e164: 'E.164-nummer', + jwt: 'JWT', + template_literal: 'mall-literal', + }; + return (n) => { + var r, o, s, u, a, c, m, p; + switch (n.code) { + case 'invalid_type': + return `Ogiltig inmatning: förväntat ${n.expected}, fick ${((f) => { + let h = typeof f; + switch (h) { + case 'number': + return Number.isNaN(f) ? 'NaN' : 'antal'; + case 'object': + if (Array.isArray(f)) return 'lista'; + if (f === null) return 'null'; + if ( + Object.getPrototypeOf(f) !== Object.prototype && + f.constructor + ) + return f.constructor.name; + } + return h; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ogiltig inmatning: förväntat ${P(n.values[0])}` + : `Ogiltigt val: förväntade en av ${_(n.values, '|')}`; + case 'too_big': { + let f = n.inclusive ? '<=' : '<', + h = t(n.origin); + return h + ? `För stor(t): förväntade ${(r = n.origin) != null ? r : 'värdet'} att ha ${f}${n.maximum.toString()} ${(o = h.unit) != null ? o : 'element'}` + : `För stor(t): förväntat ${(s = n.origin) != null ? s : 'värdet'} att ha ${f}${n.maximum.toString()}`; + } + case 'too_small': { + let f = n.inclusive ? '>=' : '>', + h = t(n.origin); + return h + ? `För lite(t): förväntade ${(u = n.origin) != null ? u : 'värdet'} att ha ${f}${n.minimum.toString()} ${h.unit}` + : `För lite(t): förväntade ${(a = n.origin) != null ? a : 'värdet'} att ha ${f}${n.minimum.toString()}`; + } + case 'invalid_format': { + let f = n; + return f.format === 'starts_with' + ? `Ogiltig sträng: måste börja med "${f.prefix}"` + : f.format === 'ends_with' + ? `Ogiltig sträng: måste sluta med "${f.suffix}"` + : f.format === 'includes' + ? `Ogiltig sträng: måste innehålla "${f.includes}"` + : f.format === 'regex' + ? `Ogiltig sträng: måste matcha mönstret "${f.pattern}"` + : `Ogiltig(t) ${(c = i[f.format]) != null ? c : n.format}`; + } + case 'not_multiple_of': + return `Ogiltigt tal: måste vara en multipel av ${n.divisor}`; + case 'unrecognized_keys': + return `${n.keys.length > 1 ? 'Okända nycklar' : 'Okänd nyckel'}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Ogiltig nyckel i ${(m = n.origin) != null ? m : 'värdet'}`; + case 'invalid_union': + default: + return 'Ogiltig input'; + case 'invalid_element': + return `Ogiltigt värde i ${(p = n.origin) != null ? p : 'värdet'}`; + } + }; + }; + function lb() { + return { localeError: cb() }; + } + var db = () => { + let e = { + string: { unit: 'எழுத்துக்கள்', verb: 'கொண்டிருக்க வேண்டும்' }, + file: { unit: 'பைட்டுகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + array: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + set: { unit: 'உறுப்புகள்', verb: 'கொண்டிருக்க வேண்டும்' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'உள்ளீடு', + email: 'மின்னஞ்சல் முகவரி', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO தேதி நேரம்', + date: 'ISO தேதி', + time: 'ISO நேரம்', + duration: 'ISO கால அளவு', + ipv4: 'IPv4 முகவரி', + ipv6: 'IPv6 முகவரி', + cidrv4: 'IPv4 வரம்பு', + cidrv6: 'IPv6 வரம்பு', + base64: 'base64-encoded சரம்', + base64url: 'base64url-encoded சரம்', + json_string: 'JSON சரம்', + e164: 'E.164 எண்', + jwt: 'JWT', + template_literal: 'input', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'எண் அல்லாதது' : 'எண்'; + case 'object': + if (Array.isArray(a)) return 'அணி'; + if (a === null) return 'வெறுமை'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${P(n.values[0])}` + : `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${_(n.values, '|')} இல் ஒன்று`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${(r = n.origin) != null ? r : 'மதிப்பு'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'உறுப்புகள்'} ஆக இருக்க வேண்டும்` + : `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${(s = n.origin) != null ? s : 'மதிப்பு'} ${a}${n.maximum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${a}${n.minimum.toString()} ${c.unit} ஆக இருக்க வேண்டும்` + : `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${a}${n.minimum.toString()} ஆக இருக்க வேண்டும்`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்` + : a.format === 'ends_with' + ? `தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்` + : a.format === 'includes' + ? `தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்` + : a.format === 'regex' + ? `தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்` + : `தவறான ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`; + case 'unrecognized_keys': + return `அடையாளம் தெரியாத விசை${n.keys.length > 1 ? 'கள்' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} இல் தவறான விசை`; + case 'invalid_union': + default: + return 'தவறான உள்ளீடு'; + case 'invalid_element': + return `${n.origin} இல் தவறான மதிப்பு`; + } + }; + }; + function mb() { + return { localeError: db() }; + } + var pb = () => { + let e = { + string: { unit: 'ตัวอักษร', verb: 'ควรมี' }, + file: { unit: 'ไบต์', verb: 'ควรมี' }, + array: { unit: 'รายการ', verb: 'ควรมี' }, + set: { unit: 'รายการ', verb: 'ควรมี' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ข้อมูลที่ป้อน', + email: 'ที่อยู่อีเมล', + url: 'URL', + emoji: 'อิโมจิ', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'วันที่เวลาแบบ ISO', + date: 'วันที่แบบ ISO', + time: 'เวลาแบบ ISO', + duration: 'ช่วงเวลาแบบ ISO', + ipv4: 'ที่อยู่ IPv4', + ipv6: 'ที่อยู่ IPv6', + cidrv4: 'ช่วง IP แบบ IPv4', + cidrv6: 'ช่วง IP แบบ IPv6', + base64: 'ข้อความแบบ Base64', + base64url: 'ข้อความแบบ Base64 สำหรับ URL', + json_string: 'ข้อความแบบ JSON', + e164: 'เบอร์โทรศัพท์ระหว่างประเทศ (E.164)', + jwt: 'โทเคน JWT', + template_literal: 'ข้อมูลที่ป้อน', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'ไม่ใช่ตัวเลข (NaN)' : 'ตัวเลข'; + case 'object': + if (Array.isArray(a)) return 'อาร์เรย์ (Array)'; + if (a === null) return 'ไม่มีค่า (null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `ค่าไม่ถูกต้อง: ควรเป็น ${P(n.values[0])}` + : `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? 'ไม่เกิน' : 'น้อยกว่า', + c = t(n.origin); + return c + ? `เกินกำหนด: ${(r = n.origin) != null ? r : 'ค่า'} ควรมี${a} ${n.maximum.toString()} ${(o = c.unit) != null ? o : 'รายการ'}` + : `เกินกำหนด: ${(s = n.origin) != null ? s : 'ค่า'} ควรมี${a} ${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? 'อย่างน้อย' : 'มากกว่า', + c = t(n.origin); + return c + ? `น้อยกว่ากำหนด: ${n.origin} ควรมี${a} ${n.minimum.toString()} ${c.unit}` + : `น้อยกว่ากำหนด: ${n.origin} ควรมี${a} ${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"` + : a.format === 'ends_with' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"` + : a.format === 'includes' + ? `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ` + : a.format === 'regex' + ? `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}` + : `รูปแบบไม่ถูกต้อง: ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`; + case 'unrecognized_keys': + return `พบคีย์ที่ไม่รู้จัก: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `คีย์ไม่ถูกต้องใน ${n.origin}`; + case 'invalid_union': + return 'ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้'; + case 'invalid_element': + return `ข้อมูลไม่ถูกต้องใน ${n.origin}`; + default: + return 'ข้อมูลไม่ถูกต้อง'; + } + }; + }; + function fb() { + return { localeError: pb() }; + } + var vb = () => { + let e = { + string: { unit: 'karakter', verb: 'olmalı' }, + file: { unit: 'bayt', verb: 'olmalı' }, + array: { unit: 'öğe', verb: 'olmalı' }, + set: { unit: 'öğe', verb: 'olmalı' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'girdi', + email: 'e-posta adresi', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO tarih ve saat', + date: 'ISO tarih', + time: 'ISO saat', + duration: 'ISO süre', + ipv4: 'IPv4 adresi', + ipv6: 'IPv6 adresi', + cidrv4: 'IPv4 aralığı', + cidrv6: 'IPv6 aralığı', + base64: 'base64 ile şifrelenmiş metin', + base64url: 'base64url ile şifrelenmiş metin', + json_string: 'JSON dizesi', + e164: 'E.164 sayısı', + jwt: 'JWT', + template_literal: 'Şablon dizesi', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Geçersiz değer: beklenen ${n.expected}, alınan ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Geçersiz değer: beklenen ${P(n.values[0])}` + : `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Çok büyük: beklenen ${(r = n.origin) != null ? r : 'değer'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'öğe'}` + : `Çok büyük: beklenen ${(s = n.origin) != null ? s : 'değer'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Çok küçük: beklenen ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `Çok küçük: beklenen ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Geçersiz metin: "${a.prefix}" ile başlamalı` + : a.format === 'ends_with' + ? `Geçersiz metin: "${a.suffix}" ile bitmeli` + : a.format === 'includes' + ? `Geçersiz metin: "${a.includes}" içermeli` + : a.format === 'regex' + ? `Geçersiz metin: ${a.pattern} desenine uymalı` + : `Geçersiz ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`; + case 'unrecognized_keys': + return `Tanınmayan anahtar${n.keys.length > 1 ? 'lar' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} içinde geçersiz anahtar`; + case 'invalid_union': + default: + return 'Geçersiz değer'; + case 'invalid_element': + return `${n.origin} içinde geçersiz değer`; + } + }; + }; + function gb() { + return { localeError: vb() }; + } + var hb = () => { + let e = { + string: { unit: 'символів', verb: 'матиме' }, + file: { unit: 'байтів', verb: 'матиме' }, + array: { unit: 'елементів', verb: 'матиме' }, + set: { unit: 'елементів', verb: 'матиме' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'вхідні дані', + email: 'адреса електронної пошти', + url: 'URL', + emoji: 'емодзі', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'дата та час ISO', + date: 'дата ISO', + time: 'час ISO', + duration: 'тривалість ISO', + ipv4: 'адреса IPv4', + ipv6: 'адреса IPv6', + cidrv4: 'діапазон IPv4', + cidrv6: 'діапазон IPv6', + base64: 'рядок у кодуванні base64', + base64url: 'рядок у кодуванні base64url', + json_string: 'рядок JSON', + e164: 'номер E.164', + jwt: 'JWT', + template_literal: 'вхідні дані', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Неправильні вхідні дані: очікується ${n.expected}, отримано ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'число'; + case 'object': + if (Array.isArray(a)) return 'масив'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Неправильні вхідні дані: очікується ${P(n.values[0])}` + : `Неправильна опція: очікується одне з ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Занадто велике: очікується, що ${(r = n.origin) != null ? r : 'значення'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'елементів'}` + : `Занадто велике: очікується, що ${(s = n.origin) != null ? s : 'значення'} буде ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Занадто мале: очікується, що ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Занадто мале: очікується, що ${n.origin} буде ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Неправильний рядок: повинен починатися з "${a.prefix}"` + : a.format === 'ends_with' + ? `Неправильний рядок: повинен закінчуватися на "${a.suffix}"` + : a.format === 'includes' + ? `Неправильний рядок: повинен містити "${a.includes}"` + : a.format === 'regex' + ? `Неправильний рядок: повинен відповідати шаблону ${a.pattern}` + : `Неправильний ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `Неправильне число: повинно бути кратним ${n.divisor}`; + case 'unrecognized_keys': + return `Нерозпізнаний ключ${n.keys.length > 1 ? 'і' : ''}: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Неправильний ключ у ${n.origin}`; + case 'invalid_union': + default: + return 'Неправильні вхідні дані'; + case 'invalid_element': + return `Неправильне значення у ${n.origin}`; + } + }; + }; + function il() { + return { localeError: hb() }; + } + function bb() { + return il(); + } + var yb = () => { + let e = { + string: { unit: 'حروف', verb: 'ہونا' }, + file: { unit: 'بائٹس', verb: 'ہونا' }, + array: { unit: 'آئٹمز', verb: 'ہونا' }, + set: { unit: 'آئٹمز', verb: 'ہونا' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ان پٹ', + email: 'ای میل ایڈریس', + url: 'یو آر ایل', + emoji: 'ایموجی', + uuid: 'یو یو آئی ڈی', + uuidv4: 'یو یو آئی ڈی وی 4', + uuidv6: 'یو یو آئی ڈی وی 6', + nanoid: 'نینو آئی ڈی', + guid: 'جی یو آئی ڈی', + cuid: 'سی یو آئی ڈی', + cuid2: 'سی یو آئی ڈی 2', + ulid: 'یو ایل آئی ڈی', + xid: 'ایکس آئی ڈی', + ksuid: 'کے ایس یو آئی ڈی', + datetime: 'آئی ایس او ڈیٹ ٹائم', + date: 'آئی ایس او تاریخ', + time: 'آئی ایس او وقت', + duration: 'آئی ایس او مدت', + ipv4: 'آئی پی وی 4 ایڈریس', + ipv6: 'آئی پی وی 6 ایڈریس', + cidrv4: 'آئی پی وی 4 رینج', + cidrv6: 'آئی پی وی 6 رینج', + base64: 'بیس 64 ان کوڈڈ سٹرنگ', + base64url: 'بیس 64 یو آر ایل ان کوڈڈ سٹرنگ', + json_string: 'جے ایس او این سٹرنگ', + e164: 'ای 164 نمبر', + jwt: 'جے ڈبلیو ٹی', + template_literal: 'ان پٹ', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `غلط ان پٹ: ${n.expected} متوقع تھا، ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'نمبر'; + case 'object': + if (Array.isArray(a)) return 'آرے'; + if (a === null) return 'نل'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)} موصول ہوا`; + case 'invalid_value': + return n.values.length === 1 + ? `غلط ان پٹ: ${P(n.values[0])} متوقع تھا` + : `غلط آپشن: ${_(n.values, '|')} میں سے ایک متوقع تھا`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `بہت بڑا: ${(r = n.origin) != null ? r : 'ویلیو'} کے ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'عناصر'} ہونے متوقع تھے` + : `بہت بڑا: ${(s = n.origin) != null ? s : 'ویلیو'} کا ${a}${n.maximum.toString()} ہونا متوقع تھا`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `بہت چھوٹا: ${n.origin} کے ${a}${n.minimum.toString()} ${c.unit} ہونے متوقع تھے` + : `بہت چھوٹا: ${n.origin} کا ${a}${n.minimum.toString()} ہونا متوقع تھا`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے` + : a.format === 'ends_with' + ? `غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے` + : a.format === 'includes' + ? `غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے` + : a.format === 'regex' + ? `غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے` + : `غلط ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`; + case 'unrecognized_keys': + return `غیر تسلیم شدہ کی${n.keys.length > 1 ? 'ز' : ''}: ${_(n.keys, '، ')}`; + case 'invalid_key': + return `${n.origin} میں غلط کی`; + case 'invalid_union': + default: + return 'غلط ان پٹ'; + case 'invalid_element': + return `${n.origin} میں غلط ویلیو`; + } + }; + }; + function _b() { + return { localeError: yb() }; + } + var $b = () => { + let e = { + string: { unit: 'ký tự', verb: 'có' }, + file: { unit: 'byte', verb: 'có' }, + array: { unit: 'phần tử', verb: 'có' }, + set: { unit: 'phần tử', verb: 'có' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'đầu vào', + email: 'địa chỉ email', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ngày giờ ISO', + date: 'ngày ISO', + time: 'giờ ISO', + duration: 'khoảng thời gian ISO', + ipv4: 'địa chỉ IPv4', + ipv6: 'địa chỉ IPv6', + cidrv4: 'dải IPv4', + cidrv6: 'dải IPv6', + base64: 'chuỗi mã hóa base64', + base64url: 'chuỗi mã hóa base64url', + json_string: 'chuỗi JSON', + e164: 'số E.164', + jwt: 'JWT', + template_literal: 'đầu vào', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${(( + a, + ) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'số'; + case 'object': + if (Array.isArray(a)) return 'mảng'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Đầu vào không hợp lệ: mong đợi ${P(n.values[0])}` + : `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `Quá lớn: mong đợi ${(r = n.origin) != null ? r : 'giá trị'} ${c.verb} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : 'phần tử'}` + : `Quá lớn: mong đợi ${(s = n.origin) != null ? s : 'giá trị'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `Quá nhỏ: mong đợi ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}` + : `Quá nhỏ: mong đợi ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"` + : a.format === 'ends_with' + ? `Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"` + : a.format === 'includes' + ? `Chuỗi không hợp lệ: phải bao gồm "${a.includes}"` + : a.format === 'regex' + ? `Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}` + : `${(u = i[a.format]) != null ? u : n.format} không hợp lệ`; + } + case 'not_multiple_of': + return `Số không hợp lệ: phải là bội số của ${n.divisor}`; + case 'unrecognized_keys': + return `Khóa không được nhận dạng: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Khóa không hợp lệ trong ${n.origin}`; + case 'invalid_union': + default: + return 'Đầu vào không hợp lệ'; + case 'invalid_element': + return `Giá trị không hợp lệ trong ${n.origin}`; + } + }; + }; + function kb() { + return { localeError: $b() }; + } + var wb = () => { + let e = { + string: { unit: '字符', verb: '包含' }, + file: { unit: '字节', verb: '包含' }, + array: { unit: '项', verb: '包含' }, + set: { unit: '项', verb: '包含' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '输入', + email: '电子邮件', + url: 'URL', + emoji: '表情符号', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO日期时间', + date: 'ISO日期', + time: 'ISO时间', + duration: 'ISO时长', + ipv4: 'IPv4地址', + ipv6: 'IPv6地址', + cidrv4: 'IPv4网段', + cidrv6: 'IPv6网段', + base64: 'base64编码字符串', + base64url: 'base64url编码字符串', + json_string: 'JSON字符串', + e164: 'E.164号码', + jwt: 'JWT', + template_literal: '输入', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `无效输入:期望 ${n.expected},实际接收 ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? '非数字(NaN)' : '数字'; + case 'object': + if (Array.isArray(a)) return '数组'; + if (a === null) return '空值(null)'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `无效输入:期望 ${P(n.values[0])}` + : `无效选项:期望以下之一 ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `数值过大:期望 ${(r = n.origin) != null ? r : '值'} ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : '个元素'}` + : `数值过大:期望 ${(s = n.origin) != null ? s : '值'} ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `数值过小:期望 ${n.origin} ${a}${n.minimum.toString()} ${c.unit}` + : `数值过小:期望 ${n.origin} ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `无效字符串:必须以 "${a.prefix}" 开头` + : a.format === 'ends_with' + ? `无效字符串:必须以 "${a.suffix}" 结尾` + : a.format === 'includes' + ? `无效字符串:必须包含 "${a.includes}"` + : a.format === 'regex' + ? `无效字符串:必须满足正则表达式 ${a.pattern}` + : `无效${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `无效数字:必须是 ${n.divisor} 的倍数`; + case 'unrecognized_keys': + return `出现未知的键(key): ${_(n.keys, ', ')}`; + case 'invalid_key': + return `${n.origin} 中的键(key)无效`; + case 'invalid_union': + default: + return '无效输入'; + case 'invalid_element': + return `${n.origin} 中包含无效值(value)`; + } + }; + }; + function Sb() { + return { localeError: wb() }; + } + var xb = () => { + let e = { + string: { unit: '字元', verb: '擁有' }, + file: { unit: '位元組', verb: '擁有' }, + array: { unit: '項目', verb: '擁有' }, + set: { unit: '項目', verb: '擁有' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: '輸入', + email: '郵件地址', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'ISO 日期時間', + date: 'ISO 日期', + time: 'ISO 時間', + duration: 'ISO 期間', + ipv4: 'IPv4 位址', + ipv6: 'IPv6 位址', + cidrv4: 'IPv4 範圍', + cidrv6: 'IPv6 範圍', + base64: 'base64 編碼字串', + base64url: 'base64url 編碼字串', + json_string: 'JSON 字串', + e164: 'E.164 數值', + jwt: 'JWT', + template_literal: '輸入', + }; + return (n) => { + var r, o, s, u; + switch (n.code) { + case 'invalid_type': + return `無效的輸入值:預期為 ${n.expected},但收到 ${((a) => { + let c = typeof a; + switch (c) { + case 'number': + return Number.isNaN(a) ? 'NaN' : 'number'; + case 'object': + if (Array.isArray(a)) return 'array'; + if (a === null) return 'null'; + if ( + Object.getPrototypeOf(a) !== Object.prototype && + a.constructor + ) + return a.constructor.name; + } + return c; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `無效的輸入值:預期為 ${P(n.values[0])}` + : `無效的選項:預期為以下其中之一 ${_(n.values, '|')}`; + case 'too_big': { + let a = n.inclusive ? '<=' : '<', + c = t(n.origin); + return c + ? `數值過大:預期 ${(r = n.origin) != null ? r : '值'} 應為 ${a}${n.maximum.toString()} ${(o = c.unit) != null ? o : '個元素'}` + : `數值過大:預期 ${(s = n.origin) != null ? s : '值'} 應為 ${a}${n.maximum.toString()}`; + } + case 'too_small': { + let a = n.inclusive ? '>=' : '>', + c = t(n.origin); + return c + ? `數值過小:預期 ${n.origin} 應為 ${a}${n.minimum.toString()} ${c.unit}` + : `數值過小:預期 ${n.origin} 應為 ${a}${n.minimum.toString()}`; + } + case 'invalid_format': { + let a = n; + return a.format === 'starts_with' + ? `無效的字串:必須以 "${a.prefix}" 開頭` + : a.format === 'ends_with' + ? `無效的字串:必須以 "${a.suffix}" 結尾` + : a.format === 'includes' + ? `無效的字串:必須包含 "${a.includes}"` + : a.format === 'regex' + ? `無效的字串:必須符合格式 ${a.pattern}` + : `無效的 ${(u = i[a.format]) != null ? u : n.format}`; + } + case 'not_multiple_of': + return `無效的數字:必須為 ${n.divisor} 的倍數`; + case 'unrecognized_keys': + return `無法識別的鍵值${n.keys.length > 1 ? '們' : ''}:${_(n.keys, '、')}`; + case 'invalid_key': + return `${n.origin} 中有無效的鍵值`; + case 'invalid_union': + default: + return '無效的輸入值'; + case 'invalid_element': + return `${n.origin} 中有無效的值`; + } + }; + }; + function Ib() { + return { localeError: xb() }; + } + var jb = () => { + let e = { + string: { unit: 'àmi', verb: 'ní' }, + file: { unit: 'bytes', verb: 'ní' }, + array: { unit: 'nkan', verb: 'ní' }, + set: { unit: 'nkan', verb: 'ní' }, + }; + function t(n) { + var r; + return (r = e[n]) != null ? r : null; + } + let i = { + regex: 'ẹ̀rọ ìbáwọlé', + email: 'àdírẹ́sì ìmẹ́lì', + url: 'URL', + emoji: 'emoji', + uuid: 'UUID', + uuidv4: 'UUIDv4', + uuidv6: 'UUIDv6', + nanoid: 'nanoid', + guid: 'GUID', + cuid: 'cuid', + cuid2: 'cuid2', + ulid: 'ULID', + xid: 'XID', + ksuid: 'KSUID', + datetime: 'àkókò ISO', + date: 'ọjọ́ ISO', + time: 'àkókò ISO', + duration: 'àkókò tó pé ISO', + ipv4: 'àdírẹ́sì IPv4', + ipv6: 'àdírẹ́sì IPv6', + cidrv4: 'àgbègbè IPv4', + cidrv6: 'àgbègbè IPv6', + base64: 'ọ̀rọ̀ tí a kọ́ ní base64', + base64url: 'ọ̀rọ̀ base64url', + json_string: 'ọ̀rọ̀ JSON', + e164: 'nọ́mbà E.164', + jwt: 'JWT', + template_literal: 'ẹ̀rọ ìbáwọlé', + }; + return (n) => { + var r, o; + switch (n.code) { + case 'invalid_type': + return `Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${(( + s, + ) => { + let u = typeof s; + switch (u) { + case 'number': + return Number.isNaN(s) ? 'NaN' : 'nọ́mbà'; + case 'object': + if (Array.isArray(s)) return 'akopọ'; + if (s === null) return 'null'; + if ( + Object.getPrototypeOf(s) !== Object.prototype && + s.constructor + ) + return s.constructor.name; + } + return u; + })(n.input)}`; + case 'invalid_value': + return n.values.length === 1 + ? `Ìbáwọlé aṣìṣe: a ní láti fi ${P(n.values[0])}` + : `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${_(n.values, '|')}`; + case 'too_big': { + let s = n.inclusive ? '<=' : '<', + u = t(n.origin); + return u + ? `Tó pọ̀ jù: a ní láti jẹ́ pé ${(r = n.origin) != null ? r : 'iye'} ${u.verb} ${s}${n.maximum} ${u.unit}` + : `Tó pọ̀ jù: a ní láti jẹ́ ${s}${n.maximum}`; + } + case 'too_small': { + let s = n.inclusive ? '>=' : '>', + u = t(n.origin); + return u + ? `Kéré ju: a ní láti jẹ́ pé ${n.origin} ${u.verb} ${s}${n.minimum} ${u.unit}` + : `Kéré ju: a ní láti jẹ́ ${s}${n.minimum}`; + } + case 'invalid_format': { + let s = n; + return s.format === 'starts_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${s.prefix}"` + : s.format === 'ends_with' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${s.suffix}"` + : s.format === 'includes' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${s.includes}"` + : s.format === 'regex' + ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${s.pattern}` + : `Aṣìṣe: ${(o = i[s.format]) != null ? o : n.format}`; + } + case 'not_multiple_of': + return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`; + case 'unrecognized_keys': + return `Bọtìnì àìmọ̀: ${_(n.keys, ', ')}`; + case 'invalid_key': + return `Bọtìnì aṣìṣe nínú ${n.origin}`; + case 'invalid_union': + default: + return 'Ìbáwọlé aṣìṣe'; + case 'invalid_element': + return `Iye aṣìṣe nínú ${n.origin}`; + } + }; + }; + function Ob() { + return { localeError: jb() }; + } + var rl = Symbol('ZodOutput'), + al = Symbol('ZodInput'), + Zr = class { + constructor() { + ((this._map = new WeakMap()), (this._idmap = new Map())); + } + add(e, ...t) { + let i = t[0]; + if ((this._map.set(e, i), i && typeof i == 'object' && 'id' in i)) { + if (this._idmap.has(i.id)) + throw new Error(`ID ${i.id} already exists in the registry`); + this._idmap.set(i.id, e); + } + return this; + } + clear() { + return ((this._map = new WeakMap()), (this._idmap = new Map()), this); + } + remove(e) { + let t = this._map.get(e); + return ( + t && typeof t == 'object' && 'id' in t && this._idmap.delete(t.id), + this._map.delete(e), + this + ); + } + get(e) { + var t; + let i = e._zod.parent; + if (i) { + let n = { ...((t = this.get(i)) != null ? t : {}) }; + delete n.id; + let r = { ...n, ...this._map.get(e) }; + return Object.keys(r).length ? r : void 0; + } + return this._map.get(e); + } + has(e) { + return this._map.has(e); + } + }; + function Rr() { + return new Zr(); + } + var ft = Rr(); + function ol(e, t) { + return new e({ type: 'string', ...$(t) }); + } + function sl(e, t) { + return new e({ type: 'string', coerce: !0, ...$(t) }); + } + function Lr(e, t) { + return new e({ + type: 'string', + format: 'email', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function ni(e, t) { + return new e({ + type: 'string', + format: 'guid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Jr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Mr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v4', + ...$(t), + }); + } + function Vr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v6', + ...$(t), + }); + } + function Fr(e, t) { + return new e({ + type: 'string', + format: 'uuid', + check: 'string_format', + abort: !1, + version: 'v7', + ...$(t), + }); + } + function di(e, t) { + return new e({ + type: 'string', + format: 'url', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Wr(e, t) { + return new e({ + type: 'string', + format: 'emoji', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function qr(e, t) { + return new e({ + type: 'string', + format: 'nanoid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Br(e, t) { + return new e({ + type: 'string', + format: 'cuid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Gr(e, t) { + return new e({ + type: 'string', + format: 'cuid2', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Kr(e, t) { + return new e({ + type: 'string', + format: 'ulid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Hr(e, t) { + return new e({ + type: 'string', + format: 'xid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Xr(e, t) { + return new e({ + type: 'string', + format: 'ksuid', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Yr(e, t) { + return new e({ + type: 'string', + format: 'ipv4', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function Qr(e, t) { + return new e({ + type: 'string', + format: 'ipv6', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function ea(e, t) { + return new e({ + type: 'string', + format: 'cidrv4', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function ta(e, t) { + return new e({ + type: 'string', + format: 'cidrv6', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function na(e, t) { + return new e({ + type: 'string', + format: 'base64', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function ia(e, t) { + return new e({ + type: 'string', + format: 'base64url', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function ra(e, t) { + return new e({ + type: 'string', + format: 'e164', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + function aa(e, t) { + return new e({ + type: 'string', + format: 'jwt', + check: 'string_format', + abort: !1, + ...$(t), + }); + } + var ul = { Any: null, Minute: -1, Second: 0, Millisecond: 3, Microsecond: 6 }; + function cl(e, t) { + return new e({ + type: 'string', + format: 'datetime', + check: 'string_format', + offset: !1, + local: !1, + precision: null, + ...$(t), + }); + } + function ll(e, t) { + return new e({ + type: 'string', + format: 'date', + check: 'string_format', + ...$(t), + }); + } + function dl(e, t) { + return new e({ + type: 'string', + format: 'time', + check: 'string_format', + precision: null, + ...$(t), + }); + } + function ml(e, t) { + return new e({ + type: 'string', + format: 'duration', + check: 'string_format', + ...$(t), + }); + } + function pl(e, t) { + return new e({ type: 'number', checks: [], ...$(t) }); + } + function fl(e, t) { + return new e({ type: 'number', coerce: !0, checks: [], ...$(t) }); + } + function vl(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'safeint', + ...$(t), + }); + } + function gl(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float32', + ...$(t), + }); + } + function hl(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'float64', + ...$(t), + }); + } + function bl(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'int32', + ...$(t), + }); + } + function yl(e, t) { + return new e({ + type: 'number', + check: 'number_format', + abort: !1, + format: 'uint32', + ...$(t), + }); + } + function _l(e, t) { + return new e({ type: 'boolean', ...$(t) }); + } + function $l(e, t) { + return new e({ type: 'boolean', coerce: !0, ...$(t) }); + } + function kl(e, t) { + return new e({ type: 'bigint', ...$(t) }); + } + function wl(e, t) { + return new e({ type: 'bigint', coerce: !0, ...$(t) }); + } + function Sl(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'int64', + ...$(t), + }); + } + function xl(e, t) { + return new e({ + type: 'bigint', + check: 'bigint_format', + abort: !1, + format: 'uint64', + ...$(t), + }); + } + function Il(e, t) { + return new e({ type: 'symbol', ...$(t) }); + } + function jl(e, t) { + return new e({ type: 'undefined', ...$(t) }); + } + function Ol(e, t) { + return new e({ type: 'null', ...$(t) }); + } + function zl(e) { + return new e({ type: 'any' }); + } + function Nl(e) { + return new e({ type: 'unknown' }); + } + function Ul(e, t) { + return new e({ type: 'never', ...$(t) }); + } + function Pl(e, t) { + return new e({ type: 'void', ...$(t) }); + } + function El(e, t) { + return new e({ type: 'date', ...$(t) }); + } + function Dl(e, t) { + return new e({ type: 'date', coerce: !0, ...$(t) }); + } + function Tl(e, t) { + return new e({ type: 'nan', ...$(t) }); + } + function bt(e, t) { + return new Or({ check: 'less_than', ...$(t), value: e, inclusive: !1 }); + } + function _e(e, t) { + return new Or({ check: 'less_than', ...$(t), value: e, inclusive: !0 }); + } + function yt(e, t) { + return new zr({ check: 'greater_than', ...$(t), value: e, inclusive: !1 }); + } + function se(e, t) { + return new zr({ check: 'greater_than', ...$(t), value: e, inclusive: !0 }); + } + function Cl(e) { + return yt(0, e); + } + function Al(e) { + return bt(0, e); + } + function Zl(e) { + return _e(0, e); + } + function Rl(e) { + return se(0, e); + } + function sn(e, t) { + return new Su({ check: 'multiple_of', ...$(t), value: e }); + } + function mi(e, t) { + return new ju({ check: 'max_size', ...$(t), maximum: e }); + } + function un(e, t) { + return new Ou({ check: 'min_size', ...$(t), minimum: e }); + } + function oa(e, t) { + return new zu({ check: 'size_equals', ...$(t), size: e }); + } + function pi(e, t) { + return new Nu({ check: 'max_length', ...$(t), maximum: e }); + } + function Lt(e, t) { + return new Uu({ check: 'min_length', ...$(t), minimum: e }); + } + function fi(e, t) { + return new Pu({ check: 'length_equals', ...$(t), length: e }); + } + function sa(e, t) { + return new Eu({ + check: 'string_format', + format: 'regex', + ...$(t), + pattern: e, + }); + } + function ua(e) { + return new Du({ check: 'string_format', format: 'lowercase', ...$(e) }); + } + function ca(e) { + return new Tu({ check: 'string_format', format: 'uppercase', ...$(e) }); + } + function la(e, t) { + return new Cu({ + check: 'string_format', + format: 'includes', + ...$(t), + includes: e, + }); + } + function da(e, t) { + return new Au({ + check: 'string_format', + format: 'starts_with', + ...$(t), + prefix: e, + }); + } + function ma(e, t) { + return new Zu({ + check: 'string_format', + format: 'ends_with', + ...$(t), + suffix: e, + }); + } + function Ll(e, t, i) { + return new Ru({ check: 'property', property: e, schema: t, ...$(i) }); + } + function pa(e, t) { + return new Lu({ check: 'mime_type', mime: e, ...$(t) }); + } + function kt(e) { + return new Ju({ check: 'overwrite', tx: e }); + } + function fa(e) { + return kt((t) => t.normalize(e)); + } + function va() { + return kt((e) => e.trim()); + } + function ga() { + return kt((e) => e.toLowerCase()); + } + function ha() { + return kt((e) => e.toUpperCase()); + } + function Jl(e, t, i) { + return new e({ type: 'array', element: t, ...$(i) }); + } + function zb(e, t, i) { + return new e({ type: 'union', options: t, ...$(i) }); + } + function Nb(e, t, i, n) { + return new e({ type: 'union', options: i, discriminator: t, ...$(n) }); + } + function Ub(e, t, i) { + return new e({ type: 'intersection', left: t, right: i }); + } + function Pb(e, t, i, n) { + let r = i instanceof T; + return new e({ + type: 'tuple', + items: t, + rest: r ? i : null, + ...$(r ? n : i), + }); + } + function Eb(e, t, i, n) { + return new e({ type: 'record', keyType: t, valueType: i, ...$(n) }); + } + function Db(e, t, i, n) { + return new e({ type: 'map', keyType: t, valueType: i, ...$(n) }); + } + function Tb(e, t, i) { + return new e({ type: 'set', valueType: t, ...$(i) }); + } + function Cb(e, t, i) { + return new e({ + type: 'enum', + entries: Array.isArray(t) ? Object.fromEntries(t.map((n) => [n, n])) : t, + ...$(i), + }); + } + function Ab(e, t, i) { + return new e({ type: 'enum', entries: t, ...$(i) }); + } + function Zb(e, t, i) { + return new e({ + type: 'literal', + values: Array.isArray(t) ? t : [t], + ...$(i), + }); + } + function Ml(e, t) { + return new e({ type: 'file', ...$(t) }); + } + function Rb(e, t) { + return new e({ type: 'transform', transform: t }); + } + function Lb(e, t) { + return new e({ type: 'optional', innerType: t }); + } + function Jb(e, t) { + return new e({ type: 'nullable', innerType: t }); + } + function Mb(e, t, i) { + return new e({ + type: 'default', + innerType: t, + get defaultValue() { + return typeof i == 'function' ? i() : Ps(i); + }, + }); + } + function Vb(e, t, i) { + return new e({ type: 'nonoptional', innerType: t, ...$(i) }); + } + function Fb(e, t) { + return new e({ type: 'success', innerType: t }); + } + function Wb(e, t, i) { + return new e({ + type: 'catch', + innerType: t, + catchValue: typeof i == 'function' ? i : () => i, + }); + } + function qb(e, t, i) { + return new e({ type: 'pipe', in: t, out: i }); + } + function Bb(e, t) { + return new e({ type: 'readonly', innerType: t }); + } + function Gb(e, t, i) { + return new e({ type: 'template_literal', parts: t, ...$(i) }); + } + function Kb(e, t) { + return new e({ type: 'lazy', getter: t }); + } + function Hb(e, t) { + return new e({ type: 'promise', innerType: t }); + } + function Vl(e, t, i) { + let n = $(i); + return ( + n.abort != null || (n.abort = !0), + new e({ type: 'custom', check: 'custom', fn: t, ...n }) + ); + } + function Fl(e, t, i) { + return new e({ type: 'custom', check: 'custom', fn: t, ...$(i) }); + } + function Wl(e) { + let t = ql( + (i) => ( + (i.addIssue = (n) => { + if (typeof n == 'string') i.issues.push(ei(n, i.value, t._zod.def)); + else { + let r = n; + (r.fatal && (r.continue = !1), + r.code != null || (r.code = 'custom'), + r.input != null || (r.input = i.value), + r.inst != null || (r.inst = t), + r.continue != null || (r.continue = !t._zod.def.abort), + i.issues.push(ei(r))); + } + }), + e(i.value, i) + ), + ); + return t; + } + function ql(e, t) { + let i = new q({ check: 'custom', ...$(t) }); + return ((i._zod.check = e), i); + } + function Bl(e, t) { + var i, n, r, o, s; + let u = $(t), + a = + (i = u.truthy) != null ? i : ['true', '1', 'yes', 'on', 'y', 'enabled'], + c = + (n = u.falsy) != null + ? n + : ['false', '0', 'no', 'off', 'n', 'disabled']; + u.case !== 'sensitive' && + ((a = a.map((k) => (typeof k == 'string' ? k.toLowerCase() : k))), + (c = c.map((k) => (typeof k == 'string' ? k.toLowerCase() : k)))); + let m = new Set(a), + p = new Set(c), + f = (r = e.Codec) != null ? r : Cr, + h = (o = e.Boolean) != null ? o : Pr, + N = new f({ + type: 'pipe', + in: new ((s = e.String) != null ? s : yn)({ + type: 'string', + error: u.error, + }), + out: new h({ type: 'boolean', error: u.error }), + transform: (k, g) => { + let y = k; + return ( + u.case !== 'sensitive' && (y = y.toLowerCase()), + !!m.has(y) || + (!p.has(y) && + (g.issues.push({ + code: 'invalid_value', + expected: 'stringbool', + values: [...m, ...p], + input: g.value, + inst: N, + continue: !1, + }), + {})) + ); + }, + reverseTransform: (k, g) => + k === !0 ? a[0] || 'true' : c[0] || 'false', + error: u.error, + }); + return N; + } + function _n(e, t, i, n = {}) { + let r = $(n), + o = { + ...$(n), + check: 'string_format', + type: 'string', + format: t, + fn: typeof i == 'function' ? i : (s) => i.test(s), + ...r, + }; + return (i instanceof RegExp && (o.pattern = i), new e(o)); + } + var sr = class { + constructor(e) { + var t, i, n, r, o; + ((this.counter = 0), + (this.metadataRegistry = (t = e?.metadata) != null ? t : ft), + (this.target = (i = e?.target) != null ? i : 'draft-2020-12'), + (this.unrepresentable = (n = e?.unrepresentable) != null ? n : 'throw'), + (this.override = (r = e?.override) != null ? r : () => {}), + (this.io = (o = e?.io) != null ? o : 'output'), + (this.seen = new Map())); + } + process(e, t = { path: [], schemaPath: [] }) { + var i, n, r, o, s; + let u = e._zod.def, + a = { + guid: 'uuid', + url: 'uri', + datetime: 'date-time', + json_string: 'json-string', + regex: '', + }, + c = this.seen.get(e); + if (c) + return ( + c.count++, + t.schemaPath.includes(e) && (c.cycle = t.path), + c.schema + ); + let m = { schema: {}, count: 1, cycle: void 0, path: t.path }; + this.seen.set(e, m); + let p = (n = (i = e._zod).toJSONSchema) == null ? void 0 : n.call(i); + if (p) m.schema = p; + else { + let h = { ...t, schemaPath: [...t.schemaPath, e], path: t.path }, + N = e._zod.parent; + if (N) + ((m.ref = N), this.process(N, h), (this.seen.get(N).isParent = !0)); + else { + let k = m.schema; + switch (u.type) { + case 'string': { + let g = k; + g.type = 'string'; + let { + minimum: y, + maximum: w, + format: j, + patterns: I, + contentEncoding: E, + } = e._zod.bag; + if ( + (typeof y == 'number' && (g.minLength = y), + typeof w == 'number' && (g.maxLength = w), + j && + ((g.format = (r = a[j]) != null ? r : j), + g.format === '' && delete g.format), + E && (g.contentEncoding = E), + I && I.size > 0) + ) { + let V = [...I]; + V.length === 1 + ? (g.pattern = V[0].source) + : V.length > 1 && + (m.schema.allOf = [ + ...V.map((B) => ({ + ...(this.target === 'draft-7' || + this.target === 'draft-4' || + this.target === 'openapi-3.0' + ? { type: 'string' } + : {}), + pattern: B.source, + })), + ]); + } + break; + } + case 'number': { + let g = k, + { + minimum: y, + maximum: w, + format: j, + multipleOf: I, + exclusiveMaximum: E, + exclusiveMinimum: V, + } = e._zod.bag; + (typeof j == 'string' && j.includes('int') + ? (g.type = 'integer') + : (g.type = 'number'), + typeof V == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((g.minimum = V), (g.exclusiveMinimum = !0)) + : (g.exclusiveMinimum = V)), + typeof y == 'number' && + ((g.minimum = y), + typeof V == 'number' && + this.target !== 'draft-4' && + (V >= y ? delete g.minimum : delete g.exclusiveMinimum)), + typeof E == 'number' && + (this.target === 'draft-4' || this.target === 'openapi-3.0' + ? ((g.maximum = E), (g.exclusiveMaximum = !0)) + : (g.exclusiveMaximum = E)), + typeof w == 'number' && + ((g.maximum = w), + typeof E == 'number' && + this.target !== 'draft-4' && + (E <= w ? delete g.maximum : delete g.exclusiveMaximum)), + typeof I == 'number' && (g.multipleOf = I)); + break; + } + case 'boolean': + k.type = 'boolean'; + break; + case 'bigint': + if (this.unrepresentable === 'throw') + throw new Error('BigInt cannot be represented in JSON Schema'); + break; + case 'symbol': + if (this.unrepresentable === 'throw') + throw new Error('Symbols cannot be represented in JSON Schema'); + break; + case 'null': + this.target === 'openapi-3.0' + ? ((k.type = 'string'), (k.nullable = !0), (k.enum = [null])) + : (k.type = 'null'); + break; + case 'any': + case 'unknown': + break; + case 'undefined': + if (this.unrepresentable === 'throw') + throw new Error( + 'Undefined cannot be represented in JSON Schema', + ); + break; + case 'void': + if (this.unrepresentable === 'throw') + throw new Error('Void cannot be represented in JSON Schema'); + break; + case 'never': + k.not = {}; + break; + case 'date': + if (this.unrepresentable === 'throw') + throw new Error('Date cannot be represented in JSON Schema'); + break; + case 'array': { + let g = k, + { minimum: y, maximum: w } = e._zod.bag; + (typeof y == 'number' && (g.minItems = y), + typeof w == 'number' && (g.maxItems = w), + (g.type = 'array'), + (g.items = this.process(u.element, { + ...h, + path: [...h.path, 'items'], + }))); + break; + } + case 'object': { + let g = k; + ((g.type = 'object'), (g.properties = {})); + let y = u.shape; + for (let I in y) + g.properties[I] = this.process(y[I], { + ...h, + path: [...h.path, 'properties', I], + }); + let w = new Set(Object.keys(y)), + j = new Set( + [...w].filter((I) => { + let E = u.shape[I]._zod; + return this.io === 'input' + ? E.optin === void 0 + : E.optout === void 0; + }), + ); + (j.size > 0 && (g.required = Array.from(j)), + ((o = u.catchall) == null ? void 0 : o._zod.def.type) === + 'never' + ? (g.additionalProperties = !1) + : u.catchall + ? u.catchall && + (g.additionalProperties = this.process(u.catchall, { + ...h, + path: [...h.path, 'additionalProperties'], + })) + : this.io === 'output' && (g.additionalProperties = !1)); + break; + } + case 'union': { + let g = k, + y = u.options.map((w, j) => + this.process(w, { ...h, path: [...h.path, 'anyOf', j] }), + ); + g.anyOf = y; + break; + } + case 'intersection': { + let g = k, + y = this.process(u.left, { + ...h, + path: [...h.path, 'allOf', 0], + }), + w = this.process(u.right, { + ...h, + path: [...h.path, 'allOf', 1], + }), + j = (E) => 'allOf' in E && Object.keys(E).length === 1, + I = [...(j(y) ? y.allOf : [y]), ...(j(w) ? w.allOf : [w])]; + g.allOf = I; + break; + } + case 'tuple': { + let g = k; + g.type = 'array'; + let y = this.target === 'draft-2020-12' ? 'prefixItems' : 'items', + w = + this.target === 'draft-2020-12' || + this.target === 'openapi-3.0' + ? 'items' + : 'additionalItems', + j = u.items.map((B, H) => + this.process(B, { ...h, path: [...h.path, y, H] }), + ), + I = u.rest + ? this.process(u.rest, { + ...h, + path: [ + ...h.path, + w, + ...(this.target === 'openapi-3.0' + ? [u.items.length] + : []), + ], + }) + : null; + this.target === 'draft-2020-12' + ? ((g.prefixItems = j), I && (g.items = I)) + : this.target === 'openapi-3.0' + ? ((g.items = { anyOf: j }), + I && g.items.anyOf.push(I), + (g.minItems = j.length), + I || (g.maxItems = j.length)) + : ((g.items = j), I && (g.additionalItems = I)); + let { minimum: E, maximum: V } = e._zod.bag; + (typeof E == 'number' && (g.minItems = E), + typeof V == 'number' && (g.maxItems = V)); + break; + } + case 'record': { + let g = k; + ((g.type = 'object'), + (this.target !== 'draft-7' && + this.target !== 'draft-2020-12') || + (g.propertyNames = this.process(u.keyType, { + ...h, + path: [...h.path, 'propertyNames'], + })), + (g.additionalProperties = this.process(u.valueType, { + ...h, + path: [...h.path, 'additionalProperties'], + }))); + break; + } + case 'map': + if (this.unrepresentable === 'throw') + throw new Error('Map cannot be represented in JSON Schema'); + break; + case 'set': + if (this.unrepresentable === 'throw') + throw new Error('Set cannot be represented in JSON Schema'); + break; + case 'enum': { + let g = k, + y = fr(u.entries); + (y.every((w) => typeof w == 'number') && (g.type = 'number'), + y.every((w) => typeof w == 'string') && (g.type = 'string'), + (g.enum = y)); + break; + } + case 'literal': { + let g = k, + y = []; + for (let w of u.values) + if (w === void 0) { + if (this.unrepresentable === 'throw') + throw new Error( + 'Literal `undefined` cannot be represented in JSON Schema', + ); + } else if (typeof w == 'bigint') { + if (this.unrepresentable === 'throw') + throw new Error( + 'BigInt literals cannot be represented in JSON Schema', + ); + y.push(Number(w)); + } else y.push(w); + if (y.length !== 0) + if (y.length === 1) { + let w = y[0]; + ((g.type = w === null ? 'null' : typeof w), + this.target === 'draft-4' || this.target === 'openapi-3.0' + ? (g.enum = [w]) + : (g.const = w)); + } else + (y.every((w) => typeof w == 'number') && (g.type = 'number'), + y.every((w) => typeof w == 'string') && (g.type = 'string'), + y.every((w) => typeof w == 'boolean') && + (g.type = 'string'), + y.every((w) => w === null) && (g.type = 'null'), + (g.enum = y)); + break; + } + case 'file': { + let g = k, + y = { + type: 'string', + format: 'binary', + contentEncoding: 'binary', + }, + { minimum: w, maximum: j, mime: I } = e._zod.bag; + (w !== void 0 && (y.minLength = w), + j !== void 0 && (y.maxLength = j), + I + ? I.length === 1 + ? ((y.contentMediaType = I[0]), Object.assign(g, y)) + : (g.anyOf = I.map((E) => ({ ...y, contentMediaType: E }))) + : Object.assign(g, y)); + break; + } + case 'transform': + if (this.unrepresentable === 'throw') + throw new Error( + 'Transforms cannot be represented in JSON Schema', + ); + break; + case 'nullable': { + let g = this.process(u.innerType, h); + this.target === 'openapi-3.0' + ? ((m.ref = u.innerType), (k.nullable = !0)) + : (k.anyOf = [g, { type: 'null' }]); + break; + } + case 'nonoptional': + case 'promise': + case 'optional': + (this.process(u.innerType, h), (m.ref = u.innerType)); + break; + case 'success': + k.type = 'boolean'; + break; + case 'default': + (this.process(u.innerType, h), + (m.ref = u.innerType), + (k.default = JSON.parse(JSON.stringify(u.defaultValue)))); + break; + case 'prefault': + (this.process(u.innerType, h), + (m.ref = u.innerType), + this.io === 'input' && + (k._prefault = JSON.parse(JSON.stringify(u.defaultValue)))); + break; + case 'catch': { + let g; + (this.process(u.innerType, h), (m.ref = u.innerType)); + try { + g = u.catchValue(void 0); + } catch { + throw new Error( + 'Dynamic catch values are not supported in JSON Schema', + ); + } + k.default = g; + break; + } + case 'nan': + if (this.unrepresentable === 'throw') + throw new Error('NaN cannot be represented in JSON Schema'); + break; + case 'template_literal': { + let g = k, + y = e._zod.pattern; + if (!y) throw new Error('Pattern not found in template literal'); + ((g.type = 'string'), (g.pattern = y.source)); + break; + } + case 'pipe': { + let g = + this.io === 'input' + ? u.in._zod.def.type === 'transform' + ? u.out + : u.in + : u.out; + (this.process(g, h), (m.ref = g)); + break; + } + case 'readonly': + (this.process(u.innerType, h), + (m.ref = u.innerType), + (k.readOnly = !0)); + break; + case 'lazy': { + let g = e._zod.innerType; + (this.process(g, h), (m.ref = g)); + break; + } + case 'custom': + if (this.unrepresentable === 'throw') + throw new Error( + 'Custom types cannot be represented in JSON Schema', + ); + break; + case 'function': + if (this.unrepresentable === 'throw') + throw new Error( + 'Function types cannot be represented in JSON Schema', + ); + } + } + } + let f = this.metadataRegistry.get(e); + return ( + f && Object.assign(m.schema, f), + this.io === 'input' && + te(e) && + (delete m.schema.examples, delete m.schema.default), + this.io === 'input' && + m.schema._prefault && + ((s = m.schema).default != null || (s.default = m.schema._prefault)), + delete m.schema._prefault, + this.seen.get(e).schema + ); + } + emit(e, t) { + var i, n, r, o, s, u, a, c, m, p; + let f = { + cycles: (i = t?.cycles) != null ? i : 'ref', + reused: (n = t?.reused) != null ? n : 'inline', + external: (r = t?.external) != null ? r : void 0, + }, + h = this.seen.get(e); + if (!h) throw new Error('Unprocessed schema. This is a bug in Zod.'); + let N = (j) => { + var I, E, V, B, H; + let we = this.target === 'draft-2020-12' ? '$defs' : 'definitions'; + if (f.external) { + let It = + (I = f.external.registry.get(j[0])) == null ? void 0 : I.id, + co = (E = f.external.uri) != null ? E : (Dm) => Dm; + if (It) return { ref: co(It) }; + let Di = + (B = (V = j[1].defId) != null ? V : j[1].schema.id) != null + ? B + : 'schema' + this.counter++; + return ( + (j[1].defId = Di), + { defId: Di, ref: `${co('__shared')}#/${we}/${Di}` } + ); + } + if (j[1] === h) return { ref: '#' }; + let Ei = `#/${we}/`, + xt = (H = j[1].schema.id) != null ? H : '__schema' + this.counter++; + return { defId: xt, ref: Ei + xt }; + }, + k = (j) => { + if (j[1].schema.$ref) return; + let I = j[1], + { ref: E, defId: V } = N(j); + ((I.def = { ...I.schema }), V && (I.defId = V)); + let B = I.schema; + for (let H in B) delete B[H]; + B.$ref = E; + }; + if (f.cycles === 'throw') + for (let j of this.seen.entries()) { + let I = j[1]; + if (I.cycle) + throw new Error(`Cycle detected: #/${(o = I.cycle) == null ? void 0 : o.join('/')}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + for (let j of this.seen.entries()) { + let I = j[1]; + if (e === j[0]) { + k(j); + continue; + } + if (f.external) { + let E = (s = f.external.registry.get(j[0])) == null ? void 0 : s.id; + if (e !== j[0] && E) { + k(j); + continue; + } + } + (((u = this.metadataRegistry.get(j[0])) != null && u.id) || + I.cycle || + (I.count > 1 && f.reused === 'ref')) && + k(j); + } + let g = (j, I) => { + var E, V, B; + let H = this.seen.get(j), + we = (E = H.def) != null ? E : H.schema, + Ei = { ...we }; + if (H.ref === null) return; + let xt = H.ref; + if (((H.ref = null), xt)) { + g(xt, I); + let It = this.seen.get(xt).schema; + !It.$ref || + (I.target !== 'draft-7' && + I.target !== 'draft-4' && + I.target !== 'openapi-3.0') + ? (Object.assign(we, It), Object.assign(we, Ei)) + : ((we.allOf = (V = we.allOf) != null ? V : []), we.allOf.push(It)); + } + H.isParent || + this.override({ + zodSchema: j, + jsonSchema: we, + path: (B = H.path) != null ? B : [], + }); + }; + for (let j of [...this.seen.entries()].reverse()) + g(j[0], { target: this.target }); + let y = {}; + if ( + (this.target === 'draft-2020-12' + ? (y.$schema = 'https://json-schema.org/draft/2020-12/schema') + : this.target === 'draft-7' + ? (y.$schema = 'http://json-schema.org/draft-07/schema#') + : this.target === 'draft-4' + ? (y.$schema = 'http://json-schema.org/draft-04/schema#') + : this.target === 'openapi-3.0' || + console.warn(`Invalid target: ${this.target}`), + (a = f.external) == null ? void 0 : a.uri) + ) { + let j = (c = f.external.registry.get(e)) == null ? void 0 : c.id; + if (!j) throw new Error('Schema is missing an `id` property'); + y.$id = f.external.uri(j); + } + Object.assign(y, h.def); + let w = (p = (m = f.external) == null ? void 0 : m.defs) != null ? p : {}; + for (let j of this.seen.entries()) { + let I = j[1]; + I.def && I.defId && (w[I.defId] = I.def); + } + f.external || + (Object.keys(w).length > 0 && + (this.target === 'draft-2020-12' + ? (y.$defs = w) + : (y.definitions = w))); + try { + return JSON.parse(JSON.stringify(y)); + } catch { + throw new Error('Error converting schema to JSON.'); + } + } + }; + function Gl(e, t) { + if (e instanceof Zr) { + let n = new sr(t), + r = {}; + for (let u of e._idmap.entries()) { + let [a, c] = u; + n.process(c); + } + let o = {}, + s = { registry: e, uri: t?.uri, defs: r }; + for (let u of e._idmap.entries()) { + let [a, c] = u; + o[a] = n.emit(c, { ...t, external: s }); + } + if (Object.keys(r).length > 0) { + let u = n.target === 'draft-2020-12' ? '$defs' : 'definitions'; + o.__shared = { [u]: r }; + } + return { schemas: o }; + } + let i = new sr(t); + return (i.process(e), i.emit(e, t)); + } + function te(e, t) { + let i = t ?? { seen: new Set() }; + if (i.seen.has(e)) return !1; + i.seen.add(e); + let n = e._zod.def; + switch (n.type) { + case 'string': + case 'number': + case 'bigint': + case 'boolean': + case 'date': + case 'symbol': + case 'undefined': + case 'null': + case 'any': + case 'unknown': + case 'never': + case 'void': + case 'literal': + case 'enum': + case 'nan': + case 'file': + case 'template_literal': + case 'custom': + case 'success': + case 'catch': + case 'function': + return !1; + case 'array': + return te(n.element, i); + case 'object': + for (let r in n.shape) if (te(n.shape[r], i)) return !0; + return !1; + case 'union': + for (let r of n.options) if (te(r, i)) return !0; + return !1; + case 'intersection': + return te(n.left, i) || te(n.right, i); + case 'tuple': + for (let r of n.items) if (te(r, i)) return !0; + return !(!n.rest || !te(n.rest, i)); + case 'record': + case 'map': + return te(n.keyType, i) || te(n.valueType, i); + case 'set': + return te(n.valueType, i); + case 'promise': + case 'optional': + case 'nonoptional': + case 'nullable': + case 'readonly': + case 'default': + case 'prefault': + return te(n.innerType, i); + case 'lazy': + return te(n.getter(), i); + case 'transform': + return !0; + case 'pipe': + return te(n.in, i) || te(n.out, i); + } + throw new Error(`Unknown schema type: ${n.type}`); + } + var Xb = {}, + Kl = {}; + ve(Kl, { + ZodISODate: () => ya, + ZodISODateTime: () => ba, + ZodISODuration: () => $a, + ZodISOTime: () => _a, + date: () => Xl, + datetime: () => Hl, + duration: () => Ql, + time: () => Yl, + }); + var ba = v('ZodISODateTime', (e, t) => { + (tc.init(e, t), W.init(e, t)); + }); + function Hl(e) { + return cl(ba, e); + } + var ya = v('ZodISODate', (e, t) => { + (nc.init(e, t), W.init(e, t)); + }); + function Xl(e) { + return ll(ya, e); + } + var _a = v('ZodISOTime', (e, t) => { + (ic.init(e, t), W.init(e, t)); + }); + function Yl(e) { + return dl(_a, e); + } + var $a = v('ZodISODuration', (e, t) => { + (rc.init(e, t), W.init(e, t)); + }); + function Ql(e) { + return ml($a, e); + } + var ed = (e, t) => { + (gr.init(e, t), + (e.name = 'ZodError'), + Object.defineProperties(e, { + format: { value: (i) => br(e, i) }, + flatten: { value: (i) => hr(e, i) }, + addIssue: { + value: (i) => { + (e.issues.push(i), (e.message = JSON.stringify(e.issues, Yn, 2))); + }, + }, + addIssues: { + value: (i) => { + (e.issues.push(...i), + (e.message = JSON.stringify(e.issues, Yn, 2))); + }, + }, + isEmpty: { get: () => e.issues.length === 0 }, + })); + }, + Yb = v('ZodError', ed), + ce = v('ZodError', ed, { Parent: Error }), + td = mn(ce), + nd = pn(ce), + id = fn(ce), + rd = vn(ce), + ad = yr(ce), + od = _r(ce), + sd = $r(ce), + ud = kr(ce), + cd = wr(ce), + ld = Sr(ce), + dd = xr(ce), + md = Ir(ce), + R = v( + 'ZodType', + (e, t) => ( + T.init(e, t), + (e.def = t), + (e.type = t.type), + Object.defineProperty(e, '_def', { value: t }), + (e.check = (...i) => { + var n; + return e.clone( + M.mergeDefs(t, { + checks: [ + ...((n = t.checks) != null ? n : []), + ...i.map((r) => + typeof r == 'function' + ? { + _zod: { + check: r, + def: { check: 'custom' }, + onattach: [], + }, + } + : r, + ), + ], + }), + ); + }), + (e.clone = (i, n) => ge(e, i, n)), + (e.brand = () => e), + (e.register = (i, n) => (i.add(e, n), e)), + (e.parse = (i, n) => td(e, i, n, { callee: e.parse })), + (e.safeParse = (i, n) => id(e, i, n)), + (e.parseAsync = async (i, n) => nd(e, i, n, { callee: e.parseAsync })), + (e.safeParseAsync = async (i, n) => rd(e, i, n)), + (e.spa = e.safeParseAsync), + (e.encode = (i, n) => ad(e, i, n)), + (e.decode = (i, n) => od(e, i, n)), + (e.encodeAsync = async (i, n) => sd(e, i, n)), + (e.decodeAsync = async (i, n) => ud(e, i, n)), + (e.safeEncode = (i, n) => cd(e, i, n)), + (e.safeDecode = (i, n) => ld(e, i, n)), + (e.safeEncodeAsync = async (i, n) => dd(e, i, n)), + (e.safeDecodeAsync = async (i, n) => md(e, i, n)), + (e.refine = (i, n) => e.check(Yd(i, n))), + (e.superRefine = (i) => e.check(Qd(i))), + (e.overwrite = (i) => e.check(kt(i))), + (e.optional = () => ri(e)), + (e.nullable = () => ai(e)), + (e.nullish = () => ri(ai(e))), + (e.nonoptional = (i) => Ld(e, i)), + (e.array = () => _i(e)), + (e.or = (i) => Va([e, i])), + (e.and = (i) => Id(e, i)), + (e.transform = (i) => oi(e, qa(i))), + (e.default = (i) => Ad(e, i)), + (e.prefault = (i) => Rd(e, i)), + (e.catch = (i) => Vd(e, i)), + (e.pipe = (i) => oi(e, i)), + (e.readonly = () => qd(e)), + (e.describe = (i) => { + let n = e.clone(); + return (ft.add(n, { description: i }), n); + }), + Object.defineProperty(e, 'description', { + get() { + var i; + return (i = ft.get(e)) == null ? void 0 : i.description; + }, + configurable: !0, + }), + (e.meta = (...i) => { + if (i.length === 0) return ft.get(e); + let n = e.clone(); + return (ft.add(n, i[0]), n); + }), + (e.isOptional = () => e.safeParse(void 0).success), + (e.isNullable = () => e.safeParse(null).success), + e + ), + ), + ka = v('_ZodString', (e, t) => { + var i, n, r; + (yn.init(e, t), R.init(e, t)); + let o = e._zod.bag; + ((e.format = (i = o.format) != null ? i : null), + (e.minLength = (n = o.minimum) != null ? n : null), + (e.maxLength = (r = o.maximum) != null ? r : null), + (e.regex = (...s) => e.check(sa(...s))), + (e.includes = (...s) => e.check(la(...s))), + (e.startsWith = (...s) => e.check(da(...s))), + (e.endsWith = (...s) => e.check(ma(...s))), + (e.min = (...s) => e.check(Lt(...s))), + (e.max = (...s) => e.check(pi(...s))), + (e.length = (...s) => e.check(fi(...s))), + (e.nonempty = (...s) => e.check(Lt(1, ...s))), + (e.lowercase = (s) => e.check(ua(s))), + (e.uppercase = (s) => e.check(ca(s))), + (e.trim = () => e.check(va())), + (e.normalize = (...s) => e.check(fa(...s))), + (e.toLowerCase = () => e.check(ga())), + (e.toUpperCase = () => e.check(ha()))); + }), + vi = v('ZodString', (e, t) => { + (yn.init(e, t), + ka.init(e, t), + (e.email = (i) => e.check(Lr(wa, i))), + (e.url = (i) => e.check(di(gi, i))), + (e.jwt = (i) => e.check(aa(Za, i))), + (e.emoji = (i) => e.check(Wr(Sa, i))), + (e.guid = (i) => e.check(ni(ii, i))), + (e.uuid = (i) => e.check(Jr(De, i))), + (e.uuidv4 = (i) => e.check(Mr(De, i))), + (e.uuidv6 = (i) => e.check(Vr(De, i))), + (e.uuidv7 = (i) => e.check(Fr(De, i))), + (e.nanoid = (i) => e.check(qr(xa, i))), + (e.guid = (i) => e.check(ni(ii, i))), + (e.cuid = (i) => e.check(Br(Ia, i))), + (e.cuid2 = (i) => e.check(Gr(ja, i))), + (e.ulid = (i) => e.check(Kr(Oa, i))), + (e.base64 = (i) => e.check(na(Ta, i))), + (e.base64url = (i) => e.check(ia(Ca, i))), + (e.xid = (i) => e.check(Hr(za, i))), + (e.ksuid = (i) => e.check(Xr(Na, i))), + (e.ipv4 = (i) => e.check(Yr(Ua, i))), + (e.ipv6 = (i) => e.check(Qr(Pa, i))), + (e.cidrv4 = (i) => e.check(ea(Ea, i))), + (e.cidrv6 = (i) => e.check(ta(Da, i))), + (e.e164 = (i) => e.check(ra(Aa, i))), + (e.datetime = (i) => e.check(Hl(i))), + (e.date = (i) => e.check(Xl(i))), + (e.time = (i) => e.check(Yl(i))), + (e.duration = (i) => e.check(Ql(i)))); + }); + function ur(e) { + return ol(vi, e); + } + var W = v('ZodStringFormat', (e, t) => { + (F.init(e, t), ka.init(e, t)); + }), + wa = v('ZodEmail', (e, t) => { + (qu.init(e, t), W.init(e, t)); + }); + function Qb(e) { + return Lr(wa, e); + } + var ii = v('ZodGUID', (e, t) => { + (Fu.init(e, t), W.init(e, t)); + }); + function ey(e) { + return ni(ii, e); + } + var De = v('ZodUUID', (e, t) => { + (Wu.init(e, t), W.init(e, t)); + }); + function ty(e) { + return Jr(De, e); + } + function ny(e) { + return Mr(De, e); + } + function iy(e) { + return Vr(De, e); + } + function ry(e) { + return Fr(De, e); + } + var gi = v('ZodURL', (e, t) => { + (Bu.init(e, t), W.init(e, t)); + }); + function ay(e) { + return di(gi, e); + } + function oy(e) { + return di(gi, { + protocol: /^https?$/, + hostname: $t.domain, + ...M.normalizeParams(e), + }); + } + var Sa = v('ZodEmoji', (e, t) => { + (Gu.init(e, t), W.init(e, t)); + }); + function sy(e) { + return Wr(Sa, e); + } + var xa = v('ZodNanoID', (e, t) => { + (Ku.init(e, t), W.init(e, t)); + }); + function uy(e) { + return qr(xa, e); + } + var Ia = v('ZodCUID', (e, t) => { + (Hu.init(e, t), W.init(e, t)); + }); + function cy(e) { + return Br(Ia, e); + } + var ja = v('ZodCUID2', (e, t) => { + (Xu.init(e, t), W.init(e, t)); + }); + function ly(e) { + return Gr(ja, e); + } + var Oa = v('ZodULID', (e, t) => { + (Yu.init(e, t), W.init(e, t)); + }); + function dy(e) { + return Kr(Oa, e); + } + var za = v('ZodXID', (e, t) => { + (Qu.init(e, t), W.init(e, t)); + }); + function my(e) { + return Hr(za, e); + } + var Na = v('ZodKSUID', (e, t) => { + (ec.init(e, t), W.init(e, t)); + }); + function py(e) { + return Xr(Na, e); + } + var Ua = v('ZodIPv4', (e, t) => { + (ac.init(e, t), W.init(e, t)); + }); + function fy(e) { + return Yr(Ua, e); + } + var Pa = v('ZodIPv6', (e, t) => { + (oc.init(e, t), W.init(e, t)); + }); + function vy(e) { + return Qr(Pa, e); + } + var Ea = v('ZodCIDRv4', (e, t) => { + (sc.init(e, t), W.init(e, t)); + }); + function gy(e) { + return ea(Ea, e); + } + var Da = v('ZodCIDRv6', (e, t) => { + (uc.init(e, t), W.init(e, t)); + }); + function hy(e) { + return ta(Da, e); + } + var Ta = v('ZodBase64', (e, t) => { + (cc.init(e, t), W.init(e, t)); + }); + function by(e) { + return na(Ta, e); + } + var Ca = v('ZodBase64URL', (e, t) => { + (dc.init(e, t), W.init(e, t)); + }); + function yy(e) { + return ia(Ca, e); + } + var Aa = v('ZodE164', (e, t) => { + (mc.init(e, t), W.init(e, t)); + }); + function _y(e) { + return ra(Aa, e); + } + var Za = v('ZodJWT', (e, t) => { + (fc.init(e, t), W.init(e, t)); + }); + function $y(e) { + return aa(Za, e); + } + var $n = v('ZodCustomStringFormat', (e, t) => { + (vc.init(e, t), W.init(e, t)); + }); + function ky(e, t, i = {}) { + return _n($n, e, t, i); + } + function wy(e) { + return _n($n, 'hostname', $t.hostname, e); + } + function Sy(e) { + return _n($n, 'hex', $t.hex, e); + } + function xy(e, t) { + var i; + let n = `${e}_${(i = t?.enc) != null ? i : 'hex'}`, + r = $t[n]; + if (!r) throw new Error(`Unrecognized hash format: ${n}`); + return _n($n, n, r, t); + } + var hi = v('ZodNumber', (e, t) => { + var i, n, r, o, s, u, a, c, m; + (Ur.init(e, t), + R.init(e, t), + (e.gt = (f, h) => e.check(yt(f, h))), + (e.gte = (f, h) => e.check(se(f, h))), + (e.min = (f, h) => e.check(se(f, h))), + (e.lt = (f, h) => e.check(bt(f, h))), + (e.lte = (f, h) => e.check(_e(f, h))), + (e.max = (f, h) => e.check(_e(f, h))), + (e.int = (f) => e.check(cr(f))), + (e.safe = (f) => e.check(cr(f))), + (e.positive = (f) => e.check(yt(0, f))), + (e.nonnegative = (f) => e.check(se(0, f))), + (e.negative = (f) => e.check(bt(0, f))), + (e.nonpositive = (f) => e.check(_e(0, f))), + (e.multipleOf = (f, h) => e.check(sn(f, h))), + (e.step = (f, h) => e.check(sn(f, h))), + (e.finite = () => e)); + let p = e._zod.bag; + ((e.minValue = + (r = Math.max( + (i = p.minimum) != null ? i : Number.NEGATIVE_INFINITY, + (n = p.exclusiveMinimum) != null ? n : Number.NEGATIVE_INFINITY, + )) != null + ? r + : null), + (e.maxValue = + (u = Math.min( + (o = p.maximum) != null ? o : Number.POSITIVE_INFINITY, + (s = p.exclusiveMaximum) != null ? s : Number.POSITIVE_INFINITY, + )) != null + ? u + : null), + (e.isInt = + ((a = p.format) != null ? a : '').includes('int') || + Number.isSafeInteger((c = p.multipleOf) != null ? c : 0.5)), + (e.isFinite = !0), + (e.format = (m = p.format) != null ? m : null)); + }); + function pd(e) { + return pl(hi, e); + } + var Mt = v('ZodNumberFormat', (e, t) => { + (gc.init(e, t), hi.init(e, t)); + }); + function cr(e) { + return vl(Mt, e); + } + function Iy(e) { + return gl(Mt, e); + } + function jy(e) { + return hl(Mt, e); + } + function Oy(e) { + return bl(Mt, e); + } + function zy(e) { + return yl(Mt, e); + } + var bi = v('ZodBoolean', (e, t) => { + (Pr.init(e, t), R.init(e, t)); + }); + function fd(e) { + return _l(bi, e); + } + var yi = v('ZodBigInt', (e, t) => { + var i, n, r; + (Er.init(e, t), + R.init(e, t), + (e.gte = (s, u) => e.check(se(s, u))), + (e.min = (s, u) => e.check(se(s, u))), + (e.gt = (s, u) => e.check(yt(s, u))), + (e.gte = (s, u) => e.check(se(s, u))), + (e.min = (s, u) => e.check(se(s, u))), + (e.lt = (s, u) => e.check(bt(s, u))), + (e.lte = (s, u) => e.check(_e(s, u))), + (e.max = (s, u) => e.check(_e(s, u))), + (e.positive = (s) => e.check(yt(BigInt(0), s))), + (e.negative = (s) => e.check(bt(BigInt(0), s))), + (e.nonpositive = (s) => e.check(_e(BigInt(0), s))), + (e.nonnegative = (s) => e.check(se(BigInt(0), s))), + (e.multipleOf = (s, u) => e.check(sn(s, u)))); + let o = e._zod.bag; + ((e.minValue = (i = o.minimum) != null ? i : null), + (e.maxValue = (n = o.maximum) != null ? n : null), + (e.format = (r = o.format) != null ? r : null)); + }); + function Ny(e) { + return kl(yi, e); + } + var Ra = v('ZodBigIntFormat', (e, t) => { + (hc.init(e, t), yi.init(e, t)); + }); + function Uy(e) { + return Sl(Ra, e); + } + function Py(e) { + return xl(Ra, e); + } + var vd = v('ZodSymbol', (e, t) => { + (bc.init(e, t), R.init(e, t)); + }); + function Ey(e) { + return Il(vd, e); + } + var gd = v('ZodUndefined', (e, t) => { + (yc.init(e, t), R.init(e, t)); + }); + function Dy(e) { + return jl(gd, e); + } + var hd = v('ZodNull', (e, t) => { + (_c.init(e, t), R.init(e, t)); + }); + function bd(e) { + return Ol(hd, e); + } + var yd = v('ZodAny', (e, t) => { + ($c.init(e, t), R.init(e, t)); + }); + function Ty() { + return zl(yd); + } + var _d = v('ZodUnknown', (e, t) => { + (kc.init(e, t), R.init(e, t)); + }); + function Jt() { + return Nl(_d); + } + var $d = v('ZodNever', (e, t) => { + (wc.init(e, t), R.init(e, t)); + }); + function La(e) { + return Ul($d, e); + } + var kd = v('ZodVoid', (e, t) => { + (Sc.init(e, t), R.init(e, t)); + }); + function Cy(e) { + return Pl(kd, e); + } + var Ja = v('ZodDate', (e, t) => { + (xc.init(e, t), + R.init(e, t), + (e.min = (n, r) => e.check(se(n, r))), + (e.max = (n, r) => e.check(_e(n, r)))); + let i = e._zod.bag; + ((e.minDate = i.minimum ? new Date(i.minimum) : null), + (e.maxDate = i.maximum ? new Date(i.maximum) : null)); + }); + function Ay(e) { + return El(Ja, e); + } + var wd = v('ZodArray', (e, t) => { + (Ic.init(e, t), + R.init(e, t), + (e.element = t.element), + (e.min = (i, n) => e.check(Lt(i, n))), + (e.nonempty = (i) => e.check(Lt(1, i))), + (e.max = (i, n) => e.check(pi(i, n))), + (e.length = (i, n) => e.check(fi(i, n))), + (e.unwrap = () => e.element)); + }); + function _i(e, t) { + return Jl(wd, e, t); + } + function Zy(e) { + let t = e._zod.def.shape; + return Wa(Object.keys(t)); + } + var $i = v('ZodObject', (e, t) => { + (Nc.init(e, t), + R.init(e, t), + M.defineLazy(e, 'shape', () => t.shape), + (e.keyof = () => Wa(Object.keys(e._zod.def.shape))), + (e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i })), + (e.passthrough = () => e.clone({ ...e._zod.def, catchall: Jt() })), + (e.loose = () => e.clone({ ...e._zod.def, catchall: Jt() })), + (e.strict = () => e.clone({ ...e._zod.def, catchall: La() })), + (e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 })), + (e.extend = (i) => M.extend(e, i)), + (e.safeExtend = (i) => M.safeExtend(e, i)), + (e.merge = (i) => M.merge(e, i)), + (e.pick = (i) => M.pick(e, i)), + (e.omit = (i) => M.omit(e, i)), + (e.partial = (...i) => M.partial(Ba, e, i[0])), + (e.required = (...i) => M.required(Ga, e, i[0]))); + }); + function Ry(e, t) { + let i = { type: 'object', shape: e ?? {}, ...M.normalizeParams(t) }; + return new $i(i); + } + function Ly(e, t) { + return new $i({ + type: 'object', + shape: e, + catchall: La(), + ...M.normalizeParams(t), + }); + } + function Jy(e, t) { + return new $i({ + type: 'object', + shape: e, + catchall: Jt(), + ...M.normalizeParams(t), + }); + } + var Ma = v('ZodUnion', (e, t) => { + (Dr.init(e, t), R.init(e, t), (e.options = t.options)); + }); + function Va(e, t) { + return new Ma({ type: 'union', options: e, ...M.normalizeParams(t) }); + } + var Sd = v('ZodDiscriminatedUnion', (e, t) => { + (Ma.init(e, t), Uc.init(e, t)); + }); + function My(e, t, i) { + return new Sd({ + type: 'union', + options: t, + discriminator: e, + ...M.normalizeParams(i), + }); + } + var xd = v('ZodIntersection', (e, t) => { + (Pc.init(e, t), R.init(e, t)); + }); + function Id(e, t) { + return new xd({ type: 'intersection', left: e, right: t }); + } + var jd = v('ZodTuple', (e, t) => { + (Tr.init(e, t), + R.init(e, t), + (e.rest = (i) => e.clone({ ...e._zod.def, rest: i }))); + }); + function Od(e, t, i) { + let n = t instanceof T, + r = n ? i : t; + return new jd({ + type: 'tuple', + items: e, + rest: n ? t : null, + ...M.normalizeParams(r), + }); + } + var Fa = v('ZodRecord', (e, t) => { + (Ec.init(e, t), + R.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function zd(e, t, i) { + return new Fa({ + type: 'record', + keyType: e, + valueType: t, + ...M.normalizeParams(i), + }); + } + function Vy(e, t, i) { + let n = ge(e); + return ( + (n._zod.values = void 0), + new Fa({ + type: 'record', + keyType: n, + valueType: t, + ...M.normalizeParams(i), + }) + ); + } + var Nd = v('ZodMap', (e, t) => { + (Dc.init(e, t), + R.init(e, t), + (e.keyType = t.keyType), + (e.valueType = t.valueType)); + }); + function Fy(e, t, i) { + return new Nd({ + type: 'map', + keyType: e, + valueType: t, + ...M.normalizeParams(i), + }); + } + var Ud = v('ZodSet', (e, t) => { + (Tc.init(e, t), + R.init(e, t), + (e.min = (...i) => e.check(un(...i))), + (e.nonempty = (i) => e.check(un(1, i))), + (e.max = (...i) => e.check(mi(...i))), + (e.size = (...i) => e.check(oa(...i)))); + }); + function Wy(e, t) { + return new Ud({ type: 'set', valueType: e, ...M.normalizeParams(t) }); + } + var cn = v('ZodEnum', (e, t) => { + (Cc.init(e, t), + R.init(e, t), + (e.enum = t.entries), + (e.options = Object.values(t.entries))); + let i = new Set(Object.keys(t.entries)); + ((e.extract = (n, r) => { + let o = {}; + for (let s of n) { + if (!i.has(s)) throw new Error(`Key ${s} not found in enum`); + o[s] = t.entries[s]; + } + return new cn({ ...t, checks: [], ...M.normalizeParams(r), entries: o }); + }), + (e.exclude = (n, r) => { + let o = { ...t.entries }; + for (let s of n) { + if (!i.has(s)) throw new Error(`Key ${s} not found in enum`); + delete o[s]; + } + return new cn({ + ...t, + checks: [], + ...M.normalizeParams(r), + entries: o, + }); + })); + }); + function Wa(e, t) { + let i = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e; + return new cn({ type: 'enum', entries: i, ...M.normalizeParams(t) }); + } + function qy(e, t) { + return new cn({ type: 'enum', entries: e, ...M.normalizeParams(t) }); + } + var Pd = v('ZodLiteral', (e, t) => { + (Ac.init(e, t), + R.init(e, t), + (e.values = new Set(t.values)), + Object.defineProperty(e, 'value', { + get() { + if (t.values.length > 1) + throw new Error( + 'This schema contains multiple valid literal values. Use `.values` instead.', + ); + return t.values[0]; + }, + })); + }); + function By(e, t) { + return new Pd({ + type: 'literal', + values: Array.isArray(e) ? e : [e], + ...M.normalizeParams(t), + }); + } + var Ed = v('ZodFile', (e, t) => { + (Zc.init(e, t), + R.init(e, t), + (e.min = (i, n) => e.check(un(i, n))), + (e.max = (i, n) => e.check(mi(i, n))), + (e.mime = (i, n) => e.check(pa(Array.isArray(i) ? i : [i], n)))); + }); + function Gy(e) { + return Ml(Ed, e); + } + var Dd = v('ZodTransform', (e, t) => { + (Rc.init(e, t), + R.init(e, t), + (e._zod.parse = (i, n) => { + if (n.direction === 'backward') throw new si(e.constructor.name); + i.addIssue = (o) => { + if (typeof o == 'string') i.issues.push(M.issue(o, i.value, t)); + else { + let s = o; + (s.fatal && (s.continue = !1), + s.code != null || (s.code = 'custom'), + s.input != null || (s.input = i.value), + s.inst != null || (s.inst = e), + i.issues.push(M.issue(s))); + } + }; + let r = t.transform(i.value, i); + return r instanceof Promise + ? r.then((o) => ((i.value = o), i)) + : ((i.value = r), i); + })); + }); + function qa(e) { + return new Dd({ type: 'transform', transform: e }); + } + var Ba = v('ZodOptional', (e, t) => { + (Lc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function ri(e) { + return new Ba({ type: 'optional', innerType: e }); + } + var Td = v('ZodNullable', (e, t) => { + (Jc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function ai(e) { + return new Td({ type: 'nullable', innerType: e }); + } + function Ky(e) { + return ri(ai(e)); + } + var Cd = v('ZodDefault', (e, t) => { + (Mc.init(e, t), + R.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeDefault = e.unwrap)); + }); + function Ad(e, t) { + return new Cd({ + type: 'default', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : M.shallowClone(t); + }, + }); + } + var Zd = v('ZodPrefault', (e, t) => { + (Vc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Rd(e, t) { + return new Zd({ + type: 'prefault', + innerType: e, + get defaultValue() { + return typeof t == 'function' ? t() : M.shallowClone(t); + }, + }); + } + var Ga = v('ZodNonOptional', (e, t) => { + (Fc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Ld(e, t) { + return new Ga({ + type: 'nonoptional', + innerType: e, + ...M.normalizeParams(t), + }); + } + var Jd = v('ZodSuccess', (e, t) => { + (Wc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function Hy(e) { + return new Jd({ type: 'success', innerType: e }); + } + var Md = v('ZodCatch', (e, t) => { + (qc.init(e, t), + R.init(e, t), + (e.unwrap = () => e._zod.def.innerType), + (e.removeCatch = e.unwrap)); + }); + function Vd(e, t) { + return new Md({ + type: 'catch', + innerType: e, + catchValue: typeof t == 'function' ? t : () => t, + }); + } + var Fd = v('ZodNaN', (e, t) => { + (Bc.init(e, t), R.init(e, t)); + }); + function Xy(e) { + return Tl(Fd, e); + } + var Ka = v('ZodPipe', (e, t) => { + (Gc.init(e, t), R.init(e, t), (e.in = t.in), (e.out = t.out)); + }); + function oi(e, t) { + return new Ka({ type: 'pipe', in: e, out: t }); + } + var Ha = v('ZodCodec', (e, t) => { + (Ka.init(e, t), Cr.init(e, t)); + }); + function Yy(e, t, i) { + return new Ha({ + type: 'pipe', + in: e, + out: t, + transform: i.decode, + reverseTransform: i.encode, + }); + } + var Wd = v('ZodReadonly', (e, t) => { + (Kc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function qd(e) { + return new Wd({ type: 'readonly', innerType: e }); + } + var Bd = v('ZodTemplateLiteral', (e, t) => { + (Hc.init(e, t), R.init(e, t)); + }); + function Qy(e, t) { + return new Bd({ + type: 'template_literal', + parts: e, + ...M.normalizeParams(t), + }); + } + var Gd = v('ZodLazy', (e, t) => { + (Qc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.getter())); + }); + function Kd(e) { + return new Gd({ type: 'lazy', getter: e }); + } + var Hd = v('ZodPromise', (e, t) => { + (Yc.init(e, t), R.init(e, t), (e.unwrap = () => e._zod.def.innerType)); + }); + function e_(e) { + return new Hd({ type: 'promise', innerType: e }); + } + var Xd = v('ZodFunction', (e, t) => { + (Xc.init(e, t), R.init(e, t)); + }); + function Ss(e) { + var t, i; + return new Xd({ + type: 'function', + input: Array.isArray(e?.input) + ? Od(e?.input) + : (t = e?.input) != null + ? t + : _i(Jt()), + output: (i = e?.output) != null ? i : Jt(), + }); + } + var ki = v('ZodCustom', (e, t) => { + (el.init(e, t), R.init(e, t)); + }); + function t_(e) { + let t = new q({ check: 'custom' }); + return ((t._zod.check = e), t); + } + function n_(e, t) { + return Vl(ki, e ?? (() => !0), t); + } + function Yd(e, t = {}) { + return Fl(ki, e, t); + } + function Qd(e) { + return Wl(e); + } + function i_(e, t = { error: `Input not instance of ${e.name}` }) { + let i = new ki({ + type: 'custom', + check: 'custom', + fn: (n) => n instanceof e, + abort: !0, + ...M.normalizeParams(t), + }); + return ((i._zod.bag.Class = e), i); + } + var r_ = (...e) => Bl({ Codec: Ha, Boolean: bi, String: vi }, ...e); + function a_(e) { + let t = Kd(() => Va([ur(e), pd(), fd(), bd(), _i(t), zd(ur(), t)])); + return t; + } + function o_(e, t) { + return oi(qa(e), t); + } + var lr, + s_ = { + invalid_type: 'invalid_type', + too_big: 'too_big', + too_small: 'too_small', + invalid_format: 'invalid_format', + not_multiple_of: 'not_multiple_of', + unrecognized_keys: 'unrecognized_keys', + invalid_union: 'invalid_union', + invalid_key: 'invalid_key', + invalid_element: 'invalid_element', + invalid_value: 'invalid_value', + custom: 'custom', + }; + function u_(e) { + ie({ customError: e }); + } + function c_() { + return ie().customError; + } + lr || (lr = {}); + var em = {}; + function l_(e) { + return sl(vi, e); + } + function d_(e) { + return fl(hi, e); + } + function m_(e) { + return $l(bi, e); + } + function p_(e) { + return wl(yi, e); + } + function f_(e) { + return Dl(Ja, e); + } + (ve(em, { + bigint: () => p_, + boolean: () => m_, + date: () => f_, + number: () => d_, + string: () => l_, + }), + ie(tl())); + var v_ = Object.defineProperty, + wt = (e, t) => { + for (var i in t) v_(e, i, { get: t[i], enumerable: !0 }); + }; + function C(e, t, i = 'draft-7') { + return l.toJSONSchema(e, { target: i }); + } + var vt = l.string(), + g_ = l.number(), + ln = (l.boolean(), l.string().min(1)), + dr = l.number().int().positive(), + mr = l.number().int().nonnegative(), + tm = l.number().describe('Tagging version number'); + l.union([l.string(), l.number(), l.boolean()]).optional(); + wt( + {}, + { + ErrorHandlerSchema: () => St, + HandlerSchema: () => am, + LogHandlerSchema: () => Vt, + StorageSchema: () => rm, + StorageTypeSchema: () => im, + errorHandlerJsonSchema: () => y_, + handlerJsonSchema: () => $_, + logHandlerJsonSchema: () => __, + storageJsonSchema: () => b_, + storageTypeJsonSchema: () => h_, + }, + ); + var nm, + im = l + .enum(['local', 'session', 'cookie']) + .describe('Storage mechanism: local, session, or cookie'), + rm = l + .object({ + Local: l.literal('local'), + Session: l.literal('session'), + Cookie: l.literal('cookie'), + }) + .describe('Storage type constants for type-safe references'), + St = l.any().describe('Error handler function: (error, state?) => void'), + Vt = l.any().describe('Log handler function: (message, verbose?) => void'), + am = l + .object({ + Error: St.describe('Error handler function'), + Log: Vt.describe('Log handler function'), + }) + .describe('Handler interface with error and log functions'), + h_ = C(im), + b_ = C(rm), + y_ = C(St), + __ = C(Vt), + $_ = C(am); + (l + .object({ + onError: St.optional().describe( + 'Error handler function: (error, state?) => void', + ), + onLog: Vt.optional().describe( + 'Log handler function: (message, verbose?) => void', + ), + }) + .partial(), + l + .object({ + verbose: l + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + }) + .partial(), + l + .object({ + queue: l + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + }) + .partial(), + l.object({}).partial(), + l + .object({ + init: l + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: l + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + }) + .partial(), + l + .object({ + disabled: l.boolean().describe('Set to true to disable').optional(), + }) + .partial(), + l + .object({ + primary: l + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }) + .partial(), + l + .object({ + settings: l + .any() + .optional() + .describe('Implementation-specific configuration'), + }) + .partial(), + l + .object({ + env: l + .any() + .optional() + .describe('Environment dependencies (platform-specific)'), + }) + .partial(), + l + .object({ + type: l.string().optional().describe('Instance type identifier'), + config: l.unknown().describe('Instance configuration'), + }) + .partial(), + l + .object({ + collector: l.unknown().describe('Collector instance (runtime object)'), + config: l.unknown().describe('Configuration'), + env: l.unknown().describe('Environment dependencies'), + }) + .partial(), + l + .object({ + batch: l + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + batched: l + .unknown() + .optional() + .describe('Batch of events to be processed'), + }) + .partial(), + l + .object({ + ignore: l + .boolean() + .describe('Set to true to skip processing') + .optional(), + condition: l + .string() + .optional() + .describe('Condition function: return true to process'), + }) + .partial(), + l + .object({ + sources: l + .record(l.string(), l.unknown()) + .describe('Map of source instances'), + }) + .partial(), + l + .object({ + destinations: l + .record(l.string(), l.unknown()) + .describe('Map of destination instances'), + }) + .partial()); + wt( + {}, + { + ConsentSchema: () => Te, + DeepPartialEventSchema: () => k_, + EntitiesSchema: () => um, + EntitySchema: () => xi, + EventSchema: () => ke, + OrderedPropertiesSchema: () => Si, + PartialEventSchema: () => cm, + PropertiesSchema: () => ne, + PropertySchema: () => wi, + PropertyTypeSchema: () => pr, + SourceSchema: () => sm, + SourceTypeSchema: () => Xa, + UserSchema: () => kn, + VersionSchema: () => om, + consentJsonSchema: () => N_, + entityJsonSchema: () => O_, + eventJsonSchema: () => w_, + orderedPropertiesJsonSchema: () => j_, + partialEventJsonSchema: () => S_, + propertiesJsonSchema: () => I_, + sourceTypeJsonSchema: () => z_, + userJsonSchema: () => x_, + }, + ); + var pr = l.lazy(() => + l.union([l.boolean(), l.string(), l.number(), l.record(l.string(), wi)]), + ), + wi = l.lazy(() => l.union([pr, l.array(pr)])), + ne = l + .record(l.string(), wi.optional()) + .describe('Flexible property collection with optional values'), + Si = l + .record(l.string(), l.tuple([wi, l.number()]).optional()) + .describe( + 'Ordered properties with [value, order] tuples for priority control', + ), + Xa = l + .union([l.enum(['web', 'server', 'app', 'other']), l.string()]) + .describe('Source type: web, server, app, other, or custom'), + Te = l + .record(l.string(), l.boolean()) + .describe('Consent requirement mapping (group name → state)'), + kn = ne + .and( + l.object({ + id: l.string().optional().describe('User identifier'), + device: l.string().optional().describe('Device identifier'), + session: l.string().optional().describe('Session identifier'), + hash: l.string().optional().describe('Hashed identifier'), + address: l.string().optional().describe('User address'), + email: l.string().email().optional().describe('User email address'), + phone: l.string().optional().describe('User phone number'), + userAgent: l + .string() + .optional() + .describe('Browser user agent string'), + browser: l.string().optional().describe('Browser name'), + browserVersion: l.string().optional().describe('Browser version'), + deviceType: l + .string() + .optional() + .describe('Device type (mobile, desktop, tablet)'), + os: l.string().optional().describe('Operating system'), + osVersion: l.string().optional().describe('Operating system version'), + screenSize: l.string().optional().describe('Screen dimensions'), + language: l.string().optional().describe('User language'), + country: l.string().optional().describe('User country'), + region: l.string().optional().describe('User region/state'), + city: l.string().optional().describe('User city'), + zip: l.string().optional().describe('User postal code'), + timezone: l.string().optional().describe('User timezone'), + ip: l.string().optional().describe('User IP address'), + internal: l + .boolean() + .optional() + .describe('Internal user flag (employee, test user)'), + }), + ) + .describe('User identification and properties'), + om = ne + .and( + l.object({ + source: vt.describe('Walker implementation version (e.g., "2.0.0")'), + tagging: tm, + }), + ) + .describe('Walker version information'), + sm = ne + .and( + l.object({ + type: Xa.describe('Source type identifier'), + id: vt.describe('Source identifier (typically URL on web)'), + previous_id: vt.describe( + 'Previous source identifier (typically referrer on web)', + ), + }), + ) + .describe('Event source information'), + xi = l + .lazy(() => + l.object({ + entity: l.string().describe('Entity name'), + data: ne.describe('Entity-specific properties'), + nested: l.array(xi).describe('Nested child entities'), + context: Si.describe('Entity context data'), + }), + ) + .describe('Nested entity structure with recursive nesting support'), + um = l.array(xi).describe('Array of nested entities'), + ke = l + .object({ + name: l + .string() + .describe( + 'Event name in "entity action" format (e.g., "page view", "product add")', + ), + data: ne.describe('Event-specific properties'), + context: Si.describe('Ordered context properties with priorities'), + globals: ne.describe('Global properties shared across events'), + custom: ne.describe('Custom implementation-specific properties'), + user: kn.describe('User identification and attributes'), + nested: um.describe('Related nested entities'), + consent: Te.describe('Consent states at event time'), + id: ln.describe('Unique event identifier (timestamp-based)'), + trigger: vt.describe('Event trigger identifier'), + entity: vt.describe('Parsed entity from event name'), + action: vt.describe('Parsed action from event name'), + timestamp: dr.describe('Unix timestamp in milliseconds since epoch'), + timing: g_.describe('Event processing timing information'), + group: vt.describe('Event grouping identifier'), + count: mr.describe('Event count in session'), + version: om.describe('Walker version information'), + source: sm.describe('Event source information'), + }) + .describe('Complete walkerOS event structure'), + cm = ke + .partial() + .describe('Partial event structure with all fields optional'), + k_ = ke + .partial() + .describe('Partial event structure with all top-level fields optional'), + w_ = C(ke), + S_ = C(cm), + x_ = C(kn), + I_ = C(ne), + j_ = C(Si), + O_ = C(xi), + z_ = C(Xa), + N_ = C(Te); + wt( + {}, + { + ConfigSchema: () => Oi, + LoopSchema: () => Ya, + MapSchema: () => eo, + PolicySchema: () => Ft, + ResultSchema: () => U_, + RuleSchema: () => Ve, + RulesSchema: () => ji, + SetSchema: () => Qa, + ValueConfigSchema: () => lm, + ValueSchema: () => fe, + ValuesSchema: () => Ii, + configJsonSchema: () => L_, + loopJsonSchema: () => D_, + mapJsonSchema: () => C_, + policyJsonSchema: () => A_, + ruleJsonSchema: () => Z_, + rulesJsonSchema: () => R_, + setJsonSchema: () => T_, + valueConfigJsonSchema: () => E_, + valueJsonSchema: () => P_, + }, + ); + var fe = l.lazy(() => + l.union([ + l.string().describe('String value or property path (e.g., "data.id")'), + l.number().describe('Numeric value'), + l.boolean().describe('Boolean value'), + l.lazy(() => nm), + l.array(fe).describe('Array of values'), + ]), + ), + Ii = l.array(fe).describe('Array of transformation values'), + Ya = l.lazy(() => + l + .tuple([fe, fe]) + .describe( + 'Loop transformation: [source, transform] tuple for array processing', + ), + ), + Qa = l.lazy(() => + l.array(fe).describe('Set: Array of values for selection or combination'), + ), + eo = l.lazy(() => + l + .record(l.string(), fe) + .describe('Map: Object mapping keys to transformation values'), + ), + lm = (nm = l + .object({ + key: l + .string() + .optional() + .describe( + 'Property path to extract from event (e.g., "data.id", "user.email")', + ), + value: l + .union([l.string(), l.number(), l.boolean()]) + .optional() + .describe('Static primitive value'), + fn: l + .string() + .optional() + .describe('Custom transformation function as string (serialized)'), + map: eo + .optional() + .describe( + 'Object mapping: transform event data to structured output', + ), + loop: Ya.optional().describe( + 'Loop transformation: [source, transform] for array processing', + ), + set: Qa.optional().describe( + 'Set of values: combine or select from multiple values', + ), + consent: Te.optional().describe( + 'Required consent states to include this value', + ), + condition: l + .string() + .optional() + .describe( + 'Condition function as string: return true to include value', + ), + validate: l + .string() + .optional() + .describe( + 'Validation function as string: return true if value is valid', + ), + }) + .refine((e) => Object.keys(e).length > 0, { + message: 'ValueConfig must have at least one property', + }) + .describe('Value transformation configuration with multiple strategies')), + Ft = l + .record(l.string(), fe) + .describe('Policy rules for event pre-processing (key → value mapping)'), + Ve = l + .object({ + batch: l + .number() + .optional() + .describe('Batch size: bundle N events for batch processing'), + condition: l + .string() + .optional() + .describe( + 'Condition function as string: return true to process event', + ), + consent: Te.optional().describe( + 'Required consent states to process this event', + ), + settings: l + .any() + .optional() + .describe('Destination-specific settings for this event mapping'), + data: l + .union([fe, Ii]) + .optional() + .describe('Data transformation rules for event'), + ignore: l + .boolean() + .optional() + .describe('Set to true to skip processing this event'), + name: l + .string() + .optional() + .describe( + 'Custom event name override (e.g., "view_item" for "product view")', + ), + policy: Ft.optional().describe( + 'Event-level policy overrides (applied after config-level policy)', + ), + }) + .describe('Mapping rule for specific entity-action combination'), + ji = l + .record( + l.string(), + l.record(l.string(), l.union([Ve, l.array(Ve)])).optional(), + ) + .describe( + 'Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support', + ), + Oi = l + .object({ + consent: Te.optional().describe( + 'Required consent states to process any events', + ), + data: l + .union([fe, Ii]) + .optional() + .describe('Global data transformation applied to all events'), + mapping: ji.optional().describe('Entity-action specific mapping rules'), + policy: Ft.optional().describe( + 'Pre-processing policy rules applied before mapping', + ), + }) + .describe('Shared mapping configuration for sources and destinations'), + U_ = l + .object({ + eventMapping: Ve.optional().describe('Resolved mapping rule for event'), + mappingKey: l + .string() + .optional() + .describe('Mapping key used (e.g., "product.view")'), + }) + .describe('Mapping resolution result'), + P_ = C(fe), + E_ = C(lm), + D_ = C(Ya), + T_ = C(Qa), + C_ = C(eo), + A_ = C(Ft), + Z_ = C(Ve), + R_ = C(ji), + L_ = C(Oi); + wt( + {}, + { + BatchSchema: () => mm, + ConfigSchema: () => wn, + ContextSchema: () => no, + DLQSchema: () => G_, + DataSchema: () => F_, + DestinationPolicySchema: () => J_, + DestinationsSchema: () => q_, + InitDestinationsSchema: () => W_, + InitSchema: () => pm, + InstanceSchema: () => Sn, + PartialConfigSchema: () => to, + PushBatchContextSchema: () => M_, + PushContextSchema: () => io, + PushEventSchema: () => dm, + PushEventsSchema: () => V_, + PushResultSchema: () => B_, + RefSchema: () => Hn, + ResultSchema: () => fm, + batchJsonSchema: () => Q_, + configJsonSchema: () => K_, + contextJsonSchema: () => X_, + instanceJsonSchema: () => e$, + partialConfigJsonSchema: () => H_, + pushContextJsonSchema: () => Y_, + resultJsonSchema: () => t$, + }, + ); + var wn = l + .object({ + consent: Te.optional().describe( + 'Required consent states to send events to this destination', + ), + settings: l + .any() + .describe('Implementation-specific configuration') + .optional(), + data: l + .union([fe, Ii]) + .optional() + .describe( + 'Global data transformation applied to all events for this destination', + ), + env: l + .any() + .describe('Environment dependencies (platform-specific)') + .optional(), + id: ln + .describe( + 'Destination instance identifier (defaults to destination key)', + ) + .optional(), + init: l + .boolean() + .describe('Whether to initialize immediately') + .optional(), + loadScript: l + .boolean() + .describe('Whether to load external script (for web destinations)') + .optional(), + mapping: ji + .optional() + .describe( + 'Entity-action specific mapping rules for this destination', + ), + policy: Ft.optional().describe( + 'Pre-processing policy rules applied before event mapping', + ), + queue: l + .boolean() + .describe('Whether to queue events when consent is not granted') + .optional(), + verbose: l + .boolean() + .describe('Enable verbose logging for debugging') + .optional(), + onError: St.optional(), + onLog: Vt.optional(), + }) + .describe('Destination configuration'), + to = wn + .partial() + .describe('Partial destination configuration with all fields optional'), + J_ = Ft.describe('Destination policy rules for event pre-processing'), + no = l + .object({ + collector: l.unknown().describe('Collector instance (runtime object)'), + config: wn.describe('Destination configuration'), + data: l + .union([l.unknown(), l.array(l.unknown())]) + .optional() + .describe('Transformed event data'), + env: l.unknown().describe('Environment dependencies'), + }) + .describe('Destination context for init and push functions'), + io = no + .extend({ + mapping: Ve.optional().describe( + 'Resolved mapping rule for this specific event', + ), + }) + .describe('Push context with event-specific mapping'), + M_ = io.describe('Batch push context with event-specific mapping'), + dm = l + .object({ + event: ke.describe('The event to process'), + mapping: Ve.optional().describe('Mapping rule for this event'), + }) + .describe('Event with optional mapping for batch processing'), + V_ = l.array(dm).describe('Array of events with mappings'), + mm = l + .object({ + key: l + .string() + .describe('Batch key (usually mapping key like "product.view")'), + events: l.array(ke).describe('Array of events in batch'), + data: l + .array(l.union([l.unknown(), l.array(l.unknown())]).optional()) + .describe('Transformed data for each event'), + mapping: Ve.optional().describe('Shared mapping rule for batch'), + }) + .describe('Batch of events grouped by mapping key'), + F_ = l + .union([l.unknown(), l.array(l.unknown())]) + .optional() + .describe('Transformed event data (Property, undefined, or array)'), + Sn = l + .object({ + config: wn.describe('Destination configuration'), + queue: l + .array(ke) + .optional() + .describe('Queued events awaiting consent'), + dlq: l + .array(l.tuple([ke, l.unknown()])) + .optional() + .describe('Dead letter queue (failed events with errors)'), + type: l.string().optional().describe('Destination type identifier'), + env: l.unknown().optional().describe('Environment dependencies'), + init: l.unknown().optional().describe('Initialization function'), + push: l.unknown().describe('Push function for single events'), + pushBatch: l.unknown().optional().describe('Batch push function'), + on: l.unknown().optional().describe('Event lifecycle hook function'), + }) + .describe('Destination instance (runtime object with functions)'), + pm = l + .object({ + code: Sn.describe('Destination instance with implementation'), + config: to.optional().describe('Partial configuration overrides'), + env: l.unknown().optional().describe('Partial environment overrides'), + }) + .describe('Destination initialization configuration'), + W_ = l + .record(l.string(), pm) + .describe('Map of destination IDs to initialization configurations'), + q_ = l + .record(l.string(), Sn) + .describe('Map of destination IDs to runtime instances'), + Hn = l + .object({ + id: l.string().describe('Destination ID'), + destination: Sn.describe('Destination instance'), + }) + .describe('Destination reference (ID + instance)'), + B_ = l + .object({ + queue: l + .array(ke) + .optional() + .describe('Events queued (awaiting consent)'), + error: l.unknown().optional().describe('Error if push failed'), + }) + .describe('Push operation result'), + fm = l + .object({ + successful: l + .array(Hn) + .describe('Destinations that processed successfully'), + queued: l.array(Hn).describe('Destinations that queued events'), + failed: l.array(Hn).describe('Destinations that failed to process'), + }) + .describe('Overall destination processing result'), + G_ = l + .array(l.tuple([ke, l.unknown()])) + .describe('Dead letter queue: [(event, error), ...]'), + K_ = C(wn), + H_ = C(to), + X_ = C(no), + Y_ = C(io), + Q_ = C(mm), + e$ = C(Sn), + t$ = C(fm); + wt( + {}, + { + CommandTypeSchema: () => vm, + ConfigSchema: () => zi, + DestinationsSchema: () => ym, + InitConfigSchema: () => gm, + InstanceSchema: () => _m, + PushContextSchema: () => hm, + SessionDataSchema: () => ro, + SourcesSchema: () => bm, + commandTypeJsonSchema: () => n$, + configJsonSchema: () => i$, + initConfigJsonSchema: () => a$, + instanceJsonSchema: () => s$, + pushContextJsonSchema: () => o$, + sessionDataJsonSchema: () => r$, + }, + ); + var vm = l + .union([ + l.enum([ + 'action', + 'config', + 'consent', + 'context', + 'destination', + 'elb', + 'globals', + 'hook', + 'init', + 'link', + 'run', + 'user', + 'walker', + ]), + l.string(), + ]) + .describe( + 'Collector command type: standard commands or custom string for extensions', + ), + zi = l + .object({ + run: l + .boolean() + .describe('Whether to run collector automatically on initialization') + .optional(), + tagging: tm, + globalsStatic: ne.describe( + 'Static global properties that persist across collector runs', + ), + sessionStatic: l + .record(l.string(), l.unknown()) + .describe('Static session data that persists across collector runs'), + verbose: l.boolean().describe('Enable verbose logging for debugging'), + onError: St.optional(), + onLog: Vt.optional(), + }) + .describe('Core collector configuration'), + ro = ne + .and( + l.object({ + isStart: l.boolean().describe('Whether this is a new session start'), + storage: l.boolean().describe('Whether storage is available'), + id: ln.describe('Session identifier').optional(), + start: dr.describe('Session start timestamp').optional(), + marketing: l + .literal(!0) + .optional() + .describe('Marketing attribution flag'), + updated: dr.describe('Last update timestamp').optional(), + isNew: l + .boolean() + .describe('Whether this is a new session') + .optional(), + device: ln.describe('Device identifier').optional(), + count: mr.describe('Event count in session').optional(), + runs: mr.describe('Number of runs').optional(), + }), + ) + .describe('Session state and tracking data'), + gm = zi + .partial() + .extend({ + consent: Te.optional().describe('Initial consent state'), + user: kn.optional().describe('Initial user data'), + globals: ne.optional().describe('Initial global properties'), + sources: l.unknown().optional().describe('Source configurations'), + destinations: l + .unknown() + .optional() + .describe('Destination configurations'), + custom: ne + .optional() + .describe('Initial custom implementation-specific properties'), + }) + .describe('Collector initialization configuration with initial state'), + hm = l + .object({ + mapping: Oi.optional().describe('Source-level mapping configuration'), + }) + .describe('Push context with optional source mapping'), + bm = l + .record(l.string(), l.unknown()) + .describe('Map of source IDs to source instances'), + ym = l + .record(l.string(), l.unknown()) + .describe('Map of destination IDs to destination instances'), + _m = l + .object({ + push: l.unknown().describe('Push function for processing events'), + command: l.unknown().describe('Command function for walker commands'), + allowed: l.boolean().describe('Whether event processing is allowed'), + config: zi.describe('Current collector configuration'), + consent: Te.describe('Current consent state'), + count: l.number().describe('Event count (increments with each event)'), + custom: ne.describe('Custom implementation-specific properties'), + sources: bm.describe('Registered source instances'), + destinations: ym.describe('Registered destination instances'), + globals: ne.describe('Current global properties'), + group: l.string().describe('Event grouping identifier'), + hooks: l.unknown().describe('Lifecycle hook functions'), + on: l.unknown().describe('Event lifecycle configuration'), + queue: l.array(ke).describe('Queued events awaiting processing'), + round: l + .number() + .describe('Collector run count (increments with each run)'), + session: l.union([ro]).describe('Current session state'), + timing: l.number().describe('Event processing timing information'), + user: kn.describe('Current user data'), + version: l.string().describe('Walker implementation version'), + }) + .describe('Collector instance with state and methods'), + n$ = C(vm), + i$ = C(zi), + r$ = C(ro), + a$ = C(gm), + o$ = C(hm), + s$ = C(_m); + wt( + {}, + { + BaseEnvSchema: () => Ni, + ConfigSchema: () => Ui, + InitSchema: () => km, + InitSourceSchema: () => oo, + InitSourcesSchema: () => wm, + InstanceSchema: () => $m, + PartialConfigSchema: () => ao, + baseEnvJsonSchema: () => u$, + configJsonSchema: () => c$, + initSourceJsonSchema: () => m$, + initSourcesJsonSchema: () => p$, + instanceJsonSchema: () => d$, + partialConfigJsonSchema: () => l$, + }, + ); + var Ni = l + .object({ + push: l.unknown().describe('Collector push function'), + command: l.unknown().describe('Collector command function'), + sources: l + .unknown() + .optional() + .describe('Map of registered source instances'), + elb: l + .unknown() + .describe('Public API function (alias for collector.push)'), + }) + .catchall(l.unknown()) + .describe( + 'Base environment for dependency injection - platform-specific sources extend this', + ), + Ui = Oi.extend({ + settings: l + .any() + .describe('Implementation-specific configuration') + .optional(), + env: Ni.optional().describe( + 'Environment dependencies (platform-specific)', + ), + id: ln.describe('Source identifier (defaults to source key)').optional(), + onError: St.optional(), + disabled: l.boolean().describe('Set to true to disable').optional(), + primary: l + .boolean() + .describe('Mark as primary (only one can be primary)') + .optional(), + }).describe('Source configuration with mapping and environment'), + ao = Ui.partial().describe( + 'Partial source configuration with all fields optional', + ), + $m = l + .object({ + type: l + .string() + .describe('Source type identifier (e.g., "browser", "dataLayer")'), + config: Ui.describe('Current source configuration'), + push: l + .any() + .describe( + 'Push function - THE HANDLER (flexible signature for platform compatibility)', + ), + destroy: l + .any() + .optional() + .describe('Cleanup function called when source is removed'), + on: l + .unknown() + .optional() + .describe('Lifecycle hook function for event types'), + }) + .describe('Source instance with push handler and lifecycle methods'), + km = l + .any() + .describe( + 'Source initialization function: (config, env) => Instance | Promise', + ), + oo = l + .object({ + code: km.describe('Source initialization function'), + config: ao.optional().describe('Partial configuration overrides'), + env: Ni.partial().optional().describe('Partial environment overrides'), + primary: l + .boolean() + .optional() + .describe('Mark as primary source (only one can be primary)'), + }) + .describe('Source initialization configuration'), + wm = l + .record(l.string(), oo) + .describe('Map of source IDs to initialization configurations'), + u$ = C(Ni), + c$ = C(Ui), + l$ = C(ao), + d$ = C($m), + m$ = C(oo), + p$ = C(wm); + wt( + {}, + { + ConfigSchema: () => xn, + DestinationReferenceSchema: () => uo, + PrimitiveSchema: () => Sm, + SetupSchema: () => Pi, + SourceReferenceSchema: () => so, + configJsonSchema: () => y$, + destinationReferenceJsonSchema: () => $$, + parseConfig: () => g$, + parseSetup: () => f$, + safeParseConfig: () => h$, + safeParseSetup: () => v$, + setupJsonSchema: () => b$, + sourceReferenceJsonSchema: () => _$, + }, + ); + var Sm = l + .union([l.string(), l.number(), l.boolean()]) + .describe('Primitive value: string, number, or boolean'), + so = l + .object({ + package: l + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")', + ), + config: l + .unknown() + .optional() + .describe('Source-specific configuration object'), + env: l + .unknown() + .optional() + .describe('Source environment configuration'), + primary: l + .boolean() + .optional() + .describe( + 'Mark as primary source (provides main elb). Only one source should be primary.', + ), + }) + .describe('Source package reference with configuration'), + uo = l + .object({ + package: l + .string() + .min(1, 'Package name cannot be empty') + .describe( + 'Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")', + ), + config: l + .unknown() + .optional() + .describe('Destination-specific configuration object'), + env: l + .unknown() + .optional() + .describe('Destination environment configuration'), + }) + .describe('Destination package reference with configuration'), + xn = l + .object({ + platform: l + .enum(['web', 'server'], { + error: 'Platform must be "web" or "server"', + }) + .describe( + 'Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection', + ), + sources: l + .record(l.string(), so) + .optional() + .describe( + 'Source configurations (data capture) keyed by unique identifier', + ), + destinations: l + .record(l.string(), uo) + .optional() + .describe( + 'Destination configurations (data output) keyed by unique identifier', + ), + collector: l + .unknown() + .optional() + .describe( + 'Collector configuration for event processing (uses Collector.InitConfig)', + ), + env: l + .record(l.string(), l.string()) + .optional() + .describe( + 'Environment-specific variables (override root-level variables)', + ), + }) + .passthrough() + .describe('Single environment configuration for one deployment target'), + Pi = l + .object({ + version: l + .literal(1, { error: 'Only version 1 is currently supported' }) + .describe( + 'Configuration schema version (currently only 1 is supported)', + ), + $schema: l + .string() + .url('Schema URL must be a valid URL') + .optional() + .describe( + 'JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")', + ), + variables: l + .record(l.string(), Sm) + .optional() + .describe( + 'Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)', + ), + definitions: l + .record(l.string(), l.unknown()) + .optional() + .describe( + 'Reusable configuration definitions (reference with JSON Schema $ref syntax)', + ), + environments: l + .record(l.string(), xn) + .refine((e) => Object.keys(e).length > 0, { + message: 'At least one environment is required', + }) + .describe( + 'Named environment configurations (e.g., web_prod, server_stage)', + ), + }) + .describe( + 'Complete multi-environment walkerOS configuration (walkeros.config.json)', + ); + function f$(e) { + return Pi.parse(e); + } + function v$(e) { + return Pi.safeParse(e); + } + function g$(e) { + return xn.parse(e); + } + function h$(e) { + return xn.safeParse(e); + } + var b$ = l.toJSONSchema(Pi, { target: 'draft-7' }), + y$ = C(xn), + _$ = C(so), + $$ = C(uo); + function xm(e) { + return l.toJSONSchema(e, { target: 'draft-7' }); + } + var k$ = { merge: !0, shallow: !0, extend: !0 }; + function Im(e, t = {}, i = {}) { + i = { ...k$, ...i }; + let n = Object.entries(t).reduce((r, [o, s]) => { + let u = e[o]; + return ( + i.merge && Array.isArray(u) && Array.isArray(s) + ? (r[o] = s.reduce((a, c) => (a.includes(c) ? a : [...a, c]), [...u])) + : (i.extend || o in e) && (r[o] = s), + r + ); + }, {}); + return i.shallow ? { ...e, ...n } : (Object.assign(e, n), e); + } + function w$(e = 'entity action', t = {}) { + let i = t.timestamp || new Date().setHours(0, 13, 37, 0), + n = { + data: { + id: 'ers', + name: 'Everyday Ruck Snack', + color: 'black', + size: 'l', + price: 420, + }, + }, + r = { data: { id: 'cc', name: 'Cool Cap', size: 'one size', price: 42 } }; + return (function (o = {}) { + var s; + let u = o.timestamp || new Date().setHours(0, 13, 37, 0), + a = o.group || 'gr0up', + c = o.count || 1, + m = Im( + { + name: 'entity action', + data: { + string: 'foo', + number: 1, + boolean: !0, + array: [0, 'text', !1], + not: void 0, + }, + context: { dev: ['test', 1] }, + globals: { lang: 'elb' }, + custom: { completely: 'random' }, + user: { id: 'us3r', device: 'c00k13', session: 's3ss10n' }, + nested: [ + { + entity: 'child', + data: { is: 'subordinated' }, + nested: [], + context: { element: ['child', 0] }, + }, + ], + consent: { functional: !0 }, + id: `${u}-${a}-${c}`, + trigger: 'test', + entity: 'entity', + action: 'action', + timestamp: u, + timing: 3.14, + group: a, + count: c, + version: { source: '0.3.1', tagging: 1 }, + source: { + type: 'web', + id: 'https://localhost:80', + previous_id: 'http://remotehost:9001', + }, + }, + o, + { merge: !1 }, + ); + if (o.name) { + let [p, f] = (s = o.name.split(' ')) != null ? s : []; + p && f && ((m.entity = p), (m.action = f)); + } + return m; + })({ + ...{ + 'cart view': { + data: { currency: 'EUR', value: 2 * n.data.price }, + context: { shopping: ['cart', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + data: { ...n.data, quantity: 2 }, + context: { shopping: ['cart', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'checkout view': { + data: { + step: 'payment', + currency: 'EUR', + value: n.data.price + r.data.price, + }, + context: { shopping: ['checkout', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + ...n, + context: { shopping: ['checkout', 0] }, + nested: [], + }, + { + entity: 'product', + ...r, + context: { shopping: ['checkout', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'order complete': { + data: { + id: '0rd3r1d', + currency: 'EUR', + shipping: 5.22, + taxes: 73.76, + total: 555, + }, + context: { shopping: ['complete', 0] }, + globals: { pagegroup: 'shop' }, + nested: [ + { + entity: 'product', + ...n, + context: { shopping: ['complete', 0] }, + nested: [], + }, + { + entity: 'product', + ...r, + context: { shopping: ['complete', 0] }, + nested: [], + }, + { + entity: 'gift', + data: { name: 'Surprise' }, + context: { shopping: ['complete', 0] }, + nested: [], + }, + ], + trigger: 'load', + }, + 'page view': { + data: { + domain: 'www.example.com', + title: 'walkerOS documentation', + referrer: 'https://www.elbwalker.com/', + search: '?foo=bar', + hash: '#hash', + id: '/docs/', + }, + globals: { pagegroup: 'docs' }, + trigger: 'load', + }, + 'product add': { + ...n, + context: { shopping: ['intent', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'click', + }, + 'product view': { + ...n, + context: { shopping: ['detail', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'load', + }, + 'product visible': { + data: { ...n.data, position: 3, promo: !0 }, + context: { shopping: ['discover', 0] }, + globals: { pagegroup: 'shop' }, + nested: [], + trigger: 'load', + }, + 'promotion visible': { + data: { name: 'Setting up tracking easily', position: 'hero' }, + context: { ab_test: ['engagement', 0] }, + globals: { pagegroup: 'homepage' }, + trigger: 'visible', + }, + 'session start': { + data: { + id: 's3ss10n', + start: i, + isNew: !0, + count: 1, + runs: 1, + isStart: !0, + storage: !0, + referrer: '', + device: 'c00k13', + }, + user: { + id: 'us3r', + device: 'c00k13', + session: 's3ss10n', + hash: 'h4sh', + address: 'street number', + email: 'user@example.com', + phone: '+49 123 456 789', + userAgent: 'Mozilla...', + browser: 'Chrome', + browserVersion: '90', + deviceType: 'desktop', + language: 'de-DE', + country: 'DE', + region: 'HH', + city: 'Hamburg', + zip: '20354', + timezone: 'Berlin', + os: 'walkerOS', + osVersion: '1.0', + screenSize: '1337x420', + ip: '127.0.0.0', + internal: !0, + custom: 'value', + }, + }, + }[e], + ...t, + name: e, + }); + } + function xs(e, t, i) { + return function (...n) { + try { + return e(...n); + } catch (r) { + return t ? t(r) : void 0; + } finally { + i?.(); + } + }; + } + function nr(e) { + return e === void 0 || + (function (t, i) { + return typeof t == typeof i; + })(e, '') + ? e + : JSON.stringify(e); + } + function Is(e = {}) { + return Im({ 'Content-Type': 'application/json; charset=utf-8' }, e); + } + function S$(e, t, i = { transport: 'fetch' }) { + switch (i.transport || 'fetch') { + case 'beacon': + return (function (n, r) { + let o = nr(r), + s = navigator.sendBeacon(n, o); + return { ok: s, error: s ? void 0 : 'Failed to send beacon' }; + })(e, t); + case 'xhr': + return (function (n, r, o = {}) { + let s = Is(o.headers), + u = o.method || 'POST', + a = nr(r); + return xs( + () => { + let c = new XMLHttpRequest(); + c.open(u, n, !1); + for (let p in s) c.setRequestHeader(p, s[p]); + c.send(a); + let m = c.status >= 200 && c.status < 300; + return { + ok: m, + data: xs(JSON.parse, () => c.response)(c.response), + error: m ? void 0 : `${c.status} ${c.statusText}`, + }; + }, + (c) => ({ ok: !1, error: c.message }), + )(); + })(e, t, i); + default: + return (async function (n, r, o = {}) { + let s = Is(o.headers), + u = nr(r); + return (function (a, c, m) { + return async function (...p) { + try { + return await a(...p); + } catch (f) { + return c ? await c(f) : void 0; + } finally { + await m?.(); + } + }; + })( + async () => { + let a = await fetch(n, { + method: o.method || 'POST', + headers: s, + keepalive: !0, + credentials: o.credentials || 'same-origin', + mode: o.noCors ? 'no-cors' : 'cors', + body: u, + }), + c = o.noCors ? '' : await a.text(); + return { ok: a.ok, data: c, error: a.ok ? void 0 : a.statusText }; + }, + (a) => ({ ok: !1, error: a.message }), + )(); + })(e, t, i); + } + } + var x$ = {}; + ve(x$, { env: () => jm, events: () => Om, mapping: () => zm }); + var jm = {}; + ve(jm, { init: () => I$, push: () => j$, simulation: () => O$ }); + var I$ = { sendWeb: void 0 }, + j$ = { sendWeb: Object.assign(() => {}, {}) }, + O$ = ['call:sendWeb'], + Om = {}; + function z$() { + let e = w$('entity action'); + return JSON.stringify(e.data); + } + ve(Om, { entity_action: () => z$ }); + var zm = {}; + ve(zm, { config: () => N$, entity_action: () => Nm }); + var Nm = { data: 'data' }, + N$ = { entity: { action: Nm } }, + U$ = {}; + ve(U$, { + MappingSchema: () => Pm, + SettingsSchema: () => Um, + mapping: () => E$, + settings: () => P$, + }); + var Um = l.object({ + url: l + .string() + .url() + .describe( + 'The HTTP endpoint URL to send events to (like https://api.example.com/events)', + ), + headers: l + .record(l.string(), l.string()) + .describe( + "Additional HTTP headers to include with requests (like { 'Authorization': 'Bearer token', 'Content-Type': 'application/json' })", + ) + .optional(), + method: l + .string() + .default('POST') + .describe('HTTP method for the request'), + transform: l + .any() + .describe( + 'Function to transform event data before sending (like (data, config, mapping) => JSON.stringify(data))', + ) + .optional(), + transport: l + .enum(['fetch', 'xhr', 'beacon']) + .default('fetch') + .describe('Transport method for sending requests'), + }), + Pm = l.object({}), + P$ = xm(Um), + E$ = xm(Pm), + Em = { + type: 'api', + config: {}, + push(e, { config: t, mapping: i, data: n, env: r }) { + let { settings: o } = t, + { + url: s, + headers: u, + method: a, + transform: c, + transport: m = 'fetch', + } = o || {}; + if (!s) return; + let p = n !== void 0 ? n : e, + f = c ? c(p, t, i) : JSON.stringify(p); + (r?.sendWeb || S$)(s, f, { headers: u, method: a, transport: m }); + }, + }; + async function D$(e = {}) { + let { tracker: t } = e, + i = t, + n = typeof globalThis.window < 'u' ? globalThis.window : void 0, + r = typeof globalThis.document < 'u' ? globalThis.document : void 0; + return await ts({ + sources: { + demo: { + code: rs, + config: { + settings: { + events: [ + { + name: 'page view', + data: { title: 'Home', path: '/' }, + delay: 0, + }, + { + name: 'product view', + data: { id: 'P123', name: 'Test Product', price: 99.99 }, + delay: 100, + }, + ], + }, + }, + }, + }, + destinations: { + demo: { code: us, config: { settings: { name: 'demo' } } }, + api: { + code: Em, + config: { settings: { url: 'http://localhost:8080/collect' } }, + }, + }, + run: !0, + globals: { language: 'en' }, + }); + } + return Rm(T$); +})(); diff --git a/packages/docker/demos/demo-serve.mjs b/packages/docker/demos/demo-serve.mjs deleted file mode 100644 index dec9b1289..000000000 --- a/packages/docker/demos/demo-serve.mjs +++ /dev/null @@ -1,8629 +0,0 @@ -"use strict"; -var walkerOS = (() => { - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - - // entry.js - var entry_exports = {}; - __export(entry_exports, { - default: () => entry_default - }); - - // node_modules/zod/v3/external.js - var external_exports = {}; - __export(external_exports, { - BRAND: () => BRAND, - DIRTY: () => DIRTY, - EMPTY_PATH: () => EMPTY_PATH, - INVALID: () => INVALID, - NEVER: () => NEVER, - OK: () => OK, - ParseStatus: () => ParseStatus, - Schema: () => ZodType, - ZodAny: () => ZodAny, - ZodArray: () => ZodArray, - ZodBigInt: () => ZodBigInt, - ZodBoolean: () => ZodBoolean, - ZodBranded: () => ZodBranded, - ZodCatch: () => ZodCatch, - ZodDate: () => ZodDate, - ZodDefault: () => ZodDefault, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodEffects: () => ZodEffects, - ZodEnum: () => ZodEnum, - ZodError: () => ZodError, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, - ZodFunction: () => ZodFunction, - ZodIntersection: () => ZodIntersection, - ZodIssueCode: () => ZodIssueCode, - ZodLazy: () => ZodLazy, - ZodLiteral: () => ZodLiteral, - ZodMap: () => ZodMap, - ZodNaN: () => ZodNaN, - ZodNativeEnum: () => ZodNativeEnum, - ZodNever: () => ZodNever, - ZodNull: () => ZodNull, - ZodNullable: () => ZodNullable, - ZodNumber: () => ZodNumber, - ZodObject: () => ZodObject, - ZodOptional: () => ZodOptional, - ZodParsedType: () => ZodParsedType, - ZodPipeline: () => ZodPipeline, - ZodPromise: () => ZodPromise, - ZodReadonly: () => ZodReadonly, - ZodRecord: () => ZodRecord, - ZodSchema: () => ZodType, - ZodSet: () => ZodSet, - ZodString: () => ZodString, - ZodSymbol: () => ZodSymbol, - ZodTransformer: () => ZodEffects, - ZodTuple: () => ZodTuple, - ZodType: () => ZodType, - ZodUndefined: () => ZodUndefined, - ZodUnion: () => ZodUnion, - ZodUnknown: () => ZodUnknown, - ZodVoid: () => ZodVoid, - addIssueToContext: () => addIssueToContext, - any: () => anyType, - array: () => arrayType, - bigint: () => bigIntType, - boolean: () => booleanType, - coerce: () => coerce, - custom: () => custom, - date: () => dateType, - datetimeRegex: () => datetimeRegex, - defaultErrorMap: () => en_default, - discriminatedUnion: () => discriminatedUnionType, - effect: () => effectsType, - enum: () => enumType, - function: () => functionType, - getErrorMap: () => getErrorMap, - getParsedType: () => getParsedType, - instanceof: () => instanceOfType, - intersection: () => intersectionType, - isAborted: () => isAborted, - isAsync: () => isAsync, - isDirty: () => isDirty, - isValid: () => isValid, - late: () => late, - lazy: () => lazyType, - literal: () => literalType, - makeIssue: () => makeIssue, - map: () => mapType, - nan: () => nanType, - nativeEnum: () => nativeEnumType, - never: () => neverType, - null: () => nullType, - nullable: () => nullableType, - number: () => numberType, - object: () => objectType, - objectUtil: () => objectUtil, - oboolean: () => oboolean, - onumber: () => onumber, - optional: () => optionalType, - ostring: () => ostring, - pipeline: () => pipelineType, - preprocess: () => preprocessType, - promise: () => promiseType, - quotelessJson: () => quotelessJson, - record: () => recordType, - set: () => setType, - setErrorMap: () => setErrorMap, - strictObject: () => strictObjectType, - string: () => stringType, - symbol: () => symbolType, - transformer: () => effectsType, - tuple: () => tupleType, - undefined: () => undefinedType, - union: () => unionType, - unknown: () => unknownType, - util: () => util, - void: () => voidType - }); - - // node_modules/zod/v3/helpers/util.js - var util; - (function(util2) { - util2.assertEqual = (_4) => { - }; - function assertIs(_arg) { - } - util2.assertIs = assertIs; - function assertNever(_x) { - throw new Error(); - } - util2.assertNever = assertNever; - util2.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util2.getValidEnumValues = (obj) => { - const validKeys = util2.objectKeys(obj).filter((k3) => typeof obj[obj[k3]] !== "number"); - const filtered = {}; - for (const k3 of validKeys) { - filtered[k3] = obj[k3]; - } - return util2.objectValues(filtered); - }; - util2.objectValues = (obj) => { - return util2.objectKeys(obj).map(function(e14) { - return obj[e14]; - }); - }; - util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => { - const keys = []; - for (const key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - keys.push(key); - } - } - return keys; - }; - util2.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return void 0; - }; - util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues(array, separator = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator); - } - util2.joinValues = joinValues; - util2.jsonStringifyReplacer = (_4, value) => { - if (typeof value === "bigint") { - return value.toString(); - } - return value; - }; - })(util || (util = {})); - var objectUtil; - (function(objectUtil2) { - objectUtil2.mergeShapes = (first, second) => { - return { - ...first, - ...second - // second overwrites first - }; - }; - })(objectUtil || (objectUtil = {})); - var ZodParsedType = util.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" - ]); - var getParsedType = (data) => { - const t12 = typeof data; - switch (t12) { - case "undefined": - return ZodParsedType.undefined; - case "string": - return ZodParsedType.string; - case "number": - return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; - case "boolean": - return ZodParsedType.boolean; - case "function": - return ZodParsedType.function; - case "bigint": - return ZodParsedType.bigint; - case "symbol": - return ZodParsedType.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType.array; - } - if (data === null) { - return ZodParsedType.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType.date; - } - return ZodParsedType.object; - default: - return ZodParsedType.unknown; - } - }; - - // node_modules/zod/v3/ZodError.js - var ZodIssueCode = util.arrayToEnum([ - "invalid_type", - "invalid_literal", - "custom", - "invalid_union", - "invalid_union_discriminator", - "invalid_enum_value", - "unrecognized_keys", - "invalid_arguments", - "invalid_return_type", - "invalid_date", - "invalid_string", - "too_small", - "too_big", - "invalid_intersection_types", - "not_multiple_of", - "not_finite" - ]); - var quotelessJson = (obj) => { - const json = JSON.stringify(obj, null, 2); - return json.replace(/"([^"]+)":/g, "$1:"); - }; - var ZodError = class _ZodError extends Error { - get errors() { - return this.issues; - } - constructor(issues) { - super(); - this.issues = []; - this.addIssue = (sub) => { - this.issues = [...this.issues, sub]; - }; - this.addIssues = (subs = []) => { - this.issues = [...this.issues, ...subs]; - }; - const actualProto = new.target.prototype; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, actualProto); - } else { - this.__proto__ = actualProto; - } - this.name = "ZodError"; - this.issues = issues; - } - format(_mapper) { - const mapper = _mapper || function(issue) { - return issue.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error) => { - for (const issue of error.issues) { - if (issue.code === "invalid_union") { - issue.unionErrors.map(processError); - } else if (issue.code === "invalid_return_type") { - processError(issue.returnTypeError); - } else if (issue.code === "invalid_arguments") { - processError(issue.argumentsError); - } else if (issue.path.length === 0) { - fieldErrors._errors.push(mapper(issue)); - } else { - let curr = fieldErrors; - let i4 = 0; - while (i4 < issue.path.length) { - const el = issue.path[i4]; - const terminal = i4 === issue.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue)); - } - curr = curr[el]; - i4++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value) { - if (!(value instanceof _ZodError)) { - throw new Error(`Not a ZodError: ${value}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue) => issue.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } - }; - ZodError.create = (issues) => { - const error = new ZodError(issues); - return error; - }; - - // node_modules/zod/v3/locales/en.js - var errorMap = (issue, _ctx) => { - let message; - switch (issue.code) { - case ZodIssueCode.invalid_type: - if (issue.received === ZodParsedType.undefined) { - message = "Required"; - } else { - message = `Expected ${issue.expected}, received ${issue.received}`; - } - break; - case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`; - break; - case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`; - break; - case ZodIssueCode.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`; - break; - case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`; - break; - case ZodIssueCode.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode.invalid_string: - if (typeof issue.validation === "object") { - if ("includes" in issue.validation) { - message = `Invalid input: must include "${issue.validation.includes}"`; - if (typeof issue.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`; - } - } else if ("startsWith" in issue.validation) { - message = `Invalid input: must start with "${issue.validation.startsWith}"`; - } else if ("endsWith" in issue.validation) { - message = `Invalid input: must end with "${issue.validation.endsWith}"`; - } else { - util.assertNever(issue.validation); - } - } else if (issue.validation !== "regex") { - message = `Invalid ${issue.validation}`; - } else { - message = "Invalid"; - } - break; - case ZodIssueCode.too_small: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "bigint") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.too_big: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "bigint") - message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.custom: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue.multipleOf}`; - break; - case ZodIssueCode.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util.assertNever(issue); - } - return { message }; - }; - var en_default = errorMap; - - // node_modules/zod/v3/errors.js - var overrideErrorMap = en_default; - function setErrorMap(map) { - overrideErrorMap = map; - } - function getErrorMap() { - return overrideErrorMap; - } - - // node_modules/zod/v3/helpers/parseUtil.js - var makeIssue = (params) => { - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...issueData.path || []]; - const fullIssue = { - ...issueData, - path: fullPath - }; - if (issueData.message !== void 0) { - return { - ...issueData, - path: fullPath, - message: issueData.message - }; - } - let errorMessage = ""; - const maps = errorMaps.filter((m2) => !!m2).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage - }; - }; - var EMPTY_PATH = []; - function addIssueToContext(ctx, issueData) { - const overrideMap = getErrorMap(); - const issue = makeIssue({ - issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - // contextual error map is first priority - ctx.schemaErrorMap, - // then schema-bound map if available - overrideMap, - // then global override map - overrideMap === en_default ? void 0 : en_default - // then global default map - ].filter((x3) => !!x3) - }); - ctx.common.issues.push(issue); - } - var ParseStatus = class _ParseStatus { - constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") - this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") - this.value = "aborted"; - } - static mergeArray(status, results) { - const arrayValue = []; - for (const s5 of results) { - if (s5.status === "aborted") - return INVALID; - if (s5.status === "dirty") - status.dirty(); - arrayValue.push(s5.value); - } - return { status: status.value, value: arrayValue }; - } - static async mergeObjectAsync(status, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value - }); - } - return _ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value } = pair; - if (key.status === "aborted") - return INVALID; - if (value.status === "aborted") - return INVALID; - if (key.status === "dirty") - status.dirty(); - if (value.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value.value; - } - } - return { status: status.value, value: finalObject }; - } - }; - var INVALID = Object.freeze({ - status: "aborted" - }); - var DIRTY = (value) => ({ status: "dirty", value }); - var OK = (value) => ({ status: "valid", value }); - var isAborted = (x3) => x3.status === "aborted"; - var isDirty = (x3) => x3.status === "dirty"; - var isValid = (x3) => x3.status === "valid"; - var isAsync = (x3) => typeof Promise !== "undefined" && x3 instanceof Promise; - - // node_modules/zod/v3/helpers/errorUtil.js - var errorUtil; - (function(errorUtil2) { - errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message; - })(errorUtil || (errorUtil = {})); - - // node_modules/zod/v3/types.js - var ParseInputLazyPath = class { - constructor(parent, value, path, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value; - this._path = path; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } - }; - var handleResult = (ctx, result) => { - if (isValid(result)) { - return { success: true, data: result.value }; - } else { - if (!ctx.common.issues.length) { - throw new Error("Validation failed but no issues detected."); - } - return { - success: false, - get error() { - if (this._error) - return this._error; - const error = new ZodError(ctx.common.issues); - this._error = error; - return this._error; - } - }; - } - }; - function processCreateParams(params) { - if (!params) - return {}; - const { errorMap: errorMap2, invalid_type_error, required_error, description } = params; - if (errorMap2 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap2) - return { errorMap: errorMap2, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; - } - var ZodType = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync(result)) { - throw new Error("Synchronous parse encountered promise."); - } - return result; - } - _parseAsync(input) { - const result = this._parse(input); - return Promise.resolve(result); - } - parse(data, params) { - const result = this.safeParse(data, params); - if (result.success) - return result.data; - throw result.error; - } - safeParse(data, params) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - if (!this["~standard"].async) { - try { - const result = this._parseSync({ data, path: [], parent: ctx }); - return isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }; - } catch (err) { - if (err?.message?.toLowerCase()?.includes("encountered")) { - this["~standard"].async = true; - } - ctx.common = { - issues: [], - async: true - }; - } - } - return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }); - } - async parseAsync(data, params) { - const result = await this.safeParseAsync(data, params); - if (result.success) - return result.data; - throw result.error; - } - async safeParseAsync(data, params) { - const ctx = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } else if (typeof message === "function") { - return message(val); - } else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode.custom, - ...getIssueProperties(val) - }); - if (typeof Promise !== "undefined" && result instanceof Promise) { - return result.then((data) => { - if (!data) { - setError(); - return false; - } else { - return true; - } - }); - } - if (!result) { - setError(); - return false; - } else { - return true; - } - }); - } - refinement(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects({ - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "refinement", refinement } - }); - } - superRefine(refinement) { - return this._refinement(refinement); - } - constructor(def) { - this.spa = this.safeParseAsync; - this._def = def; - this.parse = this.parse.bind(this); - this.safeParse = this.safeParse.bind(this); - this.parseAsync = this.parseAsync.bind(this); - this.safeParseAsync = this.safeParseAsync.bind(this); - this.spa = this.spa.bind(this); - this.refine = this.refine.bind(this); - this.refinement = this.refinement.bind(this); - this.superRefine = this.superRefine.bind(this); - this.optional = this.optional.bind(this); - this.nullable = this.nullable.bind(this); - this.nullish = this.nullish.bind(this); - this.array = this.array.bind(this); - this.promise = this.promise.bind(this); - this.or = this.or.bind(this); - this.and = this.and.bind(this); - this.transform = this.transform.bind(this); - this.brand = this.brand.bind(this); - this.default = this.default.bind(this); - this.catch = this.catch.bind(this); - this.describe = this.describe.bind(this); - this.pipe = this.pipe.bind(this); - this.readonly = this.readonly.bind(this); - this.isNullable = this.isNullable.bind(this); - this.isOptional = this.isOptional.bind(this); - this["~standard"] = { - version: 1, - vendor: "zod", - validate: (data) => this["~validate"](data) - }; - } - optional() { - return ZodOptional.create(this, this._def); - } - nullable() { - return ZodNullable.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray.create(this); - } - promise() { - return ZodPromise.create(this, this._def); - } - or(option) { - return ZodUnion.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects({ - ...processCreateParams(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "transform", transform } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault({ - ...processCreateParams(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind.ZodDefault - }); - } - brand() { - return new ZodBranded({ - typeName: ZodFirstPartyTypeKind.ZodBranded, - type: this, - ...processCreateParams(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch({ - ...processCreateParams(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline.create(this, target); - } - readonly() { - return ZodReadonly.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - var cuidRegex = /^c[^\s-]{8,}$/i; - var cuid2Regex = /^[0-9a-z]+$/; - var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; - var nanoidRegex = /^[a-z0-9_-]{21}$/i; - var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; - var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; - var emojiRegex; - var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; - var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; - var dateRegex = new RegExp(`^${dateRegexSource}$`); - function timeRegexSource(args) { - let secondsRegexSource = `[0-5]\\d`; - if (args.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`; - } else if (args.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; - } - function timeRegex(args) { - return new RegExp(`^${timeRegexSource(args)}$`); - } - function datetimeRegex(args) { - let regex = `${dateRegexSource}T${timeRegexSource(args)}`; - const opts = []; - opts.push(args.local ? `Z?` : `Z`); - if (args.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex = `${regex}(${opts.join("|")})`; - return new RegExp(`^${regex}$`); - } - function isValidIP(ip, version) { - if ((version === "v4" || !version) && ipv4Regex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6Regex.test(ip)) { - return true; - } - return false; - } - function isValidJWT(jwt, alg) { - if (!jwtRegex.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base64)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } catch { - return false; - } - } - function isValidCidr(ip, version) { - if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) { - return true; - } - return false; - } - var ZodString = class _ZodString extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.string) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.string, - received: ctx2.parsedType - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } else if (tooSmall) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } - status.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "email", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex) { - emojiRegex = new RegExp(_emojiRegex, "u"); - } - if (!emojiRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "emoji", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "uuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "nanoid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid2", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ulid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "url") { - try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "regex", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "trim") { - input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "datetime") { - const regex = datetimeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "datetime", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "date") { - const regex = dateRegex; - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "date", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "time") { - const regex = timeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "time", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "duration", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ip", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "jwt", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cidr", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex, validation, message) { - return this.refinement((data) => regex.test(data), { - validation, - code: ZodIssueCode.invalid_string, - ...errorUtil.errToObj(message) - }); - } - _addCheck(check) { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil.errToObj(options?.message) - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) }); - } - regex(regex, message) { - return this._addCheck({ - kind: "regex", - regex, - ...errorUtil.errToObj(message) - }); - } - includes(value, options) { - return this._addCheck({ - kind: "includes", - value, - position: options?.position, - ...errorUtil.errToObj(options?.message) - }); - } - startsWith(value, message) { - return this._addCheck({ - kind: "startsWith", - value, - ...errorUtil.errToObj(message) - }); - } - endsWith(value, message) { - return this._addCheck({ - kind: "endsWith", - value, - ...errorUtil.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil.errToObj(message)); - } - trim() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toUpperCase" }] - }); - } - get isDatetime() { - return !!this._def.checks.find((ch) => ch.kind === "datetime"); - } - get isDate() { - return !!this._def.checks.find((ch) => ch.kind === "date"); - } - get isTime() { - return !!this._def.checks.find((ch) => ch.kind === "time"); - } - get isDuration() { - return !!this._def.checks.find((ch) => ch.kind === "duration"); - } - get isEmail() { - return !!this._def.checks.find((ch) => ch.kind === "email"); - } - get isURL() { - return !!this._def.checks.find((ch) => ch.kind === "url"); - } - get isEmoji() { - return !!this._def.checks.find((ch) => ch.kind === "emoji"); - } - get isUUID() { - return !!this._def.checks.find((ch) => ch.kind === "uuid"); - } - get isNANOID() { - return !!this._def.checks.find((ch) => ch.kind === "nanoid"); - } - get isCUID() { - return !!this._def.checks.find((ch) => ch.kind === "cuid"); - } - get isCUID2() { - return !!this._def.checks.find((ch) => ch.kind === "cuid2"); - } - get isULID() { - return !!this._def.checks.find((ch) => ch.kind === "ulid"); - } - get isIP() { - return !!this._def.checks.find((ch) => ch.kind === "ip"); - } - get isCIDR() { - return !!this._def.checks.find((ch) => ch.kind === "cidr"); - } - get isBase64() { - return !!this._def.checks.find((ch) => ch.kind === "base64"); - } - get isBase64url() { - return !!this._def.checks.find((ch) => ch.kind === "base64url"); - } - get minLength() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxLength() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodString.create = (params) => { - return new ZodString({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - function floatSafeRemainder(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; - } - var ZodNumber = class _ZodNumber extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - this.step = this.multipleOf; - } - _parse(input) { - if (this._def.coerce) { - input.data = Number(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.number) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.number, - received: ctx2.parsedType - }); - return INVALID; - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_finite, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new _ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value, - message: errorUtil.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - get isInt() { - return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); - } - get isFinite() { - let max = null; - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { - return true; - } else if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } else if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return Number.isFinite(min) && Number.isFinite(max); - } - }; - ZodNumber.create = (params) => { - return new ZodNumber({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - var ZodBigInt = class _ZodBigInt extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } catch { - return this._getInvalidInput(input); - } - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.bigint) { - return this._getInvalidInput(input); - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.bigint, - received: ctx.parsedType - }); - return INVALID; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new _ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodBigInt.create = (params) => { - return new ZodBigInt({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - var ZodBoolean = class extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.boolean, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodBoolean.create = (params) => { - return new ZodBoolean({ - typeName: ZodFirstPartyTypeKind.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - var ZodDate = class _ZodDate extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.date) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.date, - received: ctx2.parsedType - }); - return INVALID; - } - if (Number.isNaN(input.data.getTime())) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_date - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new _ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil.toString(message) - }); - } - get minDate() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min != null ? new Date(min) : null; - } - get maxDate() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max != null ? new Date(max) : null; - } - }; - ZodDate.create = (params) => { - return new ZodDate({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind.ZodDate, - ...processCreateParams(params) - }); - }; - var ZodSymbol = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.symbol, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodSymbol.create = (params) => { - return new ZodSymbol({ - typeName: ZodFirstPartyTypeKind.ZodSymbol, - ...processCreateParams(params) - }); - }; - var ZodUndefined = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.undefined, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodUndefined.create = (params) => { - return new ZodUndefined({ - typeName: ZodFirstPartyTypeKind.ZodUndefined, - ...processCreateParams(params) - }); - }; - var ZodNull = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.null, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodNull.create = (params) => { - return new ZodNull({ - typeName: ZodFirstPartyTypeKind.ZodNull, - ...processCreateParams(params) - }); - }; - var ZodAny = class extends ZodType { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodAny.create = (params) => { - return new ZodAny({ - typeName: ZodFirstPartyTypeKind.ZodAny, - ...processCreateParams(params) - }); - }; - var ZodUnknown = class extends ZodType { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodUnknown.create = (params) => { - return new ZodUnknown({ - typeName: ZodFirstPartyTypeKind.ZodUnknown, - ...processCreateParams(params) - }); - }; - var ZodNever = class extends ZodType { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.never, - received: ctx.parsedType - }); - return INVALID; - } - }; - ZodNever.create = (params) => { - return new ZodNever({ - typeName: ZodFirstPartyTypeKind.ZodNever, - ...processCreateParams(params) - }); - }; - var ZodVoid = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.void, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodVoid.create = (params) => { - return new ZodVoid({ - typeName: ZodFirstPartyTypeKind.ZodVoid, - ...processCreateParams(params) - }); - }; - var ZodArray = class _ZodArray extends ZodType { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext(ctx, { - code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, - minimum: tooSmall ? def.exactLength.value : void 0, - maximum: tooBig ? def.exactLength.value : void 0, - type: "array", - inclusive: true, - exact: true, - message: def.exactLength.message - }); - status.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message - }); - status.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message - }); - status.dirty(); - } - } - if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i4) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i4)); - })).then((result2) => { - return ParseStatus.mergeArray(status, result2); - }); - } - const result = [...ctx.data].map((item, i4) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i4)); - }); - return ParseStatus.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new _ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil.toString(message) } - }); - } - max(maxLength, message) { - return new _ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil.toString(message) } - }); - } - length(len, message) { - return new _ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil.toString(message) } - }); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodArray.create = (schema, params) => { - return new ZodArray({ - type: schema, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind.ZodArray, - ...processCreateParams(params) - }); - }; - function deepPartialify(schema) { - if (schema instanceof ZodObject) { - const newShape = {}; - for (const key in schema.shape) { - const fieldSchema = schema.shape[key]; - newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); - } - return new ZodObject({ - ...schema._def, - shape: () => newShape - }); - } else if (schema instanceof ZodArray) { - return new ZodArray({ - ...schema._def, - type: deepPartialify(schema.element) - }); - } else if (schema instanceof ZodOptional) { - return ZodOptional.create(deepPartialify(schema.unwrap())); - } else if (schema instanceof ZodNullable) { - return ZodNullable.create(deepPartialify(schema.unwrap())); - } else if (schema instanceof ZodTuple) { - return ZodTuple.create(schema.items.map((item) => deepPartialify(item))); - } else { - return schema; - } - } - var ZodObject = class _ZodObject extends ZodType { - constructor() { - super(...arguments); - this._cached = null; - this.nonstrict = this.passthrough; - this.augment = this.extend; - } - _getCached() { - if (this._cached !== null) - return this._cached; - const shape = this._def.shape(); - const keys = util.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.object) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx2.parsedType - }); - return INVALID; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") { - for (const key of extraKeys) { - pairs.push({ - key: { status: "valid", value: key }, - value: { status: "valid", value: ctx.data[key] } - }); - } - } else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext(ctx, { - code: ZodIssueCode.unrecognized_keys, - keys: extraKeys - }); - status.dirty(); - } - } else if (unknownKeys === "strip") { - } else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); - } - } else { - const catchall = this._def.catchall; - for (const key of extraKeys) { - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse( - new ParseInputLazyPath(ctx, value, ctx.path, key) - //, ctx.child(key), value, getParsedType(value) - ), - alwaysSet: key in ctx.data - }); - } - } - if (ctx.common.async) { - return Promise.resolve().then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus.mergeObjectSync(status, syncPairs); - }); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil.errToObj; - return new _ZodObject({ - ...this._def, - unknownKeys: "strict", - ...message !== void 0 ? { - errorMap: (issue, ctx) => { - const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError; - if (issue.code === "unrecognized_keys") - return { - message: errorUtil.errToObj(message).message ?? defaultError - }; - return { - message: defaultError - }; - } - } : {} - }); - } - strip() { - return new _ZodObject({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new _ZodObject({ - ...this._def, - unknownKeys: "passthrough" - }); - } - // const AugmentFactory = - // (def: Def) => - // ( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, Augmentation>, - // Def["unknownKeys"], - // Def["catchall"] - // > => { - // return new ZodObject({ - // ...def, - // shape: () => ({ - // ...def.shape(), - // ...augmentation, - // }), - // }) as any; - // }; - extend(augmentation) { - return new _ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation - }) - }); - } - /** - * Prior to zod@1.0.12 there was a bug in the - * inferred type of merged objects. Please - * upgrade if you are experiencing issues. - */ - merge(merging) { - const merged = new _ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind.ZodObject - }); - return merged; - } - // merge< - // Incoming extends AnyZodObject, - // Augmentation extends Incoming["shape"], - // NewOutput extends { - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }, - // NewInput extends { - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // } - // >( - // merging: Incoming - // ): ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"], - // NewOutput, - // NewInput - // > { - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - setKey(key, schema) { - return this.augment({ [key]: schema }); - } - // merge( - // merging: Incoming - // ): //ZodObject = (merging) => { - // ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"] - // > { - // // const mergedShape = objectUtil.mergeShapes( - // // this._def.shape(), - // // merging._def.shape() - // // ); - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - catchall(index) { - return new _ZodObject({ - ...this._def, - catchall: index - }); - } - pick(mask) { - const shape = {}; - for (const key of util.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key of util.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify(this); - } - partial(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } else { - newShape[key] = fieldSchema.optional(); - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum(util.objectKeys(this.shape)); - } - }; - ZodObject.create = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.strictCreate = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.lazycreate = (shape, params) => { - return new ZodObject({ - shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - var ZodUnion = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const options = this._def.options; - function handleResults(results) { - for (const result of results) { - if (result.result.status === "valid") { - return result.result; - } - } - for (const result of results) { - if (result.result.status === "dirty") { - ctx.common.issues.push(...result.ctx.common.issues); - return result.result; - } - } - const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - if (ctx.common.async) { - return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }), - ctx: childCtx - }; - })).then(handleResults); - } else { - let dirty = void 0; - const issues = []; - for (const option of options) { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }); - if (result.status === "valid") { - return result; - } else if (result.status === "dirty" && !dirty) { - dirty = { result, ctx: childCtx }; - } - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues); - } - } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues2) => new ZodError(issues2)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - } - get options() { - return this._def.options; - } - }; - ZodUnion.create = (types, params) => { - return new ZodUnion({ - options: types, - typeName: ZodFirstPartyTypeKind.ZodUnion, - ...processCreateParams(params) - }); - }; - var getDiscriminator = (type) => { - if (type instanceof ZodLazy) { - return getDiscriminator(type.schema); - } else if (type instanceof ZodEffects) { - return getDiscriminator(type.innerType()); - } else if (type instanceof ZodLiteral) { - return [type.value]; - } else if (type instanceof ZodEnum) { - return type.options; - } else if (type instanceof ZodNativeEnum) { - return util.objectValues(type.enum); - } else if (type instanceof ZodDefault) { - return getDiscriminator(type._def.innerType); - } else if (type instanceof ZodUndefined) { - return [void 0]; - } else if (type instanceof ZodNull) { - return [null]; - } else if (type instanceof ZodOptional) { - return [void 0, ...getDiscriminator(type.unwrap())]; - } else if (type instanceof ZodNullable) { - return [null, ...getDiscriminator(type.unwrap())]; - } else if (type instanceof ZodBranded) { - return getDiscriminator(type.unwrap()); - } else if (type instanceof ZodReadonly) { - return getDiscriminator(type.unwrap()); - } else if (type instanceof ZodCatch) { - return getDiscriminator(type._def.innerType); - } else { - return []; - } - }; - var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID; - } - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - /** - * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. - * However, it only allows a union of objects, all of which need to share a discriminator property. This property must - * have a different value for each object in the union. - * @param discriminator the name of the discriminator property - * @param types an array of object schemas - * @param params - */ - static create(discriminator, options, params) { - const optionsMap = /* @__PURE__ */ new Map(); - for (const type of options) { - const discriminatorValues = getDiscriminator(type.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value of discriminatorValues) { - if (optionsMap.has(value)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); - } - optionsMap.set(value, type); - } - } - return new _ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams(params) - }); - } - }; - function mergeValues(a5, b2) { - const aType = getParsedType(a5); - const bType = getParsedType(b2); - if (a5 === b2) { - return { valid: true, data: a5 }; - } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { - const bKeys = util.objectKeys(b2); - const sharedKeys = util.objectKeys(a5).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a5, ...b2 }; - for (const key of sharedKeys) { - const sharedValue = mergeValues(a5[key], b2[key]); - if (!sharedValue.valid) { - return { valid: false }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { - if (a5.length !== b2.length) { - return { valid: false }; - } - const newArray = []; - for (let index = 0; index < a5.length; index++) { - const itemA = a5[index]; - const itemB = b2[index]; - const sharedValue = mergeValues(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a5 === +b2) { - return { valid: true, data: a5 }; - } else { - return { valid: false }; - } - } - var ZodIntersection = class extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted(parsedLeft) || isAborted(parsedRight)) { - return INVALID; - } - const merged = mergeValues(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_intersection_types - }); - return INVALID; - } - if (isDirty(parsedLeft) || isDirty(parsedRight)) { - status.dirty(); - } - return { status: status.value, value: merged.data }; - }; - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }) - ]).then(([left, right]) => handleParsed(left, right)); - } else { - return handleParsed(this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - })); - } - } - }; - ZodIntersection.create = (left, right, params) => { - return new ZodIntersection({ - left, - right, - typeName: ZodFirstPartyTypeKind.ZodIntersection, - ...processCreateParams(params) - }); - }; - var ZodTuple = class _ZodTuple extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status.dirty(); - } - const items = [...ctx.data].map((item, itemIndex) => { - const schema = this._def.items[itemIndex] || this._def.rest; - if (!schema) - return null; - return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }).filter((x3) => !!x3); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus.mergeArray(status, results); - }); - } else { - return ParseStatus.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new _ZodTuple({ - ...this._def, - rest - }); - } - }; - ZodTuple.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple({ - items: schemas, - typeName: ZodFirstPartyTypeKind.ZodTuple, - rest: null, - ...processCreateParams(params) - }); - }; - var ZodRecord = class _ZodRecord extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (ctx.common.async) { - return ParseStatus.mergeObjectAsync(status, pairs); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType) { - return new _ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(third) - }); - } - return new _ZodRecord({ - keyType: ZodString.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(second) - }); - } - }; - var ZodMap = class extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.map) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.map, - received: ctx.parsedType - }); - return INVALID; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value], index) => { - return { - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])) - }; - }); - if (ctx.common.async) { - const finalMap = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - }); - } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key = pair.key; - const value = pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - } - } - }; - ZodMap.create = (keyType, valueType, params) => { - return new ZodMap({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind.ZodMap, - ...processCreateParams(params) - }); - }; - var ZodSet = class _ZodSet extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.set) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.set, - received: ctx.parsedType - }); - return INVALID; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message - }); - status.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message - }); - status.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements2) { - const parsedSet = /* @__PURE__ */ new Set(); - for (const element of elements2) { - if (element.status === "aborted") - return INVALID; - if (element.status === "dirty") - status.dirty(); - parsedSet.add(element.value); - } - return { status: status.value, value: parsedSet }; - } - const elements = [...ctx.data.values()].map((item, i4) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i4))); - if (ctx.common.async) { - return Promise.all(elements).then((elements2) => finalizeSet(elements2)); - } else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new _ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil.toString(message) } - }); - } - max(maxSize, message) { - return new _ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil.toString(message) } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodSet.create = (valueType, params) => { - return new ZodSet({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind.ZodSet, - ...processCreateParams(params) - }); - }; - var ZodFunction = class _ZodFunction extends ZodType { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.function) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.function, - received: ctx.parsedType - }); - return INVALID; - } - function makeArgsIssue(args, error) { - return makeIssue({ - data: args, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3), - issueData: { - code: ZodIssueCode.invalid_arguments, - argumentsError: error - } - }); - } - function makeReturnsIssue(returns, error) { - return makeIssue({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3), - issueData: { - code: ZodIssueCode.invalid_return_type, - returnTypeError: error - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise) { - const me3 = this; - return OK(async function(...args) { - const error = new ZodError([]); - const parsedArgs = await me3._def.args.parseAsync(args, params).catch((e14) => { - error.addIssue(makeArgsIssue(args, e14)); - throw error; - }); - const result = await Reflect.apply(fn2, this, parsedArgs); - const parsedReturns = await me3._def.returns._def.type.parseAsync(result, params).catch((e14) => { - error.addIssue(makeReturnsIssue(result, e14)); - throw error; - }); - return parsedReturns; - }); - } else { - const me3 = this; - return OK(function(...args) { - const parsedArgs = me3._def.args.safeParse(args, params); - if (!parsedArgs.success) { - throw new ZodError([makeArgsIssue(args, parsedArgs.error)]); - } - const result = Reflect.apply(fn2, this, parsedArgs.data); - const parsedReturns = me3._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); - } - return parsedReturns.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new _ZodFunction({ - ...this._def, - args: ZodTuple.create(items).rest(ZodUnknown.create()) - }); - } - returns(returnType) { - return new _ZodFunction({ - ...this._def, - returns: returnType - }); - } - implement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - strictImplement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - static create(args, returns, params) { - return new _ZodFunction({ - args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()), - returns: returns || ZodUnknown.create(), - typeName: ZodFirstPartyTypeKind.ZodFunction, - ...processCreateParams(params) - }); - } - }; - var ZodLazy = class extends ZodType { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - const lazySchema = this._def.getter(); - return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); - } - }; - ZodLazy.create = (getter, params) => { - return new ZodLazy({ - getter, - typeName: ZodFirstPartyTypeKind.ZodLazy, - ...processCreateParams(params) - }); - }; - var ZodLiteral = class extends ZodType { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_literal, - expected: this._def.value - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } - }; - ZodLiteral.create = (value, params) => { - return new ZodLiteral({ - value, - typeName: ZodFirstPartyTypeKind.ZodLiteral, - ...processCreateParams(params) - }); - }; - function createZodEnum(values, params) { - return new ZodEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodEnum, - ...processCreateParams(params) - }); - } - var ZodEnum = class _ZodEnum extends ZodType { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Values() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - extract(values, newDef = this._def) { - return _ZodEnum.create(values, { - ...this._def, - ...newDef - }); - } - exclude(values, newDef = this._def) { - return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef - }); - } - }; - ZodEnum.create = createZodEnum; - var ZodNativeEnum = class extends ZodType { - _parse(input) { - const nativeEnumValues = util.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(util.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get enum() { - return this._def.values; - } - }; - ZodNativeEnum.create = (values, params) => { - return new ZodNativeEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodNativeEnum, - ...processCreateParams(params) - }); - }; - var ZodPromise = class extends ZodType { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.promise, - received: ctx.parsedType - }); - return INVALID; - } - const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); - return OK(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } - }; - ZodPromise.create = (schema, params) => { - return new ZodPromise({ - type: schema, - typeName: ZodFirstPartyTypeKind.ZodPromise, - ...processCreateParams(params) - }); - }; - var ZodEffects = class extends ZodType { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext(ctx, arg); - if (arg.fatal) { - status.abort(); - } else { - status.dirty(); - } - }, - get path() { - return ctx.path; - } - }; - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); - if (effect.type === "preprocess") { - const processed = effect.transform(ctx.data, checkCtx); - if (ctx.common.async) { - return Promise.resolve(processed).then(async (processed2) => { - if (status.value === "aborted") - return INVALID; - const result = await this._def.schema._parseAsync({ - data: processed2, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - }); - } else { - if (status.value === "aborted") - return INVALID; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - } - } - if (effect.type === "refinement") { - const executeRefinement = (acc) => { - const result = effect.refinement(acc, checkCtx); - if (ctx.common.async) { - return Promise.resolve(result); - } - if (result instanceof Promise) { - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - } - return acc; - }; - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - executeRefinement(inner.value); - return { status: status.value, value: inner.value }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value }; - }); - }); - } - } - if (effect.type === "transform") { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (!isValid(base)) - return INVALID; - const result = effect.transform(base.value, checkCtx); - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); - } - return { status: status.value, value: result }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { - if (!isValid(base)) - return INVALID; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result - })); - }); - } - } - util.assertNever(effect); - } - }; - ZodEffects.create = (schema, effect, params) => { - return new ZodEffects({ - schema, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect, - ...processCreateParams(params) - }); - }; - ZodEffects.createWithPreprocess = (preprocess, schema, params) => { - return new ZodEffects({ - schema, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind.ZodEffects, - ...processCreateParams(params) - }); - }; - var ZodOptional = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.undefined) { - return OK(void 0); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodOptional.create = (type, params) => { - return new ZodOptional({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodOptional, - ...processCreateParams(params) - }); - }; - var ZodNullable = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.null) { - return OK(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodNullable.create = (type, params) => { - return new ZodNullable({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodNullable, - ...processCreateParams(params) - }); - }; - var ZodDefault = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - removeDefault() { - return this._def.innerType; - } - }; - ZodDefault.create = (type, params) => { - return new ZodDefault({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams(params) - }); - }; - var ZodCatch = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - } - }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { - ...newCtx - } - }); - if (isAsync(result)) { - return result.then((result2) => { - return { - status: "valid", - value: result2.status === "valid" ? result2.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - } else { - return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - } - removeCatch() { - return this._def.innerType; - } - }; - ZodCatch.create = (type, params) => { - return new ZodCatch({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams(params) - }); - }; - var ZodNaN = class extends ZodType { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.nan, - received: ctx.parsedType - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - }; - ZodNaN.create = (params) => { - return new ZodNaN({ - typeName: ZodFirstPartyTypeKind.ZodNaN, - ...processCreateParams(params) - }); - }; - var BRAND = Symbol("zod_brand"); - var ZodBranded = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - unwrap() { - return this._def.type; - } - }; - var ZodPipeline = class _ZodPipeline extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY(inResult.value); - } else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - }; - return handleAsync(); - } else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return { - status: "dirty", - value: inResult.value - }; - } else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - } - } - static create(a5, b2) { - return new _ZodPipeline({ - in: a5, - out: b2, - typeName: ZodFirstPartyTypeKind.ZodPipeline - }); - } - }; - var ZodReadonly = class extends ZodType { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } - }; - ZodReadonly.create = (type, params) => { - return new ZodReadonly({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodReadonly, - ...processCreateParams(params) - }); - }; - function cleanParams(params, data) { - const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const p22 = typeof p2 === "string" ? { message: p2 } : p2; - return p22; - } - function custom(check, _params = {}, fatal) { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - const r3 = check(data); - if (r3 instanceof Promise) { - return r3.then((r4) => { - if (!r4) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r3) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny.create(); - } - var late = { - object: ZodObject.lazycreate - }; - var ZodFirstPartyTypeKind; - (function(ZodFirstPartyTypeKind2) { - ZodFirstPartyTypeKind2["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind2["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind2["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind2["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind2["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind2["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind2["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind2["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind2["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind2["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind2["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind2["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind2["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind2["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind2["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind2["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind2["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind2["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind2["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind2["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind2["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind2["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind2["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind2["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind2["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind2["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind2["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind2["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind2["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind2["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind2["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind2["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly"; - })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); - var instanceOfType = (cls, params = { - message: `Input not instance of ${cls.name}` - }) => custom((data) => data instanceof cls, params); - var stringType = ZodString.create; - var numberType = ZodNumber.create; - var nanType = ZodNaN.create; - var bigIntType = ZodBigInt.create; - var booleanType = ZodBoolean.create; - var dateType = ZodDate.create; - var symbolType = ZodSymbol.create; - var undefinedType = ZodUndefined.create; - var nullType = ZodNull.create; - var anyType = ZodAny.create; - var unknownType = ZodUnknown.create; - var neverType = ZodNever.create; - var voidType = ZodVoid.create; - var arrayType = ZodArray.create; - var objectType = ZodObject.create; - var strictObjectType = ZodObject.strictCreate; - var unionType = ZodUnion.create; - var discriminatedUnionType = ZodDiscriminatedUnion.create; - var intersectionType = ZodIntersection.create; - var tupleType = ZodTuple.create; - var recordType = ZodRecord.create; - var mapType = ZodMap.create; - var setType = ZodSet.create; - var functionType = ZodFunction.create; - var lazyType = ZodLazy.create; - var literalType = ZodLiteral.create; - var enumType = ZodEnum.create; - var nativeEnumType = ZodNativeEnum.create; - var promiseType = ZodPromise.create; - var effectsType = ZodEffects.create; - var optionalType = ZodOptional.create; - var nullableType = ZodNullable.create; - var preprocessType = ZodEffects.createWithPreprocess; - var pipelineType = ZodPipeline.create; - var ostring = () => stringType().optional(); - var onumber = () => numberType().optional(); - var oboolean = () => booleanType().optional(); - var coerce = { - string: (arg) => ZodString.create({ ...arg, coerce: true }), - number: (arg) => ZodNumber.create({ ...arg, coerce: true }), - boolean: (arg) => ZodBoolean.create({ - ...arg, - coerce: true - }), - bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }), - date: (arg) => ZodDate.create({ ...arg, coerce: true }) - }; - var NEVER = INVALID; - - // node_modules/zod-to-json-schema/dist/esm/Options.js - var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); - var defaultOptions = { - name: void 0, - $refStrategy: "root", - basePath: ["#"], - effectStrategy: "input", - pipeStrategy: "all", - dateStrategy: "format:date-time", - mapStrategy: "entries", - removeAdditionalStrategy: "passthrough", - allowedAdditionalProperties: true, - rejectedAdditionalProperties: false, - definitionPath: "definitions", - target: "jsonSchema7", - strictUnions: false, - definitions: {}, - errorMessages: false, - markdownDescription: false, - patternStrategy: "escape", - applyRegexFlags: false, - emailStrategy: "format:email", - base64Strategy: "contentEncoding:base64", - nameStrategy: "ref", - openAiAnyTypeName: "OpenAiAnyType" - }; - var getDefaultOptions = (options) => typeof options === "string" ? { - ...defaultOptions, - name: options - } : { - ...defaultOptions, - ...options - }; - - // node_modules/zod-to-json-schema/dist/esm/Refs.js - var getRefs = (options) => { - const _options = getDefaultOptions(options); - const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; - return { - ..._options, - flags: { hasReferencedOpenAiAnyType: false }, - currentPath, - propertyPath: void 0, - seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ - def._def, - { - def: def._def, - path: [..._options.basePath, _options.definitionPath, name], - // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. - jsonSchema: void 0 - } - ])) - }; - }; - - // node_modules/zod-to-json-schema/dist/esm/errorMessages.js - function addErrorMessage(res, key, errorMessage, refs) { - if (!refs?.errorMessages) - return; - if (errorMessage) { - res.errorMessage = { - ...res.errorMessage, - [key]: errorMessage - }; - } - } - function setResponseValueAndErrors(res, key, value, errorMessage, refs) { - res[key] = value; - addErrorMessage(res, key, errorMessage, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/getRelativePath.js - var getRelativePath = (pathA, pathB) => { - let i4 = 0; - for (; i4 < pathA.length && i4 < pathB.length; i4++) { - if (pathA[i4] !== pathB[i4]) - break; - } - return [(pathA.length - i4).toString(), ...pathB.slice(i4)].join("/"); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/any.js - function parseAnyDef(refs) { - if (refs.target !== "openAi") { - return {}; - } - const anyDefinitionPath = [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ]; - refs.flags.hasReferencedOpenAiAnyType = true; - return { - $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/array.js - function parseArrayDef(def, refs) { - const res = { - type: "array" - }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) { - res.items = parseDef(def.type._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - } - if (def.minLength) { - setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); - } - if (def.maxLength) { - setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); - } - if (def.exactLength) { - setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); - setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs); - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js - function parseBigintDef(def, refs) { - const res = { - type: "integer", - format: "int64" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js - function parseBooleanDef() { - return { - type: "boolean" - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/branded.js - function parseBrandedDef(_def, refs) { - return parseDef(_def.type._def, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/catch.js - var parseCatchDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/date.js - function parseDateDef(def, refs, overrideDateStrategy) { - const strategy = overrideDateStrategy ?? refs.dateStrategy; - if (Array.isArray(strategy)) { - return { - anyOf: strategy.map((item, i4) => parseDateDef(def, refs, item)) - }; - } - switch (strategy) { - case "string": - case "format:date-time": - return { - type: "string", - format: "date-time" - }; - case "format:date": - return { - type: "string", - format: "date" - }; - case "integer": - return integerDateParser(def, refs); - } - } - var integerDateParser = (def, refs) => { - const res = { - type: "integer", - format: "unix-time" - }; - if (refs.target === "openApi3") { - return res; - } - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors( - res, - "minimum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - case "max": - setResponseValueAndErrors( - res, - "maximum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - } - } - return res; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/default.js - function parseDefaultDef(_def, refs) { - return { - ...parseDef(_def.innerType._def, refs), - default: _def.defaultValue() - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/effects.js - function parseEffectsDef(_def, refs) { - return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/enum.js - function parseEnumDef(def) { - return { - type: "string", - enum: Array.from(def.values) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js - var isJsonSchema7AllOfType = (type) => { - if ("type" in type && type.type === "string") - return false; - return "allOf" in type; - }; - function parseIntersectionDef(def, refs) { - const allOf = [ - parseDef(def.left._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }), - parseDef(def.right._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "1"] - }) - ].filter((x3) => !!x3); - let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0; - const mergedAllOf = []; - allOf.forEach((schema) => { - if (isJsonSchema7AllOfType(schema)) { - mergedAllOf.push(...schema.allOf); - if (schema.unevaluatedProperties === void 0) { - unevaluatedProperties = void 0; - } - } else { - let nestedSchema = schema; - if ("additionalProperties" in schema && schema.additionalProperties === false) { - const { additionalProperties, ...rest } = schema; - nestedSchema = rest; - } else { - unevaluatedProperties = void 0; - } - mergedAllOf.push(nestedSchema); - } - }); - return mergedAllOf.length ? { - allOf: mergedAllOf, - ...unevaluatedProperties - } : void 0; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/literal.js - function parseLiteralDef(def, refs) { - const parsedType = typeof def.value; - if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") { - return { - type: Array.isArray(def.value) ? "array" : "object" - }; - } - if (refs.target === "openApi3") { - return { - type: parsedType === "bigint" ? "integer" : parsedType, - enum: [def.value] - }; - } - return { - type: parsedType === "bigint" ? "integer" : parsedType, - const: def.value - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/string.js - var emojiRegex2 = void 0; - var zodPatterns = { - /** - * `c` was changed to `[cC]` to replicate /i flag - */ - cuid: /^[cC][^\s-]{8,}$/, - cuid2: /^[0-9a-z]+$/, - ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, - /** - * `a-z` was added to replicate /i flag - */ - email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, - /** - * Constructed a valid Unicode RegExp - * - * Lazily instantiate since this type of regex isn't supported - * in all envs (e.g. React Native). - * - * See: - * https://github.com/colinhacks/zod/issues/2433 - * Fix in Zod: - * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b - */ - emoji: () => { - if (emojiRegex2 === void 0) { - emojiRegex2 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); - } - return emojiRegex2; - }, - /** - * Unused - */ - uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, - /** - * Unused - */ - ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, - ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, - /** - * Unused - */ - ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, - ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, - base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, - base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, - nanoid: /^[a-zA-Z0-9_-]{21}$/, - jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ - }; - function parseStringDef(def, refs) { - const res = { - type: "string" - }; - if (def.checks) { - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "email": - switch (refs.emailStrategy) { - case "format:email": - addFormat(res, "email", check.message, refs); - break; - case "format:idn-email": - addFormat(res, "idn-email", check.message, refs); - break; - case "pattern:zod": - addPattern(res, zodPatterns.email, check.message, refs); - break; - } - break; - case "url": - addFormat(res, "uri", check.message, refs); - break; - case "uuid": - addFormat(res, "uuid", check.message, refs); - break; - case "regex": - addPattern(res, check.regex, check.message, refs); - break; - case "cuid": - addPattern(res, zodPatterns.cuid, check.message, refs); - break; - case "cuid2": - addPattern(res, zodPatterns.cuid2, check.message, refs); - break; - case "startsWith": - addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs); - break; - case "endsWith": - addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs); - break; - case "datetime": - addFormat(res, "date-time", check.message, refs); - break; - case "date": - addFormat(res, "date", check.message, refs); - break; - case "time": - addFormat(res, "time", check.message, refs); - break; - case "duration": - addFormat(res, "duration", check.message, refs); - break; - case "length": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "includes": { - addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs); - break; - } - case "ip": { - if (check.version !== "v6") { - addFormat(res, "ipv4", check.message, refs); - } - if (check.version !== "v4") { - addFormat(res, "ipv6", check.message, refs); - } - break; - } - case "base64url": - addPattern(res, zodPatterns.base64url, check.message, refs); - break; - case "jwt": - addPattern(res, zodPatterns.jwt, check.message, refs); - break; - case "cidr": { - if (check.version !== "v6") { - addPattern(res, zodPatterns.ipv4Cidr, check.message, refs); - } - if (check.version !== "v4") { - addPattern(res, zodPatterns.ipv6Cidr, check.message, refs); - } - break; - } - case "emoji": - addPattern(res, zodPatterns.emoji(), check.message, refs); - break; - case "ulid": { - addPattern(res, zodPatterns.ulid, check.message, refs); - break; - } - case "base64": { - switch (refs.base64Strategy) { - case "format:binary": { - addFormat(res, "binary", check.message, refs); - break; - } - case "contentEncoding:base64": { - setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs); - break; - } - case "pattern:zod": { - addPattern(res, zodPatterns.base64, check.message, refs); - break; - } - } - break; - } - case "nanoid": { - addPattern(res, zodPatterns.nanoid, check.message, refs); - } - case "toLowerCase": - case "toUpperCase": - case "trim": - break; - default: - /* @__PURE__ */ ((_4) => { - })(check); - } - } - } - return res; - } - function escapeLiteralCheckValue(literal, refs) { - return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal; - } - var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); - function escapeNonAlphaNumeric(source) { - let result = ""; - for (let i4 = 0; i4 < source.length; i4++) { - if (!ALPHA_NUMERIC.has(source[i4])) { - result += "\\"; - } - result += source[i4]; - } - return result; - } - function addFormat(schema, value, message, refs) { - if (schema.format || schema.anyOf?.some((x3) => x3.format)) { - if (!schema.anyOf) { - schema.anyOf = []; - } - if (schema.format) { - schema.anyOf.push({ - format: schema.format, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { format: schema.errorMessage.format } - } - }); - delete schema.format; - if (schema.errorMessage) { - delete schema.errorMessage.format; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.anyOf.push({ - format: value, - ...message && refs.errorMessages && { errorMessage: { format: message } } - }); - } else { - setResponseValueAndErrors(schema, "format", value, message, refs); - } - } - function addPattern(schema, regex, message, refs) { - if (schema.pattern || schema.allOf?.some((x3) => x3.pattern)) { - if (!schema.allOf) { - schema.allOf = []; - } - if (schema.pattern) { - schema.allOf.push({ - pattern: schema.pattern, - ...schema.errorMessage && refs.errorMessages && { - errorMessage: { pattern: schema.errorMessage.pattern } - } - }); - delete schema.pattern; - if (schema.errorMessage) { - delete schema.errorMessage.pattern; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.allOf.push({ - pattern: stringifyRegExpWithFlags(regex, refs), - ...message && refs.errorMessages && { errorMessage: { pattern: message } } - }); - } else { - setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs); - } - } - function stringifyRegExpWithFlags(regex, refs) { - if (!refs.applyRegexFlags || !regex.flags) { - return regex.source; - } - const flags = { - i: regex.flags.includes("i"), - m: regex.flags.includes("m"), - s: regex.flags.includes("s") - // `.` matches newlines - }; - const source = flags.i ? regex.source.toLowerCase() : regex.source; - let pattern = ""; - let isEscaped = false; - let inCharGroup = false; - let inCharRange = false; - for (let i4 = 0; i4 < source.length; i4++) { - if (isEscaped) { - pattern += source[i4]; - isEscaped = false; - continue; - } - if (flags.i) { - if (inCharGroup) { - if (source[i4].match(/[a-z]/)) { - if (inCharRange) { - pattern += source[i4]; - pattern += `${source[i4 - 2]}-${source[i4]}`.toUpperCase(); - inCharRange = false; - } else if (source[i4 + 1] === "-" && source[i4 + 2]?.match(/[a-z]/)) { - pattern += source[i4]; - inCharRange = true; - } else { - pattern += `${source[i4]}${source[i4].toUpperCase()}`; - } - continue; - } - } else if (source[i4].match(/[a-z]/)) { - pattern += `[${source[i4]}${source[i4].toUpperCase()}]`; - continue; - } - } - if (flags.m) { - if (source[i4] === "^") { - pattern += `(^|(?<=[\r -]))`; - continue; - } else if (source[i4] === "$") { - pattern += `($|(?=[\r -]))`; - continue; - } - } - if (flags.s && source[i4] === ".") { - pattern += inCharGroup ? `${source[i4]}\r -` : `[${source[i4]}\r -]`; - continue; - } - pattern += source[i4]; - if (source[i4] === "\\") { - isEscaped = true; - } else if (inCharGroup && source[i4] === "]") { - inCharGroup = false; - } else if (!inCharGroup && source[i4] === "[") { - inCharGroup = true; - } - } - try { - new RegExp(pattern); - } catch { - console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); - return regex.source; - } - return pattern; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/record.js - function parseRecordDef(def, refs) { - if (refs.target === "openAi") { - console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); - } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - type: "object", - required: def.keyType._def.values, - properties: def.keyType._def.values.reduce((acc, key) => ({ - ...acc, - [key]: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", key] - }) ?? parseAnyDef(refs) - }), {}), - additionalProperties: refs.rejectedAdditionalProperties - }; - } - const schema = { - type: "object", - additionalProperties: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }) ?? refs.allowedAdditionalProperties - }; - if (refs.target === "openApi3") { - return schema; - } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) { - const { type, ...keyType } = parseStringDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - ...schema, - propertyNames: { - enum: def.keyType._def.values - } - }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) { - const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType - }; - } - return schema; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/map.js - function parseMapDef(def, refs) { - if (refs.mapStrategy === "record") { - return parseRecordDef(def, refs); - } - const keys = parseDef(def.keyType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "0"] - }) || parseAnyDef(refs); - const values = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "1"] - }) || parseAnyDef(refs); - return { - type: "array", - maxItems: 125, - items: { - type: "array", - items: [keys, values], - minItems: 2, - maxItems: 2 - } - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js - function parseNativeEnumDef(def) { - const object = def.values; - const actualKeys = Object.keys(def.values).filter((key) => { - return typeof object[object[key]] !== "number"; - }); - const actualValues = actualKeys.map((key) => object[key]); - const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); - return { - type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"], - enum: actualValues - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/never.js - function parseNeverDef(refs) { - return refs.target === "openAi" ? void 0 : { - not: parseAnyDef({ - ...refs, - currentPath: [...refs.currentPath, "not"] - }) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/null.js - function parseNullDef(refs) { - return refs.target === "openApi3" ? { - enum: ["null"], - nullable: true - } : { - type: "null" - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/union.js - var primitiveMappings = { - ZodString: "string", - ZodNumber: "number", - ZodBigInt: "integer", - ZodBoolean: "boolean", - ZodNull: "null" - }; - function parseUnionDef(def, refs) { - if (refs.target === "openApi3") - return asAnyOf(def, refs); - const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; - if (options.every((x3) => x3._def.typeName in primitiveMappings && (!x3._def.checks || !x3._def.checks.length))) { - const types = options.reduce((types2, x3) => { - const type = primitiveMappings[x3._def.typeName]; - return type && !types2.includes(type) ? [...types2, type] : types2; - }, []); - return { - type: types.length > 1 ? types : types[0] - }; - } else if (options.every((x3) => x3._def.typeName === "ZodLiteral" && !x3.description)) { - const types = options.reduce((acc, x3) => { - const type = typeof x3._def.value; - switch (type) { - case "string": - case "number": - case "boolean": - return [...acc, type]; - case "bigint": - return [...acc, "integer"]; - case "object": - if (x3._def.value === null) - return [...acc, "null"]; - case "symbol": - case "undefined": - case "function": - default: - return acc; - } - }, []); - if (types.length === options.length) { - const uniqueTypes = types.filter((x3, i4, a5) => a5.indexOf(x3) === i4); - return { - type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], - enum: options.reduce((acc, x3) => { - return acc.includes(x3._def.value) ? acc : [...acc, x3._def.value]; - }, []) - }; - } - } else if (options.every((x3) => x3._def.typeName === "ZodEnum")) { - return { - type: "string", - enum: options.reduce((acc, x3) => [ - ...acc, - ...x3._def.values.filter((x4) => !acc.includes(x4)) - ], []) - }; - } - return asAnyOf(def, refs); - } - var asAnyOf = (def, refs) => { - const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", `${i4}`] - })).filter((x3) => !!x3 && (!refs.strictUnions || typeof x3 === "object" && Object.keys(x3).length > 0)); - return anyOf.length ? { anyOf } : void 0; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js - function parseNullableDef(def, refs) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { - if (refs.target === "openApi3") { - return { - type: primitiveMappings[def.innerType._def.typeName], - nullable: true - }; - } - return { - type: [ - primitiveMappings[def.innerType._def.typeName], - "null" - ] - }; - } - if (refs.target === "openApi3") { - const base2 = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath] - }); - if (base2 && "$ref" in base2) - return { allOf: [base2], nullable: true }; - return base2 && { ...base2, nullable: true }; - } - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "0"] - }); - return base && { anyOf: [base, { type: "null" }] }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/number.js - function parseNumberDef(def, refs) { - const res = { - type: "number" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "int": - res.type = "integer"; - addErrorMessage(res, "type", check.message, refs); - break; - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/object.js - function parseObjectDef(def, refs) { - const forceOptionalIntoNullable = refs.target === "openAi"; - const result = { - type: "object", - properties: {} - }; - const required = []; - const shape = def.shape(); - for (const propName in shape) { - let propDef = shape[propName]; - if (propDef === void 0 || propDef._def === void 0) { - continue; - } - let propOptional = safeIsOptional(propDef); - if (propOptional && forceOptionalIntoNullable) { - if (propDef._def.typeName === "ZodOptional") { - propDef = propDef._def.innerType; - } - if (!propDef.isNullable()) { - propDef = propDef.nullable(); - } - propOptional = false; - } - const parsedDef = parseDef(propDef._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", propName], - propertyPath: [...refs.currentPath, "properties", propName] - }); - if (parsedDef === void 0) { - continue; - } - result.properties[propName] = parsedDef; - if (!propOptional) { - required.push(propName); - } - } - if (required.length) { - result.required = required; - } - const additionalProperties = decideAdditionalProperties(def, refs); - if (additionalProperties !== void 0) { - result.additionalProperties = additionalProperties; - } - return result; - } - function decideAdditionalProperties(def, refs) { - if (def.catchall._def.typeName !== "ZodNever") { - return parseDef(def.catchall._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }); - } - switch (def.unknownKeys) { - case "passthrough": - return refs.allowedAdditionalProperties; - case "strict": - return refs.rejectedAdditionalProperties; - case "strip": - return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties; - } - } - function safeIsOptional(schema) { - try { - return schema.isOptional(); - } catch { - return true; - } - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/optional.js - var parseOptionalDef = (def, refs) => { - if (refs.currentPath.toString() === refs.propertyPath?.toString()) { - return parseDef(def.innerType._def, refs); - } - const innerSchema = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "1"] - }); - return innerSchema ? { - anyOf: [ - { - not: parseAnyDef(refs) - }, - innerSchema - ] - } : parseAnyDef(refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js - var parsePipelineDef = (def, refs) => { - if (refs.pipeStrategy === "input") { - return parseDef(def.in._def, refs); - } else if (refs.pipeStrategy === "output") { - return parseDef(def.out._def, refs); - } - const a5 = parseDef(def.in._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }); - const b2 = parseDef(def.out._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", a5 ? "1" : "0"] - }); - return { - allOf: [a5, b2].filter((x3) => x3 !== void 0) - }; - }; - - // node_modules/zod-to-json-schema/dist/esm/parsers/promise.js - function parsePromiseDef(def, refs) { - return parseDef(def.type._def, refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/set.js - function parseSetDef(def, refs) { - const items = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - const schema = { - type: "array", - uniqueItems: true, - items - }; - if (def.minSize) { - setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs); - } - if (def.maxSize) { - setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs); - } - return schema; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js - function parseTupleDef(def, refs) { - if (def.rest) { - return { - type: "array", - minItems: def.items.length, - items: def.items.map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i4}`] - })).reduce((acc, x3) => x3 === void 0 ? acc : [...acc, x3], []), - additionalItems: parseDef(def.rest._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalItems"] - }) - }; - } else { - return { - type: "array", - minItems: def.items.length, - maxItems: def.items.length, - items: def.items.map((x3, i4) => parseDef(x3._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i4}`] - })).reduce((acc, x3) => x3 === void 0 ? acc : [...acc, x3], []) - }; - } - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js - function parseUndefinedDef(refs) { - return { - not: parseAnyDef(refs) - }; - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js - function parseUnknownDef(refs) { - return parseAnyDef(refs); - } - - // node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js - var parseReadonlyDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - - // node_modules/zod-to-json-schema/dist/esm/selectParser.js - var selectParser = (def, typeName, refs) => { - switch (typeName) { - case ZodFirstPartyTypeKind.ZodString: - return parseStringDef(def, refs); - case ZodFirstPartyTypeKind.ZodNumber: - return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind.ZodObject: - return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind.ZodBigInt: - return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind.ZodBoolean: - return parseBooleanDef(); - case ZodFirstPartyTypeKind.ZodDate: - return parseDateDef(def, refs); - case ZodFirstPartyTypeKind.ZodUndefined: - return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind.ZodNull: - return parseNullDef(refs); - case ZodFirstPartyTypeKind.ZodArray: - return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind.ZodUnion: - case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: - return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind.ZodIntersection: - return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind.ZodTuple: - return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind.ZodRecord: - return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind.ZodLiteral: - return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind.ZodEnum: - return parseEnumDef(def); - case ZodFirstPartyTypeKind.ZodNativeEnum: - return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind.ZodNullable: - return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind.ZodOptional: - return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind.ZodMap: - return parseMapDef(def, refs); - case ZodFirstPartyTypeKind.ZodSet: - return parseSetDef(def, refs); - case ZodFirstPartyTypeKind.ZodLazy: - return () => def.getter()._def; - case ZodFirstPartyTypeKind.ZodPromise: - return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind.ZodNaN: - case ZodFirstPartyTypeKind.ZodNever: - return parseNeverDef(refs); - case ZodFirstPartyTypeKind.ZodEffects: - return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind.ZodAny: - return parseAnyDef(refs); - case ZodFirstPartyTypeKind.ZodUnknown: - return parseUnknownDef(refs); - case ZodFirstPartyTypeKind.ZodDefault: - return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind.ZodBranded: - return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind.ZodReadonly: - return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind.ZodCatch: - return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind.ZodPipeline: - return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind.ZodFunction: - case ZodFirstPartyTypeKind.ZodVoid: - case ZodFirstPartyTypeKind.ZodSymbol: - return void 0; - default: - return /* @__PURE__ */ ((_4) => void 0)(typeName); - } - }; - - // node_modules/zod-to-json-schema/dist/esm/parseDef.js - function parseDef(def, refs, forceResolution = false) { - const seenItem = refs.seen.get(def); - if (refs.override) { - const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); - if (overrideResult !== ignoreOverride) { - return overrideResult; - } - } - if (seenItem && !forceResolution) { - const seenSchema = get$ref(seenItem, refs); - if (seenSchema !== void 0) { - return seenSchema; - } - } - const newItem = { def, path: refs.currentPath, jsonSchema: void 0 }; - refs.seen.set(def, newItem); - const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); - const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter; - if (jsonSchema) { - addMeta(def, refs, jsonSchema); - } - if (refs.postProcess) { - const postProcessResult = refs.postProcess(jsonSchema, def, refs); - newItem.jsonSchema = jsonSchema; - return postProcessResult; - } - newItem.jsonSchema = jsonSchema; - return jsonSchema; - } - var get$ref = (item, refs) => { - switch (refs.$refStrategy) { - case "root": - return { $ref: item.path.join("/") }; - case "relative": - return { $ref: getRelativePath(refs.currentPath, item.path) }; - case "none": - case "seen": { - if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) { - console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); - return parseAnyDef(refs); - } - return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0; - } - } - }; - var addMeta = (def, refs, jsonSchema) => { - if (def.description) { - jsonSchema.description = def.description; - if (refs.markdownDescription) { - jsonSchema.markdownDescription = def.description; - } - } - return jsonSchema; - }; - - // node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js - var zodToJsonSchema = (schema, options) => { - const refs = getRefs(options); - let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({ - ...acc, - [name2]: parseDef(schema2._def, { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name2] - }, true) ?? parseAnyDef(refs) - }), {}) : void 0; - const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name; - const main = parseDef(schema._def, name === void 0 ? refs : { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name] - }, false) ?? parseAnyDef(refs); - const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0; - if (title !== void 0) { - main.title = title; - } - if (refs.flags.hasReferencedOpenAiAnyType) { - if (!definitions) { - definitions = {}; - } - if (!definitions[refs.openAiAnyTypeName]) { - definitions[refs.openAiAnyTypeName] = { - // Skipping "object" as no properties can be defined and additionalProperties must be "false" - type: ["string", "number", "integer", "boolean", "array", "null"], - items: { - $ref: refs.$refStrategy === "relative" ? "1" : [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ].join("/") - } - }; - } - } - const combined = name === void 0 ? definitions ? { - ...main, - [refs.definitionPath]: definitions - } : main : { - $ref: [ - ...refs.$refStrategy === "relative" ? [] : refs.basePath, - refs.definitionPath, - name - ].join("/"), - [refs.definitionPath]: { - ...definitions, - [name]: main - } - }; - if (refs.target === "jsonSchema7") { - combined.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { - combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; - } - if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) { - console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); - } - return combined; - }; - - // node_modules/@walkeros/core/dist/index.mjs - var e = Object.defineProperty; - var t = (t12, n5) => { - for (var i4 in n5) - e(t12, i4, { get: n5[i4], enumerable: true }); - }; - var h = external_exports.string(); - var y = external_exports.number(); - var S = external_exports.boolean(); - var v = external_exports.string().min(1); - var j = external_exports.number().int().positive(); - var w = external_exports.number().int().nonnegative(); - var x = external_exports.number().describe("Tagging version number"); - var E = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]); - var C = E.optional(); - var P = {}; - t(P, { ErrorHandlerSchema: () => O, HandlerSchema: () => L, LogHandlerSchema: () => J, StorageSchema: () => I, StorageTypeSchema: () => $, errorHandlerJsonSchema: () => R, handlerJsonSchema: () => q, logHandlerJsonSchema: () => A, storageJsonSchema: () => M, storageTypeJsonSchema: () => T }); - var $ = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); - var I = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references"); - var O = external_exports.any().describe("Error handler function: (error, state?) => void"); - var J = external_exports.any().describe("Log handler function: (message, verbose?) => void"); - var L = external_exports.object({ Error: O.describe("Error handler function"), Log: J.describe("Log handler function") }).describe("Handler interface with error and log functions"); - var T = zodToJsonSchema($, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); - var M = zodToJsonSchema(I, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); - var R = zodToJsonSchema(O, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); - var A = zodToJsonSchema(J, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); - var q = zodToJsonSchema(L, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); - var U = external_exports.object({ onError: O.optional().describe("Error handler function: (error, state?) => void"), onLog: J.optional().describe("Log handler function: (message, verbose?) => void") }).partial(); - var N = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(); - var B = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(); - var W = external_exports.object({}).partial(); - var V = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(); - var H = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial(); - var _ = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(); - var K = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(); - var F = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(); - var Z = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.any().describe("Instance configuration") }).partial(); - var ee = external_exports.object({ collector: external_exports.any().describe("Collector instance (runtime object)"), config: external_exports.any().describe("Configuration"), env: external_exports.any().describe("Environment dependencies") }).partial(); - var te = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.any().optional().describe("Batch of events to be processed") }).partial(); - var ne = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(); - var ie = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.any()).describe("Map of source instances") }).partial(); - var oe = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.any()).describe("Map of destination instances") }).partial(); - var re = {}; - t(re, { ConsentSchema: () => me, DeepPartialEventSchema: () => je, EntitiesSchema: () => ye, EntitySchema: () => he, EventSchema: () => Se, OrderedPropertiesSchema: () => pe, PartialEventSchema: () => ve, PropertiesSchema: () => de, PropertySchema: () => le, PropertyTypeSchema: () => ce, SourceSchema: () => fe, SourceTypeSchema: () => ue, UserSchema: () => ge, VersionSchema: () => be, consentJsonSchema: () => De, entityJsonSchema: () => Pe, eventJsonSchema: () => we, orderedPropertiesJsonSchema: () => ke, partialEventJsonSchema: () => xe, propertiesJsonSchema: () => Ce, sourceTypeJsonSchema: () => ze, userJsonSchema: () => Ee }); - var ce = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), le)])); - var le = external_exports.lazy(() => external_exports.union([ce, external_exports.array(ce)])); - var de = external_exports.record(external_exports.string(), le.optional()).describe("Flexible property collection with optional values"); - var pe = external_exports.record(external_exports.string(), external_exports.tuple([le, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); - var ue = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom"); - var me = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); - var ge = de.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); - var be = de.and(external_exports.object({ source: h.describe('Walker implementation version (e.g., "2.0.0")'), tagging: x })).describe("Walker version information"); - var fe = de.and(external_exports.object({ type: ue.describe("Source type identifier"), id: h.describe("Source identifier (typically URL on web)"), previous_id: h.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); - var he = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: de.describe("Entity-specific properties"), nested: external_exports.array(he).describe("Nested child entities"), context: pe.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); - var ye = external_exports.array(he).describe("Array of nested entities"); - var Se = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: de.describe("Event-specific properties"), context: pe.describe("Ordered context properties with priorities"), globals: de.describe("Global properties shared across events"), custom: de.describe("Custom implementation-specific properties"), user: ge.describe("User identification and attributes"), nested: ye.describe("Related nested entities"), consent: me.describe("Consent states at event time"), id: v.describe("Unique event identifier (timestamp-based)"), trigger: h.describe("Event trigger identifier"), entity: h.describe("Parsed entity from event name"), action: h.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: y.describe("Event processing timing information"), group: h.describe("Event grouping identifier"), count: w.describe("Event count in session"), version: be.describe("Walker version information"), source: fe.describe("Event source information") }).describe("Complete walkerOS event structure"); - var ve = Se.partial().describe("Partial event structure with all fields optional"); - var je = external_exports.lazy(() => Se.deepPartial()).describe("Deep partial event structure with all nested fields optional"); - var we = zodToJsonSchema(Se, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); - var xe = zodToJsonSchema(ve, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); - var Ee = zodToJsonSchema(ge, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); - var Ce = zodToJsonSchema(de, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); - var ke = zodToJsonSchema(pe, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); - var Pe = zodToJsonSchema(he, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); - var ze = zodToJsonSchema(ue, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); - var De = zodToJsonSchema(me, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); - var $e = {}; - t($e, { ConfigSchema: () => Be, LoopSchema: () => Te, MapSchema: () => Re, PolicySchema: () => qe, ResultSchema: () => We, RuleSchema: () => Ue, RulesSchema: () => Ne, SetSchema: () => Me, ValueConfigSchema: () => Ae, ValueSchema: () => Je, ValuesSchema: () => Le, configJsonSchema: () => Ye, loopJsonSchema: () => _e, mapJsonSchema: () => Fe, policyJsonSchema: () => Ge, ruleJsonSchema: () => Qe, rulesJsonSchema: () => Xe, setJsonSchema: () => Ke, valueConfigJsonSchema: () => He, valueJsonSchema: () => Ve }); - var Je = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), Ae, external_exports.array(Je).describe("Array of values")])); - var Le = external_exports.array(Je).describe("Array of transformation values"); - var Te = external_exports.tuple([Je, Je]).describe("Loop transformation: [source, transform] tuple for array processing"); - var Me = external_exports.array(Je).describe("Set: Array of values for selection or combination"); - var Re = external_exports.record(external_exports.string(), Je).describe("Map: Object mapping keys to transformation values"); - var Ae = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: Re.optional().describe("Object mapping: transform event data to structured output"), loop: Te.optional().describe("Loop transformation: [source, transform] for array processing"), set: Me.optional().describe("Set of values: combine or select from multiple values"), consent: me.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e14) => Object.keys(e14).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); - var qe = external_exports.record(external_exports.string(), Je).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); - var Ue = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: me.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([Je, Le]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: qe.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); - var Ne = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Ue, external_exports.array(Ue)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); - var Be = external_exports.object({ consent: me.optional().describe("Required consent states to process any events"), data: external_exports.union([Je, Le]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: qe.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); - var We = external_exports.object({ eventMapping: Ue.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); - var Ve = zodToJsonSchema(Je, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); - var He = zodToJsonSchema(Ae, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); - var _e = zodToJsonSchema(Te, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); - var Ke = zodToJsonSchema(Me, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); - var Fe = zodToJsonSchema(Re, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); - var Ge = zodToJsonSchema(qe, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); - var Qe = zodToJsonSchema(Ue, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); - var Xe = zodToJsonSchema(Ne, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); - var Ye = zodToJsonSchema(Be, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); - var Ze = {}; - t(Ze, { BatchSchema: () => dt, ConfigSchema: () => nt, ContextSchema: () => rt, DLQSchema: () => St, DataSchema: () => pt, DestinationPolicySchema: () => ot, DestinationsSchema: () => bt, InitDestinationsSchema: () => gt, InitSchema: () => mt, InstanceSchema: () => ut, PartialConfigSchema: () => it, PushBatchContextSchema: () => st, PushContextSchema: () => at, PushEventSchema: () => ct, PushEventsSchema: () => lt, PushResultSchema: () => ht, RefSchema: () => ft, ResultSchema: () => yt, batchJsonSchema: () => Et, configJsonSchema: () => vt, contextJsonSchema: () => wt, instanceJsonSchema: () => Ct, partialConfigJsonSchema: () => jt, pushContextJsonSchema: () => xt, resultJsonSchema: () => kt }); - var nt = external_exports.object({ consent: me.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([Je, Le]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: v.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: qe.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: O.optional(), onLog: J.optional() }).describe("Destination configuration"); - var it = nt.deepPartial().describe("Partial destination configuration with all fields deeply optional"); - var ot = qe.describe("Destination policy rules for event pre-processing"); - var rt = external_exports.object({ collector: external_exports.any().describe("Collector instance (runtime object)"), config: nt.describe("Destination configuration"), data: external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))]).optional().describe("Transformed event data"), env: external_exports.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); - var at = rt.extend({ mapping: Ue.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); - var st = at.describe("Batch push context with event-specific mapping"); - var ct = external_exports.object({ event: Se.describe("The event to process"), mapping: Ue.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); - var lt = external_exports.array(ct).describe("Array of events with mappings"); - var dt = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(Se).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))])).describe("Transformed data for each event"), mapping: Ue.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); - var pt = external_exports.union([external_exports.any(), external_exports.undefined(), external_exports.array(external_exports.union([external_exports.any(), external_exports.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); - var ut = external_exports.object({ config: nt.describe("Destination configuration"), queue: external_exports.array(Se).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([Se, external_exports.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.any().optional().describe("Environment dependencies"), init: external_exports.any().optional().describe("Initialization function"), push: external_exports.any().describe("Push function for single events"), pushBatch: external_exports.any().optional().describe("Batch push function"), on: external_exports.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); - var mt = external_exports.object({ code: ut.describe("Destination instance with implementation"), config: it.optional().describe("Partial configuration overrides"), env: external_exports.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); - var gt = external_exports.record(external_exports.string(), mt).describe("Map of destination IDs to initialization configurations"); - var bt = external_exports.record(external_exports.string(), ut).describe("Map of destination IDs to runtime instances"); - var ft = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: ut.describe("Destination instance") }).describe("Destination reference (ID + instance)"); - var ht = external_exports.object({ queue: external_exports.array(Se).optional().describe("Events queued (awaiting consent)"), error: external_exports.any().optional().describe("Error if push failed") }).describe("Push operation result"); - var yt = external_exports.object({ successful: external_exports.array(ft).describe("Destinations that processed successfully"), queued: external_exports.array(ft).describe("Destinations that queued events"), failed: external_exports.array(ft).describe("Destinations that failed to process") }).describe("Overall destination processing result"); - var St = external_exports.array(external_exports.tuple([Se, external_exports.any()])).describe("Dead letter queue: [(event, error), ...]"); - var vt = zodToJsonSchema(nt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); - var jt = zodToJsonSchema(it, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); - var wt = zodToJsonSchema(rt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); - var xt = zodToJsonSchema(at, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); - var Et = zodToJsonSchema(dt, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); - var Ct = zodToJsonSchema(ut, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); - var kt = zodToJsonSchema(yt, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); - var Pt = {}; - t(Pt, { CommandTypeSchema: () => $t, ConfigSchema: () => It, DestinationsSchema: () => Mt, InitConfigSchema: () => Jt, InstanceSchema: () => Rt, PushContextSchema: () => Lt, SessionDataSchema: () => Ot, SourcesSchema: () => Tt, commandTypeJsonSchema: () => At, configJsonSchema: () => qt, initConfigJsonSchema: () => Nt, instanceJsonSchema: () => Wt, pushContextJsonSchema: () => Bt, sessionDataJsonSchema: () => Ut }); - var $t = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions"); - var It = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: x, globalsStatic: de.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.any()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: O.optional(), onLog: J.optional() }).describe("Core collector configuration"); - var Ot = de.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: v.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: v.describe("Device identifier").optional(), count: w.describe("Event count in session").optional(), runs: w.describe("Number of runs").optional() })).describe("Session state and tracking data"); - var Jt = It.partial().extend({ consent: me.optional().describe("Initial consent state"), user: ge.optional().describe("Initial user data"), globals: de.optional().describe("Initial global properties"), sources: external_exports.any().optional().describe("Source configurations"), destinations: external_exports.any().optional().describe("Destination configurations"), custom: de.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); - var Lt = external_exports.object({ mapping: Be.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); - var Tt = external_exports.record(external_exports.string(), external_exports.any()).describe("Map of source IDs to source instances"); - var Mt = external_exports.record(external_exports.string(), external_exports.any()).describe("Map of destination IDs to destination instances"); - var Rt = external_exports.object({ push: external_exports.any().describe("Push function for processing events"), command: external_exports.any().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: It.describe("Current collector configuration"), consent: me.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: de.describe("Custom implementation-specific properties"), sources: Tt.describe("Registered source instances"), destinations: Mt.describe("Registered destination instances"), globals: de.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.any().describe("Lifecycle hook functions"), on: external_exports.any().describe("Event lifecycle configuration"), queue: external_exports.array(Se).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([external_exports.undefined(), Ot]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: ge.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); - var At = zodToJsonSchema($t, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); - var qt = zodToJsonSchema(It, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); - var Ut = zodToJsonSchema(Ot, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); - var Nt = zodToJsonSchema(Jt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); - var Bt = zodToJsonSchema(Lt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); - var Wt = zodToJsonSchema(Rt, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); - var Vt = {}; - t(Vt, { BaseEnvSchema: () => Kt, ConfigSchema: () => Ft, InitSchema: () => Xt, InitSourceSchema: () => Yt, InitSourcesSchema: () => Zt, InstanceSchema: () => Qt, PartialConfigSchema: () => Gt, baseEnvJsonSchema: () => en, configJsonSchema: () => tn, initSourceJsonSchema: () => rn, initSourcesJsonSchema: () => an, instanceJsonSchema: () => on, partialConfigJsonSchema: () => nn }); - var Kt = external_exports.object({ push: external_exports.any().describe("Collector push function"), command: external_exports.any().describe("Collector command function"), sources: external_exports.any().optional().describe("Map of registered source instances"), elb: external_exports.any().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); - var Ft = Be.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Kt.optional().describe("Environment dependencies (platform-specific)"), id: v.describe("Source identifier (defaults to source key)").optional(), onError: O.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); - var Gt = Ft.deepPartial().describe("Partial source configuration with all fields deeply optional"); - var Qt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ft.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); - var Xt = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise"); - var Yt = external_exports.object({ code: Xt.describe("Source initialization function"), config: Gt.optional().describe("Partial configuration overrides"), env: Kt.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); - var Zt = external_exports.record(external_exports.string(), Yt).describe("Map of source IDs to initialization configurations"); - var en = zodToJsonSchema(Kt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); - var tn = zodToJsonSchema(Ft, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); - var nn = zodToJsonSchema(Gt, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); - var on = zodToJsonSchema(Qt, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); - var rn = zodToJsonSchema(Yt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); - var an = zodToJsonSchema(Zt, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); - var hn = { merge: true, shallow: true, extend: true }; - function yn(e14, t12 = {}, n5 = {}) { - n5 = { ...hn, ...n5 }; - const i4 = Object.entries(t12).reduce((t13, [i5, o4]) => { - const r3 = e14[i5]; - return n5.merge && Array.isArray(r3) && Array.isArray(o4) ? t13[i5] = o4.reduce((e15, t14) => e15.includes(t14) ? e15 : [...e15, t14], [...r3]) : (n5.extend || i5 in e14) && (t13[i5] = o4), t13; - }, {}); - return n5.shallow ? { ...e14, ...i4 } : (Object.assign(e14, i4), e14); - } - function vn(e14) { - return Array.isArray(e14); - } - function jn(e14) { - return "boolean" == typeof e14; - } - function xn(e14) { - return void 0 !== e14; - } - function Cn(e14) { - return "function" == typeof e14; - } - function kn(e14) { - return "number" == typeof e14 && !Number.isNaN(e14); - } - function Pn(e14) { - return "object" == typeof e14 && null !== e14 && !vn(e14) && "[object Object]" === Object.prototype.toString.call(e14); - } - function Dn(e14) { - return "string" == typeof e14; - } - function $n(e14, t12 = /* @__PURE__ */ new WeakMap()) { - if ("object" != typeof e14 || null === e14) - return e14; - if (t12.has(e14)) - return t12.get(e14); - const n5 = Object.prototype.toString.call(e14); - if ("[object Object]" === n5) { - const n6 = {}; - t12.set(e14, n6); - for (const i4 in e14) - Object.prototype.hasOwnProperty.call(e14, i4) && (n6[i4] = $n(e14[i4], t12)); - return n6; - } - if ("[object Array]" === n5) { - const n6 = []; - return t12.set(e14, n6), e14.forEach((e15) => { - n6.push($n(e15, t12)); - }), n6; - } - if ("[object Date]" === n5) - return new Date(e14.getTime()); - if ("[object RegExp]" === n5) { - const t13 = e14; - return new RegExp(t13.source, t13.flags); - } - return e14; - } - function In(e14, t12 = "", n5) { - const i4 = t12.split("."); - let o4 = e14; - for (let e15 = 0; e15 < i4.length; e15++) { - const t13 = i4[e15]; - if ("*" === t13 && vn(o4)) { - const t14 = i4.slice(e15 + 1).join("."), r3 = []; - for (const e16 of o4) { - const i5 = In(e16, t14, n5); - r3.push(i5); - } - return r3; - } - if (o4 = o4 instanceof Object ? o4[t13] : void 0, !o4) - break; - } - return xn(o4) ? o4 : n5; - } - function On(e14, t12, n5) { - if (!Pn(e14)) - return e14; - const i4 = $n(e14), o4 = t12.split("."); - let r3 = i4; - for (let e15 = 0; e15 < o4.length; e15++) { - const t13 = o4[e15]; - e15 === o4.length - 1 ? r3[t13] = n5 : (t13 in r3 && "object" == typeof r3[t13] && null !== r3[t13] || (r3[t13] = {}), r3 = r3[t13]); - } - return i4; - } - function Ln(e14, t12 = {}, n5 = {}) { - const i4 = { ...t12, ...n5 }, o4 = {}; - let r3 = void 0 === e14; - return Object.keys(i4).forEach((t13) => { - i4[t13] && (o4[t13] = true, e14 && e14[t13] && (r3 = true)); - }), !!r3 && o4; - } - function An(e14 = 6) { - let t12 = ""; - for (let n5 = 36; t12.length < e14; ) - t12 += (Math.random() * n5 | 0).toString(n5); - return t12; - } - function Un(e14, t12 = 1e3, n5 = false) { - let i4, o4 = null, r3 = false; - return (...a5) => new Promise((s5) => { - const c3 = n5 && !r3; - o4 && clearTimeout(o4), o4 = setTimeout(() => { - o4 = null, n5 && !r3 || (i4 = e14(...a5), s5(i4)); - }, t12), c3 && (r3 = true, i4 = e14(...a5), s5(i4)); - }); - } - function Bn(e14) { - return jn(e14) || Dn(e14) || kn(e14) || !xn(e14) || vn(e14) && e14.every(Bn) || Pn(e14) && Object.values(e14).every(Bn); - } - function Vn(e14) { - return Bn(e14) ? e14 : void 0; - } - function Hn(e14, t12, n5) { - return function(...i4) { - try { - return e14(...i4); - } catch (e15) { - if (!t12) - return; - return t12(e15); - } finally { - n5?.(); - } - }; - } - function _n(e14, t12, n5) { - return async function(...i4) { - try { - return await e14(...i4); - } catch (e15) { - if (!t12) - return; - return await t12(e15); - } finally { - await n5?.(); - } - }; - } - async function Kn(e14, t12) { - const [n5, i4] = (e14.name || "").split(" "); - if (!t12 || !n5 || !i4) - return {}; - let o4, r3 = "", a5 = n5, s5 = i4; - const c3 = (t13) => { - if (t13) - return (t13 = vn(t13) ? t13 : [t13]).find((t14) => !t14.condition || t14.condition(e14)); - }; - t12[a5] || (a5 = "*"); - const l3 = t12[a5]; - return l3 && (l3[s5] || (s5 = "*"), o4 = c3(l3[s5])), o4 || (a5 = "*", s5 = "*", o4 = c3(t12[a5]?.[s5])), o4 && (r3 = `${a5} ${s5}`), { eventMapping: o4, mappingKey: r3 }; - } - async function Fn(e14, t12 = {}, n5 = {}) { - if (!xn(e14)) - return; - const i4 = Pn(e14) && e14.consent || n5.consent || n5.collector?.consent, o4 = vn(t12) ? t12 : [t12]; - for (const t13 of o4) { - const o5 = await _n(Gn)(e14, t13, { ...n5, consent: i4 }); - if (xn(o5)) - return o5; - } - } - async function Gn(e14, t12, n5 = {}) { - const { collector: i4, consent: o4 } = n5; - return (vn(t12) ? t12 : [t12]).reduce(async (t13, r3) => { - const a5 = await t13; - if (a5) - return a5; - const s5 = Dn(r3) ? { key: r3 } : r3; - if (!Object.keys(s5).length) - return; - const { condition: c3, consent: l3, fn: d2, key: p2, loop: u3, map: m2, set: g3, validate: b2, value: f2 } = s5; - if (c3 && !await _n(c3)(e14, r3, i4)) - return; - if (l3 && !Ln(l3, o4)) - return f2; - let h4 = xn(f2) ? f2 : e14; - if (d2 && (h4 = await _n(d2)(e14, r3, n5)), p2 && (h4 = In(e14, p2, f2)), u3) { - const [t14, i5] = u3, o5 = "this" === t14 ? [e14] : await Fn(e14, t14, n5); - vn(o5) && (h4 = (await Promise.all(o5.map((e15) => Fn(e15, i5, n5)))).filter(xn)); - } else - m2 ? h4 = await Object.entries(m2).reduce(async (t14, [i5, o5]) => { - const r4 = await t14, a6 = await Fn(e14, o5, n5); - return xn(a6) && (r4[i5] = a6), r4; - }, Promise.resolve({})) : g3 && (h4 = await Promise.all(g3.map((t14) => Gn(e14, t14, n5)))); - b2 && !await _n(b2)(h4) && (h4 = void 0); - const y4 = Vn(h4); - return xn(y4) ? y4 : Vn(f2); - }, Promise.resolve(void 0)); - } - async function Qn(e14, t12, n5) { - t12.policy && await Promise.all(Object.entries(t12.policy).map(async ([t13, i5]) => { - const o5 = await Fn(e14, i5, { collector: n5 }); - e14 = On(e14, t13, o5); - })); - const { eventMapping: i4, mappingKey: o4 } = await Kn(e14, t12.mapping); - i4?.policy && await Promise.all(Object.entries(i4.policy).map(async ([t13, i5]) => { - const o5 = await Fn(e14, i5, { collector: n5 }); - e14 = On(e14, t13, o5); - })); - let r3 = t12.data && await Fn(e14, t12.data, { collector: n5 }); - if (i4) { - if (i4.ignore) - return { event: e14, data: r3, mapping: i4, mappingKey: o4, ignore: true }; - if (i4.name && (e14.name = i4.name), i4.data) { - const t13 = i4.data && await Fn(e14, i4.data, { collector: n5 }); - r3 = Pn(r3) && Pn(t13) ? yn(r3, t13) : t13; - } - } - return { event: e14, data: r3, mapping: i4, mappingKey: o4, ignore: false }; - } - function Zn(e14, t12 = false) { - t12 && console.dir(e14, { depth: 4 }); - } - function ai(e14, t12, n5) { - return function(...i4) { - let o4; - const r3 = "post" + t12, a5 = n5["pre" + t12], s5 = n5[r3]; - return o4 = a5 ? a5({ fn: e14 }, ...i4) : e14(...i4), s5 && (o4 = s5({ fn: e14, result: o4 }, ...i4)), o4; - }; - } - - // node_modules/@walkeros/collector/dist/index.mjs - var e2 = Object.defineProperty; - var n = { Action: "action", Actions: "actions", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" }; - var o = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } }; - var t2 = {}; - ((n5, o4) => { - for (var t12 in o4) - e2(n5, t12, { get: o4[t12], enumerable: true }); - })(t2, { schemas: () => a, settingsSchema: () => s }); - var s = { type: "object", properties: { run: { type: "boolean", description: "Automatically start the collector pipeline on initialization" }, sources: { type: "object", description: "Configurations for sources providing events to the collector" }, destinations: { type: "object", description: "Configurations for destinations receiving processed events" }, consent: { type: "object", description: "Initial consent state to control routing of events" }, verbose: { type: "boolean", description: "Enable verbose logging for debugging" }, onError: { type: "string", description: "Error handler triggered when the collector encounters failures" }, onLog: { type: "string", description: "Custom log handler for collector messages" } } }; - var a = { settings: s }; - async function h2(e14, n5, o4) { - const { code: t12, config: s5 = {}, env: a5 = {} } = n5, i4 = o4 || s5 || { init: false }, c3 = { ...t12, config: i4, env: q2(t12.env, a5) }; - let r3 = c3.config.id; - if (!r3) - do { - r3 = An(4); - } while (e14.destinations[r3]); - return e14.destinations[r3] = c3, false !== c3.config.queue && (c3.queue = [...e14.queue]), y2(e14, void 0, { [r3]: c3 }); - } - async function y2(e14, n5, o4) { - const { allowed: t12, consent: s5, globals: a5, user: i4 } = e14; - if (!t12) - return w2({ ok: false }); - n5 && e14.queue.push(n5), o4 || (o4 = e14.destinations); - const u3 = await Promise.all(Object.entries(o4 || {}).map(async ([o5, t13]) => { - let u4 = (t13.queue || []).map((e15) => ({ ...e15, consent: s5 })); - if (t13.queue = [], n5) { - const e15 = $n(n5); - u4.push(e15); - } - if (!u4.length) - return { id: o5, destination: t13, skipped: true }; - const l4 = [], m3 = u4.filter((e15) => { - const n6 = Ln(t13.config.consent, s5, e15.consent); - return !n6 || (e15.consent = n6, l4.push(e15), false); - }); - if (t13.queue.concat(m3), !l4.length) - return { id: o5, destination: t13, queue: u4 }; - if (!await _n(v2)(e14, t13)) - return { id: o5, destination: t13, queue: u4 }; - let f3 = false; - return t13.dlq || (t13.dlq = []), await Promise.all(l4.map(async (n6) => (n6.globals = yn(a5, n6.globals), n6.user = yn(i4, n6.user), await _n(k, (o6) => (e14.config.onError && e14.config.onError(o6, e14), f3 = true, t13.dlq.push([n6, o6]), false))(e14, t13, n6), n6))), { id: o5, destination: t13, error: f3 }; - })), l3 = [], m2 = [], f2 = []; - for (const e15 of u3) { - if (e15.skipped) - continue; - const n6 = e15.destination, o5 = { id: e15.id, destination: n6 }; - e15.error ? f2.push(o5) : e15.queue && e15.queue.length ? (n6.queue = (n6.queue || []).concat(e15.queue), m2.push(o5)) : l3.push(o5); - } - return w2({ ok: !f2.length, event: n5, successful: l3, queued: m2, failed: f2 }); - } - async function v2(e14, n5) { - if (n5.init && !n5.config.init) { - const o4 = { collector: e14, config: n5.config, env: q2(n5.env, n5.config.env) }, t12 = await ai(n5.init, "DestinationInit", e14.hooks)(o4); - if (false === t12) - return t12; - n5.config = { ...t12 || n5.config, init: true }; - } - return true; - } - async function k(e14, n5, o4) { - const { config: t12 } = n5, s5 = await Qn(o4, t12, e14); - if (s5.ignore) - return false; - const a5 = { collector: e14, config: t12, data: s5.data, mapping: s5.mapping, env: q2(n5.env, t12.env) }, i4 = s5.mapping; - if (i4?.batch && n5.pushBatch) { - const o5 = i4.batched || { key: s5.mappingKey || "", events: [], data: [] }; - o5.events.push(s5.event), xn(s5.data) && o5.data.push(s5.data), i4.batchFn = i4.batchFn || Un((e15, n6) => { - const a6 = { collector: n6, config: t12, data: s5.data, mapping: i4, env: q2(e15.env, t12.env) }; - ai(e15.pushBatch, "DestinationPushBatch", n6.hooks)(o5, a6), o5.events = [], o5.data = []; - }, i4.batch), i4.batched = o5, i4.batchFn?.(n5, e14); - } else - await ai(n5.push, "DestinationPush", e14.hooks)(s5.event, a5); - return true; - } - function w2(e14) { - return yn({ ok: !e14?.failed?.length, successful: [], queued: [], failed: [] }, e14); - } - async function C2(e14, n5 = {}) { - const o4 = {}; - for (const [e15, t12] of Object.entries(n5)) { - const { code: n6, config: s5 = {}, env: a5 = {} } = t12, i4 = { ...n6.config, ...s5 }, c3 = q2(n6.env, a5); - o4[e15] = { ...n6, config: i4, env: c3 }; - } - return o4; - } - function q2(e14, n5) { - return e14 || n5 ? n5 ? e14 && Pn(e14) && Pn(n5) ? { ...e14, ...n5 } : n5 : e14 : {}; - } - function O2(e14, n5, o4) { - const t12 = e14.on, s5 = t12[n5] || [], a5 = vn(o4) ? o4 : [o4]; - a5.forEach((e15) => { - s5.push(e15); - }), t12[n5] = s5, A2(e14, n5, a5); - } - function A2(e14, n5, t12, s5) { - let a5, i4 = t12 || []; - switch (t12 || (i4 = e14.on[n5] || []), n5) { - case o.Commands.Consent: - a5 = s5 || e14.consent; - break; - case o.Commands.Session: - a5 = e14.session; - break; - case o.Commands.Ready: - case o.Commands.Run: - default: - a5 = void 0; - } - if (Object.values(e14.sources).forEach((e15) => { - e15.on && Hn(e15.on)(n5, a5); - }), Object.values(e14.destinations).forEach((e15) => { - if (e15.on) { - const o4 = e15.on; - Hn(o4)(n5, a5); - } - }), i4.length) - switch (n5) { - case o.Commands.Consent: - !function(e15, n6, o4) { - const t13 = o4 || e15.consent; - n6.forEach((n7) => { - Object.keys(t13).filter((e16) => e16 in n7).forEach((o5) => { - Hn(n7[o5])(e15, t13); - }); - }); - }(e14, i4, s5); - break; - case o.Commands.Ready: - case o.Commands.Run: - !function(e15, n6) { - e15.allowed && n6.forEach((n7) => { - Hn(n7)(e15); - }); - }(e14, i4); - break; - case o.Commands.Session: - !function(e15, n6) { - if (!e15.session) - return; - n6.forEach((n7) => { - Hn(n7)(e15, e15.session); - }); - }(e14, i4); - } - } - async function S2(e14, n5) { - const { consent: o4 } = e14; - let t12 = false; - const s5 = {}; - return Object.entries(n5).forEach(([e15, n6]) => { - const o5 = !!n6; - s5[e15] = o5, t12 = t12 || o5; - }), e14.consent = yn(o4, s5), A2(e14, "consent", void 0, s5), t12 ? y2(e14) : w2({ ok: true }); - } - async function B2(e14, n5, t12, s5) { - let a5; - switch (n5) { - case o.Commands.Config: - Pn(t12) && yn(e14.config, t12, { shallow: false }); - break; - case o.Commands.Consent: - Pn(t12) && (a5 = await S2(e14, t12)); - break; - case o.Commands.Custom: - Pn(t12) && (e14.custom = yn(e14.custom, t12)); - break; - case o.Commands.Destination: - Pn(t12) && Cn(t12.push) && (a5 = await h2(e14, { code: t12 }, s5)); - break; - case o.Commands.Globals: - Pn(t12) && (e14.globals = yn(e14.globals, t12)); - break; - case o.Commands.On: - Dn(t12) && O2(e14, t12, s5); - break; - case o.Commands.Ready: - A2(e14, "ready"); - break; - case o.Commands.Run: - a5 = await G(e14, t12); - break; - case o.Commands.Session: - A2(e14, "session"); - break; - case o.Commands.User: - Pn(t12) && yn(e14.user, t12, { shallow: false }); - } - return a5 || { ok: true, successful: [], queued: [], failed: [] }; - } - function F2(e14, n5) { - if (!n5.name) - throw new Error("Event name is required"); - const [o4, t12] = n5.name.split(" "); - if (!o4 || !t12) - throw new Error("Event name is invalid"); - ++e14.count; - const { timestamp: s5 = Date.now(), group: a5 = e14.group, count: i4 = e14.count } = n5, { name: c3 = `${o4} ${t12}`, data: r3 = {}, context: u3 = {}, globals: l3 = e14.globals, custom: d2 = {}, user: m2 = e14.user, nested: f2 = [], consent: g3 = e14.consent, id: p2 = `${s5}-${a5}-${i4}`, trigger: b2 = "", entity: h4 = o4, action: y4 = t12, timing: v4 = 0, version: k3 = { source: e14.version, tagging: e14.config.tagging || 0 }, source: w4 = { type: "collector", id: "", previous_id: "" } } = n5; - return { name: c3, data: r3, context: u3, globals: l3, custom: d2, user: m2, nested: f2, consent: g3, id: p2, trigger: b2, entity: h4, action: y4, timestamp: s5, timing: v4, group: a5, count: i4, version: k3, source: w4 }; - } - async function G(e14, n5) { - e14.allowed = true, e14.count = 0, e14.group = An(), e14.timing = Date.now(), n5 && (n5.consent && (e14.consent = yn(e14.consent, n5.consent)), n5.user && (e14.user = yn(e14.user, n5.user)), n5.globals && (e14.globals = yn(e14.config.globalsStatic || {}, n5.globals)), n5.custom && (e14.custom = yn(e14.custom, n5.custom))), Object.values(e14.destinations).forEach((e15) => { - e15.queue = []; - }), e14.queue = [], e14.round++; - const o4 = await y2(e14); - return A2(e14, "run"), o4; - } - function _2(e14, n5) { - return ai(async (o4, t12 = {}) => await _n(async () => { - let s5 = o4; - if (t12.mapping) { - const n6 = await Qn(s5, t12.mapping, e14); - if (n6.ignore) - return w2({ ok: true }); - if (t12.mapping.consent) { - if (!Ln(t12.mapping.consent, e14.consent, n6.event.consent)) - return w2({ ok: true }); - } - s5 = n6.event; - } - const a5 = n5(s5), i4 = F2(e14, a5); - return await y2(e14, i4); - }, () => w2({ ok: false }))(), "Push", e14.hooks); - } - async function J2(e14) { - const n5 = yn({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o4, run: true }, e14, { merge: false, extend: false }); - function o4(e15, o5) { - Zn({ message: e15 }, o5 || n5.verbose); - } - n5.onLog = o4; - const t12 = { ...n5.globalsStatic, ...e14.globals }, s5 = { allowed: false, config: n5, consent: e14.consent || {}, count: 0, custom: e14.custom || {}, destinations: {}, globals: t12, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e14.user || {}, version: "0.3.0", sources: {}, push: void 0, command: void 0 }; - return s5.push = _2(s5, (e15) => ({ timing: Math.round((Date.now() - s5.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e15 })), s5.command = function(e15, n6) { - return ai(async (o5, t13, s6) => await _n(async () => await n6(e15, o5, t13, s6), () => w2({ ok: false }))(), "Command", e15.hooks); - }(s5, B2), s5.destinations = await C2(0, e14.destinations || {}), s5; - } - async function Q(e14, n5 = {}) { - const o4 = {}; - for (const [t12, s5] of Object.entries(n5)) { - const { code: n6, config: a5 = {}, env: i4 = {}, primary: c3 } = s5, r3 = { push: (n7, o5 = {}) => e14.push(n7, { ...o5, mapping: a5 }), command: e14.command, sources: e14.sources, elb: e14.sources.elb.push, ...i4 }, u3 = await _n(n6)(a5, r3); - u3 && (c3 && (u3.config = { ...u3.config, primary: c3 }), o4[t12] = u3); - } - return o4; - } - async function T2(e14) { - e14 = e14 || {}; - const n5 = await J2(e14), o4 = (t12 = n5, { type: "elb", config: {}, push: async (e15, n6, o5, s6, a6, i5) => { - if ("string" == typeof e15 && e15.startsWith("walker ")) { - const s7 = e15.replace("walker ", ""); - return t12.command(s7, n6, o5); - } - let c4; - if ("string" == typeof e15) - c4 = { name: e15 }, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c4.data = n6); - else { - if (!e15 || "object" != typeof e15) - return { ok: false, successful: [], queued: [], failed: [] }; - c4 = e15, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c4.data = { ...c4.data || {}, ...n6 }); - } - return s6 && "object" == typeof s6 && (c4.context = s6), a6 && Array.isArray(a6) && (c4.nested = a6), i5 && "object" == typeof i5 && (c4.custom = i5), t12.push(c4); - } }); - var t12; - n5.sources.elb = o4; - const s5 = await Q(n5, e14.sources || {}); - Object.assign(n5.sources, s5); - const { consent: a5, user: i4, globals: c3, custom: r3 } = e14; - a5 && await n5.command("consent", a5), i4 && await n5.command("user", i4), c3 && Object.assign(n5.globals, c3), r3 && Object.assign(n5.custom, r3), n5.config.run && await n5.command("run"); - let u3 = o4.push; - const l3 = Object.values(n5.sources).filter((e15) => "elb" !== e15.type), d2 = l3.find((e15) => e15.config.primary); - return d2 ? u3 = d2.push : l3.length > 0 && (u3 = l3[0].push), { collector: n5, elb: u3 }; - } - - // node_modules/@walkeros/source-demo/dist/index.mjs - var e3 = Object.defineProperty; - var s2 = (s5, t12) => { - for (var a5 in t12) - e3(s5, a5, { get: t12[a5], enumerable: true }); - }; - var a2 = {}; - s2(a2, { env: () => n2 }); - var n2 = {}; - s2(n2, { init: () => i, push: () => r, simulation: () => u }); - var o2 = async () => ({ ok: true, successful: [], queued: [], failed: [] }); - var i = void 0; - var r = { push: o2, command: o2, elb: o2 }; - var u = ["call:elb"]; - var c = async (e14, s5) => { - const { elb: t12 } = s5, a5 = { ...e14, settings: e14?.settings || { events: [] } }; - return (a5.settings?.events || []).forEach((e15) => { - const { delay: s6, ...a6 } = e15; - setTimeout(() => t12(a6), s6 || 0); - }), { type: "demo", config: a5, push: t12 }; - }; - - // node_modules/@walkeros/destination-demo/dist/index.mjs - var e4 = Object.defineProperty; - var n3 = (n5, o4) => { - for (var i4 in o4) - e4(n5, i4, { get: o4[i4], enumerable: true }); - }; - var i2 = {}; - n3(i2, { env: () => t3 }); - var t3 = {}; - n3(t3, { init: () => s3, push: () => a3, simulation: () => l }); - var s3 = { log: void 0 }; - var a3 = { log: Object.assign(() => { - }, {}) }; - var l = ["call:log"]; - var g = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e14, env: n5 }) { - (n5?.log || console.log)(`[${{ name: "demo", ...e14?.settings }.name}] initialized`); - }, push(e14, { config: n5, env: o4 }) { - const i4 = o4?.log || console.log, t12 = { name: "demo", ...n5?.settings }, s5 = t12.values ? function(e15, n6) { - const o5 = {}; - for (const i5 of n6) { - const n7 = i5.split(".").reduce((e16, n8) => e16?.[n8], e15); - void 0 !== n7 && (o5[i5] = n7); - } - return o5; - }(e14, t12.values) : e14; - i4(`[${t12.name}] ${JSON.stringify(s5, null, 2)}`); - } }; - - // node_modules/@walkeros/web-destination-api/dist/index.mjs - var e5; - var t4; - var n4; - var a4 = Object.defineProperty; - var r2 = (e14, t12) => { - for (var n5 in t12) - a4(e14, n5, { get: t12[n5], enumerable: true }); - }; - var i3 = {}; - r2(i3, { BRAND: () => De2, DIRTY: () => k2, EMPTY_PATH: () => g2, INVALID: () => S3, NEVER: () => Nt2, OK: () => x2, ParseStatus: () => _3, Schema: () => E2, ZodAny: () => ue2, ZodArray: () => he2, ZodBigInt: () => re2, ZodBoolean: () => ie2, ZodBranded: () => Le2, ZodCatch: () => Me2, ZodDate: () => se, ZodDefault: () => Re2, ZodDiscriminatedUnion: () => be2, ZodEffects: () => Ne2, ZodEnum: () => Oe, ZodError: () => u2, ZodFirstPartyTypeKind: () => Be2, ZodFunction: () => je2, ZodIntersection: () => Se2, ZodIssueCode: () => c2, ZodLazy: () => Pe2, ZodLiteral: () => Te2, ZodMap: () => we2, ZodNaN: () => ze2, ZodNativeEnum: () => Ce2, ZodNever: () => pe2, ZodNull: () => de2, ZodNullable: () => Ie, ZodNumber: () => ae, ZodObject: () => ge2, ZodOptional: () => $e2, ZodParsedType: () => s4, ZodPipeline: () => Fe2, ZodPromise: () => Ee2, ZodReadonly: () => Ue2, ZodRecord: () => xe2, ZodSchema: () => E2, ZodSet: () => Ze2, ZodString: () => te2, ZodSymbol: () => oe2, ZodTransformer: () => Ne2, ZodTuple: () => ke2, ZodType: () => E2, ZodUndefined: () => ce2, ZodUnion: () => ye2, ZodUnknown: () => le2, ZodVoid: () => me2, addIssueToContext: () => y3, any: () => rt2, array: () => ct2, bigint: () => Qe2, boolean: () => Xe2, coerce: () => Et2, custom: () => Ve2, date: () => et, datetimeRegex: () => Y, defaultErrorMap: () => l2, discriminatedUnion: () => pt2, effect: () => wt2, enum: () => St2, function: () => vt2, getErrorMap: () => h3, getParsedType: () => o3, instanceof: () => Ke2, intersection: () => mt2, isAborted: () => w3, isAsync: () => P2, isDirty: () => Z2, isValid: () => j2, late: () => We2, lazy: () => bt2, literal: () => _t, makeIssue: () => f, map: () => gt2, nan: () => Ye2, nativeEnum: () => kt2, never: () => st2, null: () => at2, nullable: () => jt2, number: () => Ge2, object: () => dt2, objectUtil: () => n4, oboolean: () => Ct2, onumber: () => Ot2, optional: () => Zt2, ostring: () => At2, pipeline: () => Tt2, preprocess: () => Pt2, promise: () => xt2, quotelessJson: () => d, record: () => ft2, set: () => yt2, setErrorMap: () => m, strictObject: () => ut2, string: () => He2, symbol: () => tt, transformer: () => wt2, tuple: () => ht2, undefined: () => nt2, union: () => lt2, unknown: () => it2, util: () => e5, void: () => ot2 }), (t4 = e5 || (e5 = {})).assertEqual = (e14) => { - }, t4.assertIs = function(e14) { - }, t4.assertNever = function(e14) { - throw new Error(); - }, t4.arrayToEnum = (e14) => { - const t12 = {}; - for (const n5 of e14) - t12[n5] = n5; - return t12; - }, t4.getValidEnumValues = (e14) => { - const n5 = t4.objectKeys(e14).filter((t12) => "number" != typeof e14[e14[t12]]), a5 = {}; - for (const t12 of n5) - a5[t12] = e14[t12]; - return t4.objectValues(a5); - }, t4.objectValues = (e14) => t4.objectKeys(e14).map(function(t12) { - return e14[t12]; - }), t4.objectKeys = "function" == typeof Object.keys ? (e14) => Object.keys(e14) : (e14) => { - const t12 = []; - for (const n5 in e14) - Object.prototype.hasOwnProperty.call(e14, n5) && t12.push(n5); - return t12; - }, t4.find = (e14, t12) => { - for (const n5 of e14) - if (t12(n5)) - return n5; - }, t4.isInteger = "function" == typeof Number.isInteger ? (e14) => Number.isInteger(e14) : (e14) => "number" == typeof e14 && Number.isFinite(e14) && Math.floor(e14) === e14, t4.joinValues = function(e14, t12 = " | ") { - return e14.map((e15) => "string" == typeof e15 ? `'${e15}'` : e15).join(t12); - }, t4.jsonStringifyReplacer = (e14, t12) => "bigint" == typeof t12 ? t12.toString() : t12, (n4 || (n4 = {})).mergeShapes = (e14, t12) => ({ ...e14, ...t12 }); - var s4 = e5.arrayToEnum(["string", "nan", "number", "integer", "float", "boolean", "date", "bigint", "symbol", "function", "undefined", "null", "array", "object", "unknown", "promise", "void", "never", "map", "set"]); - var o3 = (e14) => { - switch (typeof e14) { - case "undefined": - return s4.undefined; - case "string": - return s4.string; - case "number": - return Number.isNaN(e14) ? s4.nan : s4.number; - case "boolean": - return s4.boolean; - case "function": - return s4.function; - case "bigint": - return s4.bigint; - case "symbol": - return s4.symbol; - case "object": - return Array.isArray(e14) ? s4.array : null === e14 ? s4.null : e14.then && "function" == typeof e14.then && e14.catch && "function" == typeof e14.catch ? s4.promise : "undefined" != typeof Map && e14 instanceof Map ? s4.map : "undefined" != typeof Set && e14 instanceof Set ? s4.set : "undefined" != typeof Date && e14 instanceof Date ? s4.date : s4.object; - default: - return s4.unknown; - } - }; - var c2 = e5.arrayToEnum(["invalid_type", "invalid_literal", "custom", "invalid_union", "invalid_union_discriminator", "invalid_enum_value", "unrecognized_keys", "invalid_arguments", "invalid_return_type", "invalid_date", "invalid_string", "too_small", "too_big", "invalid_intersection_types", "not_multiple_of", "not_finite"]); - var d = (e14) => JSON.stringify(e14, null, 2).replace(/"([^"]+)":/g, "$1:"); - var u2 = class t5 extends Error { - get errors() { - return this.issues; - } - constructor(e14) { - super(), this.issues = [], this.addIssue = (e15) => { - this.issues = [...this.issues, e15]; - }, this.addIssues = (e15 = []) => { - this.issues = [...this.issues, ...e15]; - }; - const t12 = new.target.prototype; - Object.setPrototypeOf ? Object.setPrototypeOf(this, t12) : this.__proto__ = t12, this.name = "ZodError", this.issues = e14; - } - format(e14) { - const t12 = e14 || function(e15) { - return e15.message; - }, n5 = { _errors: [] }, a5 = (e15) => { - for (const r3 of e15.issues) - if ("invalid_union" === r3.code) - r3.unionErrors.map(a5); - else if ("invalid_return_type" === r3.code) - a5(r3.returnTypeError); - else if ("invalid_arguments" === r3.code) - a5(r3.argumentsError); - else if (0 === r3.path.length) - n5._errors.push(t12(r3)); - else { - let e16 = n5, a6 = 0; - for (; a6 < r3.path.length; ) { - const n6 = r3.path[a6]; - a6 === r3.path.length - 1 ? (e16[n6] = e16[n6] || { _errors: [] }, e16[n6]._errors.push(t12(r3))) : e16[n6] = e16[n6] || { _errors: [] }, e16 = e16[n6], a6++; - } - } - }; - return a5(this), n5; - } - static assert(e14) { - if (!(e14 instanceof t5)) - throw new Error(`Not a ZodError: ${e14}`); - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, e5.jsonStringifyReplacer, 2); - } - get isEmpty() { - return 0 === this.issues.length; - } - flatten(e14 = (e15) => e15.message) { - const t12 = {}, n5 = []; - for (const a5 of this.issues) - if (a5.path.length > 0) { - const n6 = a5.path[0]; - t12[n6] = t12[n6] || [], t12[n6].push(e14(a5)); - } else - n5.push(e14(a5)); - return { formErrors: n5, fieldErrors: t12 }; - } - get formErrors() { - return this.flatten(); - } - }; - u2.create = (e14) => new u2(e14); - var l2 = (t12, n5) => { - let a5; - switch (t12.code) { - case c2.invalid_type: - a5 = t12.received === s4.undefined ? "Required" : `Expected ${t12.expected}, received ${t12.received}`; - break; - case c2.invalid_literal: - a5 = `Invalid literal value, expected ${JSON.stringify(t12.expected, e5.jsonStringifyReplacer)}`; - break; - case c2.unrecognized_keys: - a5 = `Unrecognized key(s) in object: ${e5.joinValues(t12.keys, ", ")}`; - break; - case c2.invalid_union: - a5 = "Invalid input"; - break; - case c2.invalid_union_discriminator: - a5 = `Invalid discriminator value. Expected ${e5.joinValues(t12.options)}`; - break; - case c2.invalid_enum_value: - a5 = `Invalid enum value. Expected ${e5.joinValues(t12.options)}, received '${t12.received}'`; - break; - case c2.invalid_arguments: - a5 = "Invalid function arguments"; - break; - case c2.invalid_return_type: - a5 = "Invalid function return type"; - break; - case c2.invalid_date: - a5 = "Invalid date"; - break; - case c2.invalid_string: - "object" == typeof t12.validation ? "includes" in t12.validation ? (a5 = `Invalid input: must include "${t12.validation.includes}"`, "number" == typeof t12.validation.position && (a5 = `${a5} at one or more positions greater than or equal to ${t12.validation.position}`)) : "startsWith" in t12.validation ? a5 = `Invalid input: must start with "${t12.validation.startsWith}"` : "endsWith" in t12.validation ? a5 = `Invalid input: must end with "${t12.validation.endsWith}"` : e5.assertNever(t12.validation) : a5 = "regex" !== t12.validation ? `Invalid ${t12.validation}` : "Invalid"; - break; - case c2.too_small: - a5 = "array" === t12.type ? `Array must contain ${t12.exact ? "exactly" : t12.inclusive ? "at least" : "more than"} ${t12.minimum} element(s)` : "string" === t12.type ? `String must contain ${t12.exact ? "exactly" : t12.inclusive ? "at least" : "over"} ${t12.minimum} character(s)` : "number" === t12.type || "bigint" === t12.type ? `Number must be ${t12.exact ? "exactly equal to " : t12.inclusive ? "greater than or equal to " : "greater than "}${t12.minimum}` : "date" === t12.type ? `Date must be ${t12.exact ? "exactly equal to " : t12.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t12.minimum))}` : "Invalid input"; - break; - case c2.too_big: - a5 = "array" === t12.type ? `Array must contain ${t12.exact ? "exactly" : t12.inclusive ? "at most" : "less than"} ${t12.maximum} element(s)` : "string" === t12.type ? `String must contain ${t12.exact ? "exactly" : t12.inclusive ? "at most" : "under"} ${t12.maximum} character(s)` : "number" === t12.type ? `Number must be ${t12.exact ? "exactly" : t12.inclusive ? "less than or equal to" : "less than"} ${t12.maximum}` : "bigint" === t12.type ? `BigInt must be ${t12.exact ? "exactly" : t12.inclusive ? "less than or equal to" : "less than"} ${t12.maximum}` : "date" === t12.type ? `Date must be ${t12.exact ? "exactly" : t12.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t12.maximum))}` : "Invalid input"; - break; - case c2.custom: - a5 = "Invalid input"; - break; - case c2.invalid_intersection_types: - a5 = "Intersection results could not be merged"; - break; - case c2.not_multiple_of: - a5 = `Number must be a multiple of ${t12.multipleOf}`; - break; - case c2.not_finite: - a5 = "Number must be finite"; - break; - default: - a5 = n5.defaultError, e5.assertNever(t12); - } - return { message: a5 }; - }; - var p = l2; - function m(e14) { - p = e14; - } - function h3() { - return p; - } - var f = (e14) => { - const { data: t12, path: n5, errorMaps: a5, issueData: r3 } = e14, i4 = [...n5, ...r3.path || []], s5 = { ...r3, path: i4 }; - if (void 0 !== r3.message) - return { ...r3, path: i4, message: r3.message }; - let o4 = ""; - const c3 = a5.filter((e15) => !!e15).slice().reverse(); - for (const e15 of c3) - o4 = e15(s5, { data: t12, defaultError: o4 }).message; - return { ...r3, path: i4, message: o4 }; - }; - var g2 = []; - function y3(e14, t12) { - const n5 = h3(), a5 = f({ issueData: t12, data: e14.data, path: e14.path, errorMaps: [e14.common.contextualErrorMap, e14.schemaErrorMap, n5, n5 === l2 ? void 0 : l2].filter((e15) => !!e15) }); - e14.common.issues.push(a5); - } - var v3; - var b; - var _3 = class e6 { - constructor() { - this.value = "valid"; - } - dirty() { - "valid" === this.value && (this.value = "dirty"); - } - abort() { - "aborted" !== this.value && (this.value = "aborted"); - } - static mergeArray(e14, t12) { - const n5 = []; - for (const a5 of t12) { - if ("aborted" === a5.status) - return S3; - "dirty" === a5.status && e14.dirty(), n5.push(a5.value); - } - return { status: e14.value, value: n5 }; - } - static async mergeObjectAsync(t12, n5) { - const a5 = []; - for (const e14 of n5) { - const t13 = await e14.key, n6 = await e14.value; - a5.push({ key: t13, value: n6 }); - } - return e6.mergeObjectSync(t12, a5); - } - static mergeObjectSync(e14, t12) { - const n5 = {}; - for (const a5 of t12) { - const { key: t13, value: r3 } = a5; - if ("aborted" === t13.status) - return S3; - if ("aborted" === r3.status) - return S3; - "dirty" === t13.status && e14.dirty(), "dirty" === r3.status && e14.dirty(), "__proto__" === t13.value || void 0 === r3.value && !a5.alwaysSet || (n5[t13.value] = r3.value); - } - return { status: e14.value, value: n5 }; - } - }; - var S3 = Object.freeze({ status: "aborted" }); - var k2 = (e14) => ({ status: "dirty", value: e14 }); - var x2 = (e14) => ({ status: "valid", value: e14 }); - var w3 = (e14) => "aborted" === e14.status; - var Z2 = (e14) => "dirty" === e14.status; - var j2 = (e14) => "valid" === e14.status; - var P2 = (e14) => "undefined" != typeof Promise && e14 instanceof Promise; - (b = v3 || (v3 = {})).errToObj = (e14) => "string" == typeof e14 ? { message: e14 } : e14 || {}, b.toString = (e14) => "string" == typeof e14 ? e14 : null == e14 ? void 0 : e14.message; - var T3 = class { - constructor(e14, t12, n5, a5) { - this._cachedPath = [], this.parent = e14, this.data = t12, this._path = n5, this._key = a5; - } - get path() { - return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; - } - }; - var A3 = (e14, t12) => { - if (j2(t12)) - return { success: true, data: t12.value }; - if (!e14.common.issues.length) - throw new Error("Validation failed but no issues detected."); - return { success: false, get error() { - if (this._error) - return this._error; - const t13 = new u2(e14.common.issues); - return this._error = t13, this._error; - } }; - }; - function O3(e14) { - if (!e14) - return {}; - const { errorMap: t12, invalid_type_error: n5, required_error: a5, description: r3 } = e14; - if (t12 && (n5 || a5)) - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - if (t12) - return { errorMap: t12, description: r3 }; - return { errorMap: (t13, r4) => { - var i4, s5; - const { message: o4 } = e14; - return "invalid_enum_value" === t13.code ? { message: null != o4 ? o4 : r4.defaultError } : void 0 === r4.data ? { message: null != (i4 = null != o4 ? o4 : a5) ? i4 : r4.defaultError } : "invalid_type" !== t13.code ? { message: r4.defaultError } : { message: null != (s5 = null != o4 ? o4 : n5) ? s5 : r4.defaultError }; - }, description: r3 }; - } - var C3; - var E2 = class { - get description() { - return this._def.description; - } - _getType(e14) { - return o3(e14.data); - } - _getOrReturnCtx(e14, t12) { - return t12 || { common: e14.parent.common, data: e14.data, parsedType: o3(e14.data), schemaErrorMap: this._def.errorMap, path: e14.path, parent: e14.parent }; - } - _processInputParams(e14) { - return { status: new _3(), ctx: { common: e14.parent.common, data: e14.data, parsedType: o3(e14.data), schemaErrorMap: this._def.errorMap, path: e14.path, parent: e14.parent } }; - } - _parseSync(e14) { - const t12 = this._parse(e14); - if (P2(t12)) - throw new Error("Synchronous parse encountered promise."); - return t12; - } - _parseAsync(e14) { - const t12 = this._parse(e14); - return Promise.resolve(t12); - } - parse(e14, t12) { - const n5 = this.safeParse(e14, t12); - if (n5.success) - return n5.data; - throw n5.error; - } - safeParse(e14, t12) { - var n5; - const a5 = { common: { issues: [], async: null != (n5 = null == t12 ? void 0 : t12.async) && n5, contextualErrorMap: null == t12 ? void 0 : t12.errorMap }, path: (null == t12 ? void 0 : t12.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }, r3 = this._parseSync({ data: e14, path: a5.path, parent: a5 }); - return A3(a5, r3); - } - "~validate"(e14) { - var t12, n5; - const a5 = { common: { issues: [], async: !!this["~standard"].async }, path: [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }; - if (!this["~standard"].async) - try { - const t13 = this._parseSync({ data: e14, path: [], parent: a5 }); - return j2(t13) ? { value: t13.value } : { issues: a5.common.issues }; - } catch (e15) { - (null == (n5 = null == (t12 = null == e15 ? void 0 : e15.message) ? void 0 : t12.toLowerCase()) ? void 0 : n5.includes("encountered")) && (this["~standard"].async = true), a5.common = { issues: [], async: true }; - } - return this._parseAsync({ data: e14, path: [], parent: a5 }).then((e15) => j2(e15) ? { value: e15.value } : { issues: a5.common.issues }); - } - async parseAsync(e14, t12) { - const n5 = await this.safeParseAsync(e14, t12); - if (n5.success) - return n5.data; - throw n5.error; - } - async safeParseAsync(e14, t12) { - const n5 = { common: { issues: [], contextualErrorMap: null == t12 ? void 0 : t12.errorMap, async: true }, path: (null == t12 ? void 0 : t12.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e14, parsedType: o3(e14) }, a5 = this._parse({ data: e14, path: n5.path, parent: n5 }), r3 = await (P2(a5) ? a5 : Promise.resolve(a5)); - return A3(n5, r3); - } - refine(e14, t12) { - const n5 = (e15) => "string" == typeof t12 || void 0 === t12 ? { message: t12 } : "function" == typeof t12 ? t12(e15) : t12; - return this._refinement((t13, a5) => { - const r3 = e14(t13), i4 = () => a5.addIssue({ code: c2.custom, ...n5(t13) }); - return "undefined" != typeof Promise && r3 instanceof Promise ? r3.then((e15) => !!e15 || (i4(), false)) : !!r3 || (i4(), false); - }); - } - refinement(e14, t12) { - return this._refinement((n5, a5) => !!e14(n5) || (a5.addIssue("function" == typeof t12 ? t12(n5, a5) : t12), false)); - } - _refinement(e14) { - return new Ne2({ schema: this, typeName: Be2.ZodEffects, effect: { type: "refinement", refinement: e14 } }); - } - superRefine(e14) { - return this._refinement(e14); - } - constructor(e14) { - this.spa = this.safeParseAsync, this._def = e14, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = { version: 1, vendor: "zod", validate: (e15) => this["~validate"](e15) }; - } - optional() { - return $e2.create(this, this._def); - } - nullable() { - return Ie.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return he2.create(this); - } - promise() { - return Ee2.create(this, this._def); - } - or(e14) { - return ye2.create([this, e14], this._def); - } - and(e14) { - return Se2.create(this, e14, this._def); - } - transform(e14) { - return new Ne2({ ...O3(this._def), schema: this, typeName: Be2.ZodEffects, effect: { type: "transform", transform: e14 } }); - } - default(e14) { - const t12 = "function" == typeof e14 ? e14 : () => e14; - return new Re2({ ...O3(this._def), innerType: this, defaultValue: t12, typeName: Be2.ZodDefault }); - } - brand() { - return new Le2({ typeName: Be2.ZodBranded, type: this, ...O3(this._def) }); - } - catch(e14) { - const t12 = "function" == typeof e14 ? e14 : () => e14; - return new Me2({ ...O3(this._def), innerType: this, catchValue: t12, typeName: Be2.ZodCatch }); - } - describe(e14) { - return new (0, this.constructor)({ ...this._def, description: e14 }); - } - pipe(e14) { - return Fe2.create(this, e14); - } - readonly() { - return Ue2.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - var N2 = /^c[^\s-]{8,}$/i; - var $2 = /^[0-9a-z]+$/; - var I2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - var R2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; - var M2 = /^[a-z0-9_-]{21}$/i; - var z = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - var D = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; - var L2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - var F3 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - var U2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var J3 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; - var V2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var B3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var q3 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var W2 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))"; - var K2 = new RegExp(`^${W2}$`); - function H2(e14) { - let t12 = "[0-5]\\d"; - e14.precision ? t12 = `${t12}\\.\\d{${e14.precision}}` : null == e14.precision && (t12 = `${t12}(\\.\\d+)?`); - return `([01]\\d|2[0-3]):[0-5]\\d(:${t12})${e14.precision ? "+" : "?"}`; - } - function G2(e14) { - return new RegExp(`^${H2(e14)}$`); - } - function Y(e14) { - let t12 = `${W2}T${H2(e14)}`; - const n5 = []; - return n5.push(e14.local ? "Z?" : "Z"), e14.offset && n5.push("([+-]\\d{2}:?\\d{2})"), t12 = `${t12}(${n5.join("|")})`, new RegExp(`^${t12}$`); - } - function Q2(e14, t12) { - return !("v4" !== t12 && t12 || !F3.test(e14)) || !("v6" !== t12 && t12 || !J3.test(e14)); - } - function X(e14, t12) { - if (!z.test(e14)) - return false; - try { - const [n5] = e14.split("."); - if (!n5) - return false; - const a5 = n5.replace(/-/g, "+").replace(/_/g, "/").padEnd(n5.length + (4 - n5.length % 4) % 4, "="), r3 = JSON.parse(atob(a5)); - return "object" == typeof r3 && null !== r3 && ((!("typ" in r3) || "JWT" === (null == r3 ? void 0 : r3.typ)) && (!!r3.alg && (!t12 || r3.alg === t12))); - } catch (e15) { - return false; - } - } - function ee2(e14, t12) { - return !("v4" !== t12 && t12 || !U2.test(e14)) || !("v6" !== t12 && t12 || !V2.test(e14)); - } - var te2 = class t6 extends E2 { - _parse(t12) { - this._def.coerce && (t12.data = String(t12.data)); - if (this._getType(t12) !== s4.string) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.string, received: e14.parsedType }), S3; - } - const n5 = new _3(); - let a5; - for (const r3 of this._def.checks) - if ("min" === r3.kind) - t12.data.length < r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_small, minimum: r3.value, type: "string", inclusive: true, exact: false, message: r3.message }), n5.dirty()); - else if ("max" === r3.kind) - t12.data.length > r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_big, maximum: r3.value, type: "string", inclusive: true, exact: false, message: r3.message }), n5.dirty()); - else if ("length" === r3.kind) { - const e14 = t12.data.length > r3.value, i4 = t12.data.length < r3.value; - (e14 || i4) && (a5 = this._getOrReturnCtx(t12, a5), e14 ? y3(a5, { code: c2.too_big, maximum: r3.value, type: "string", inclusive: true, exact: true, message: r3.message }) : i4 && y3(a5, { code: c2.too_small, minimum: r3.value, type: "string", inclusive: true, exact: true, message: r3.message }), n5.dirty()); - } else if ("email" === r3.kind) - L2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "email", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("emoji" === r3.kind) - C3 || (C3 = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), C3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "emoji", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("uuid" === r3.kind) - R2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "uuid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("nanoid" === r3.kind) - M2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "nanoid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("cuid" === r3.kind) - N2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cuid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("cuid2" === r3.kind) - $2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cuid2", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("ulid" === r3.kind) - I2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "ulid", code: c2.invalid_string, message: r3.message }), n5.dirty()); - else if ("url" === r3.kind) - try { - new URL(t12.data); - } catch (e14) { - a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "url", code: c2.invalid_string, message: r3.message }), n5.dirty(); - } - else if ("regex" === r3.kind) { - r3.regex.lastIndex = 0; - r3.regex.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "regex", code: c2.invalid_string, message: r3.message }), n5.dirty()); - } else if ("trim" === r3.kind) - t12.data = t12.data.trim(); - else if ("includes" === r3.kind) - t12.data.includes(r3.value, r3.position) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { includes: r3.value, position: r3.position }, message: r3.message }), n5.dirty()); - else if ("toLowerCase" === r3.kind) - t12.data = t12.data.toLowerCase(); - else if ("toUpperCase" === r3.kind) - t12.data = t12.data.toUpperCase(); - else if ("startsWith" === r3.kind) - t12.data.startsWith(r3.value) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { startsWith: r3.value }, message: r3.message }), n5.dirty()); - else if ("endsWith" === r3.kind) - t12.data.endsWith(r3.value) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: { endsWith: r3.value }, message: r3.message }), n5.dirty()); - else if ("datetime" === r3.kind) { - Y(r3).test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "datetime", message: r3.message }), n5.dirty()); - } else if ("date" === r3.kind) { - K2.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "date", message: r3.message }), n5.dirty()); - } else if ("time" === r3.kind) { - G2(r3).test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.invalid_string, validation: "time", message: r3.message }), n5.dirty()); - } else - "duration" === r3.kind ? D.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "duration", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "ip" === r3.kind ? Q2(t12.data, r3.version) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "ip", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "jwt" === r3.kind ? X(t12.data, r3.alg) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "jwt", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "cidr" === r3.kind ? ee2(t12.data, r3.version) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "cidr", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "base64" === r3.kind ? B3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "base64", code: c2.invalid_string, message: r3.message }), n5.dirty()) : "base64url" === r3.kind ? q3.test(t12.data) || (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { validation: "base64url", code: c2.invalid_string, message: r3.message }), n5.dirty()) : e5.assertNever(r3); - return { status: n5.value, value: t12.data }; - } - _regex(e14, t12, n5) { - return this.refinement((t13) => e14.test(t13), { validation: t12, code: c2.invalid_string, ...v3.errToObj(n5) }); - } - _addCheck(e14) { - return new t6({ ...this._def, checks: [...this._def.checks, e14] }); - } - email(e14) { - return this._addCheck({ kind: "email", ...v3.errToObj(e14) }); - } - url(e14) { - return this._addCheck({ kind: "url", ...v3.errToObj(e14) }); - } - emoji(e14) { - return this._addCheck({ kind: "emoji", ...v3.errToObj(e14) }); - } - uuid(e14) { - return this._addCheck({ kind: "uuid", ...v3.errToObj(e14) }); - } - nanoid(e14) { - return this._addCheck({ kind: "nanoid", ...v3.errToObj(e14) }); - } - cuid(e14) { - return this._addCheck({ kind: "cuid", ...v3.errToObj(e14) }); - } - cuid2(e14) { - return this._addCheck({ kind: "cuid2", ...v3.errToObj(e14) }); - } - ulid(e14) { - return this._addCheck({ kind: "ulid", ...v3.errToObj(e14) }); - } - base64(e14) { - return this._addCheck({ kind: "base64", ...v3.errToObj(e14) }); - } - base64url(e14) { - return this._addCheck({ kind: "base64url", ...v3.errToObj(e14) }); - } - jwt(e14) { - return this._addCheck({ kind: "jwt", ...v3.errToObj(e14) }); - } - ip(e14) { - return this._addCheck({ kind: "ip", ...v3.errToObj(e14) }); - } - cidr(e14) { - return this._addCheck({ kind: "cidr", ...v3.errToObj(e14) }); - } - datetime(e14) { - var t12, n5; - return "string" == typeof e14 ? this._addCheck({ kind: "datetime", precision: null, offset: false, local: false, message: e14 }) : this._addCheck({ kind: "datetime", precision: void 0 === (null == e14 ? void 0 : e14.precision) ? null : null == e14 ? void 0 : e14.precision, offset: null != (t12 = null == e14 ? void 0 : e14.offset) && t12, local: null != (n5 = null == e14 ? void 0 : e14.local) && n5, ...v3.errToObj(null == e14 ? void 0 : e14.message) }); - } - date(e14) { - return this._addCheck({ kind: "date", message: e14 }); - } - time(e14) { - return "string" == typeof e14 ? this._addCheck({ kind: "time", precision: null, message: e14 }) : this._addCheck({ kind: "time", precision: void 0 === (null == e14 ? void 0 : e14.precision) ? null : null == e14 ? void 0 : e14.precision, ...v3.errToObj(null == e14 ? void 0 : e14.message) }); - } - duration(e14) { - return this._addCheck({ kind: "duration", ...v3.errToObj(e14) }); - } - regex(e14, t12) { - return this._addCheck({ kind: "regex", regex: e14, ...v3.errToObj(t12) }); - } - includes(e14, t12) { - return this._addCheck({ kind: "includes", value: e14, position: null == t12 ? void 0 : t12.position, ...v3.errToObj(null == t12 ? void 0 : t12.message) }); - } - startsWith(e14, t12) { - return this._addCheck({ kind: "startsWith", value: e14, ...v3.errToObj(t12) }); - } - endsWith(e14, t12) { - return this._addCheck({ kind: "endsWith", value: e14, ...v3.errToObj(t12) }); - } - min(e14, t12) { - return this._addCheck({ kind: "min", value: e14, ...v3.errToObj(t12) }); - } - max(e14, t12) { - return this._addCheck({ kind: "max", value: e14, ...v3.errToObj(t12) }); - } - length(e14, t12) { - return this._addCheck({ kind: "length", value: e14, ...v3.errToObj(t12) }); - } - nonempty(e14) { - return this.min(1, v3.errToObj(e14)); - } - trim() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "trim" }] }); - } - toLowerCase() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "toLowerCase" }] }); - } - toUpperCase() { - return new t6({ ...this._def, checks: [...this._def.checks, { kind: "toUpperCase" }] }); - } - get isDatetime() { - return !!this._def.checks.find((e14) => "datetime" === e14.kind); - } - get isDate() { - return !!this._def.checks.find((e14) => "date" === e14.kind); - } - get isTime() { - return !!this._def.checks.find((e14) => "time" === e14.kind); - } - get isDuration() { - return !!this._def.checks.find((e14) => "duration" === e14.kind); - } - get isEmail() { - return !!this._def.checks.find((e14) => "email" === e14.kind); - } - get isURL() { - return !!this._def.checks.find((e14) => "url" === e14.kind); - } - get isEmoji() { - return !!this._def.checks.find((e14) => "emoji" === e14.kind); - } - get isUUID() { - return !!this._def.checks.find((e14) => "uuid" === e14.kind); - } - get isNANOID() { - return !!this._def.checks.find((e14) => "nanoid" === e14.kind); - } - get isCUID() { - return !!this._def.checks.find((e14) => "cuid" === e14.kind); - } - get isCUID2() { - return !!this._def.checks.find((e14) => "cuid2" === e14.kind); - } - get isULID() { - return !!this._def.checks.find((e14) => "ulid" === e14.kind); - } - get isIP() { - return !!this._def.checks.find((e14) => "ip" === e14.kind); - } - get isCIDR() { - return !!this._def.checks.find((e14) => "cidr" === e14.kind); - } - get isBase64() { - return !!this._def.checks.find((e14) => "base64" === e14.kind); - } - get isBase64url() { - return !!this._def.checks.find((e14) => "base64url" === e14.kind); - } - get minLength() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxLength() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - }; - function ne2(e14, t12) { - const n5 = (e14.toString().split(".")[1] || "").length, a5 = (t12.toString().split(".")[1] || "").length, r3 = n5 > a5 ? n5 : a5; - return Number.parseInt(e14.toFixed(r3).replace(".", "")) % Number.parseInt(t12.toFixed(r3).replace(".", "")) / 10 ** r3; - } - te2.create = (e14) => { - var t12; - return new te2({ checks: [], typeName: Be2.ZodString, coerce: null != (t12 = null == e14 ? void 0 : e14.coerce) && t12, ...O3(e14) }); - }; - var ae = class t7 extends E2 { - constructor() { - super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; - } - _parse(t12) { - this._def.coerce && (t12.data = Number(t12.data)); - if (this._getType(t12) !== s4.number) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.number, received: e14.parsedType }), S3; - } - let n5; - const a5 = new _3(); - for (const r3 of this._def.checks) - if ("int" === r3.kind) - e5.isInteger(t12.data) || (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.invalid_type, expected: "integer", received: "float", message: r3.message }), a5.dirty()); - else if ("min" === r3.kind) { - (r3.inclusive ? t12.data < r3.value : t12.data <= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_small, minimum: r3.value, type: "number", inclusive: r3.inclusive, exact: false, message: r3.message }), a5.dirty()); - } else if ("max" === r3.kind) { - (r3.inclusive ? t12.data > r3.value : t12.data >= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_big, maximum: r3.value, type: "number", inclusive: r3.inclusive, exact: false, message: r3.message }), a5.dirty()); - } else - "multipleOf" === r3.kind ? 0 !== ne2(t12.data, r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_multiple_of, multipleOf: r3.value, message: r3.message }), a5.dirty()) : "finite" === r3.kind ? Number.isFinite(t12.data) || (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_finite, message: r3.message }), a5.dirty()) : e5.assertNever(r3); - return { status: a5.value, value: t12.data }; - } - gte(e14, t12) { - return this.setLimit("min", e14, true, v3.toString(t12)); - } - gt(e14, t12) { - return this.setLimit("min", e14, false, v3.toString(t12)); - } - lte(e14, t12) { - return this.setLimit("max", e14, true, v3.toString(t12)); - } - lt(e14, t12) { - return this.setLimit("max", e14, false, v3.toString(t12)); - } - setLimit(e14, n5, a5, r3) { - return new t7({ ...this._def, checks: [...this._def.checks, { kind: e14, value: n5, inclusive: a5, message: v3.toString(r3) }] }); - } - _addCheck(e14) { - return new t7({ ...this._def, checks: [...this._def.checks, e14] }); - } - int(e14) { - return this._addCheck({ kind: "int", message: v3.toString(e14) }); - } - positive(e14) { - return this._addCheck({ kind: "min", value: 0, inclusive: false, message: v3.toString(e14) }); - } - negative(e14) { - return this._addCheck({ kind: "max", value: 0, inclusive: false, message: v3.toString(e14) }); - } - nonpositive(e14) { - return this._addCheck({ kind: "max", value: 0, inclusive: true, message: v3.toString(e14) }); - } - nonnegative(e14) { - return this._addCheck({ kind: "min", value: 0, inclusive: true, message: v3.toString(e14) }); - } - multipleOf(e14, t12) { - return this._addCheck({ kind: "multipleOf", value: e14, message: v3.toString(t12) }); - } - finite(e14) { - return this._addCheck({ kind: "finite", message: v3.toString(e14) }); - } - safe(e14) { - return this._addCheck({ kind: "min", inclusive: true, value: Number.MIN_SAFE_INTEGER, message: v3.toString(e14) })._addCheck({ kind: "max", inclusive: true, value: Number.MAX_SAFE_INTEGER, message: v3.toString(e14) }); - } - get minValue() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxValue() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - get isInt() { - return !!this._def.checks.find((t12) => "int" === t12.kind || "multipleOf" === t12.kind && e5.isInteger(t12.value)); - } - get isFinite() { - let e14 = null, t12 = null; - for (const n5 of this._def.checks) { - if ("finite" === n5.kind || "int" === n5.kind || "multipleOf" === n5.kind) - return true; - "min" === n5.kind ? (null === t12 || n5.value > t12) && (t12 = n5.value) : "max" === n5.kind && (null === e14 || n5.value < e14) && (e14 = n5.value); - } - return Number.isFinite(t12) && Number.isFinite(e14); - } - }; - ae.create = (e14) => new ae({ checks: [], typeName: Be2.ZodNumber, coerce: (null == e14 ? void 0 : e14.coerce) || false, ...O3(e14) }); - var re2 = class t8 extends E2 { - constructor() { - super(...arguments), this.min = this.gte, this.max = this.lte; - } - _parse(t12) { - if (this._def.coerce) - try { - t12.data = BigInt(t12.data); - } catch (e14) { - return this._getInvalidInput(t12); - } - if (this._getType(t12) !== s4.bigint) - return this._getInvalidInput(t12); - let n5; - const a5 = new _3(); - for (const r3 of this._def.checks) - if ("min" === r3.kind) { - (r3.inclusive ? t12.data < r3.value : t12.data <= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_small, type: "bigint", minimum: r3.value, inclusive: r3.inclusive, message: r3.message }), a5.dirty()); - } else if ("max" === r3.kind) { - (r3.inclusive ? t12.data > r3.value : t12.data >= r3.value) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.too_big, type: "bigint", maximum: r3.value, inclusive: r3.inclusive, message: r3.message }), a5.dirty()); - } else - "multipleOf" === r3.kind ? t12.data % r3.value !== BigInt(0) && (n5 = this._getOrReturnCtx(t12, n5), y3(n5, { code: c2.not_multiple_of, multipleOf: r3.value, message: r3.message }), a5.dirty()) : e5.assertNever(r3); - return { status: a5.value, value: t12.data }; - } - _getInvalidInput(e14) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.bigint, received: t12.parsedType }), S3; - } - gte(e14, t12) { - return this.setLimit("min", e14, true, v3.toString(t12)); - } - gt(e14, t12) { - return this.setLimit("min", e14, false, v3.toString(t12)); - } - lte(e14, t12) { - return this.setLimit("max", e14, true, v3.toString(t12)); - } - lt(e14, t12) { - return this.setLimit("max", e14, false, v3.toString(t12)); - } - setLimit(e14, n5, a5, r3) { - return new t8({ ...this._def, checks: [...this._def.checks, { kind: e14, value: n5, inclusive: a5, message: v3.toString(r3) }] }); - } - _addCheck(e14) { - return new t8({ ...this._def, checks: [...this._def.checks, e14] }); - } - positive(e14) { - return this._addCheck({ kind: "min", value: BigInt(0), inclusive: false, message: v3.toString(e14) }); - } - negative(e14) { - return this._addCheck({ kind: "max", value: BigInt(0), inclusive: false, message: v3.toString(e14) }); - } - nonpositive(e14) { - return this._addCheck({ kind: "max", value: BigInt(0), inclusive: true, message: v3.toString(e14) }); - } - nonnegative(e14) { - return this._addCheck({ kind: "min", value: BigInt(0), inclusive: true, message: v3.toString(e14) }); - } - multipleOf(e14, t12) { - return this._addCheck({ kind: "multipleOf", value: e14, message: v3.toString(t12) }); - } - get minValue() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return e14; - } - get maxValue() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return e14; - } - }; - re2.create = (e14) => { - var t12; - return new re2({ checks: [], typeName: Be2.ZodBigInt, coerce: null != (t12 = null == e14 ? void 0 : e14.coerce) && t12, ...O3(e14) }); - }; - var ie2 = class extends E2 { - _parse(e14) { - this._def.coerce && (e14.data = Boolean(e14.data)); - if (this._getType(e14) !== s4.boolean) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.boolean, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - ie2.create = (e14) => new ie2({ typeName: Be2.ZodBoolean, coerce: (null == e14 ? void 0 : e14.coerce) || false, ...O3(e14) }); - var se = class t9 extends E2 { - _parse(t12) { - this._def.coerce && (t12.data = new Date(t12.data)); - if (this._getType(t12) !== s4.date) { - const e14 = this._getOrReturnCtx(t12); - return y3(e14, { code: c2.invalid_type, expected: s4.date, received: e14.parsedType }), S3; - } - if (Number.isNaN(t12.data.getTime())) { - return y3(this._getOrReturnCtx(t12), { code: c2.invalid_date }), S3; - } - const n5 = new _3(); - let a5; - for (const r3 of this._def.checks) - "min" === r3.kind ? t12.data.getTime() < r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_small, message: r3.message, inclusive: true, exact: false, minimum: r3.value, type: "date" }), n5.dirty()) : "max" === r3.kind ? t12.data.getTime() > r3.value && (a5 = this._getOrReturnCtx(t12, a5), y3(a5, { code: c2.too_big, message: r3.message, inclusive: true, exact: false, maximum: r3.value, type: "date" }), n5.dirty()) : e5.assertNever(r3); - return { status: n5.value, value: new Date(t12.data.getTime()) }; - } - _addCheck(e14) { - return new t9({ ...this._def, checks: [...this._def.checks, e14] }); - } - min(e14, t12) { - return this._addCheck({ kind: "min", value: e14.getTime(), message: v3.toString(t12) }); - } - max(e14, t12) { - return this._addCheck({ kind: "max", value: e14.getTime(), message: v3.toString(t12) }); - } - get minDate() { - let e14 = null; - for (const t12 of this._def.checks) - "min" === t12.kind && (null === e14 || t12.value > e14) && (e14 = t12.value); - return null != e14 ? new Date(e14) : null; - } - get maxDate() { - let e14 = null; - for (const t12 of this._def.checks) - "max" === t12.kind && (null === e14 || t12.value < e14) && (e14 = t12.value); - return null != e14 ? new Date(e14) : null; - } - }; - se.create = (e14) => new se({ checks: [], coerce: (null == e14 ? void 0 : e14.coerce) || false, typeName: Be2.ZodDate, ...O3(e14) }); - var oe2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.symbol) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.symbol, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - oe2.create = (e14) => new oe2({ typeName: Be2.ZodSymbol, ...O3(e14) }); - var ce2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.undefined) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.undefined, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - ce2.create = (e14) => new ce2({ typeName: Be2.ZodUndefined, ...O3(e14) }); - var de2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.null) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.null, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - de2.create = (e14) => new de2({ typeName: Be2.ZodNull, ...O3(e14) }); - var ue2 = class extends E2 { - constructor() { - super(...arguments), this._any = true; - } - _parse(e14) { - return x2(e14.data); - } - }; - ue2.create = (e14) => new ue2({ typeName: Be2.ZodAny, ...O3(e14) }); - var le2 = class extends E2 { - constructor() { - super(...arguments), this._unknown = true; - } - _parse(e14) { - return x2(e14.data); - } - }; - le2.create = (e14) => new le2({ typeName: Be2.ZodUnknown, ...O3(e14) }); - var pe2 = class extends E2 { - _parse(e14) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.never, received: t12.parsedType }), S3; - } - }; - pe2.create = (e14) => new pe2({ typeName: Be2.ZodNever, ...O3(e14) }); - var me2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.undefined) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.void, received: t12.parsedType }), S3; - } - return x2(e14.data); - } - }; - me2.create = (e14) => new me2({ typeName: Be2.ZodVoid, ...O3(e14) }); - var he2 = class e7 extends E2 { - _parse(e14) { - const { ctx: t12, status: n5 } = this._processInputParams(e14), a5 = this._def; - if (t12.parsedType !== s4.array) - return y3(t12, { code: c2.invalid_type, expected: s4.array, received: t12.parsedType }), S3; - if (null !== a5.exactLength) { - const e15 = t12.data.length > a5.exactLength.value, r4 = t12.data.length < a5.exactLength.value; - (e15 || r4) && (y3(t12, { code: e15 ? c2.too_big : c2.too_small, minimum: r4 ? a5.exactLength.value : void 0, maximum: e15 ? a5.exactLength.value : void 0, type: "array", inclusive: true, exact: true, message: a5.exactLength.message }), n5.dirty()); - } - if (null !== a5.minLength && t12.data.length < a5.minLength.value && (y3(t12, { code: c2.too_small, minimum: a5.minLength.value, type: "array", inclusive: true, exact: false, message: a5.minLength.message }), n5.dirty()), null !== a5.maxLength && t12.data.length > a5.maxLength.value && (y3(t12, { code: c2.too_big, maximum: a5.maxLength.value, type: "array", inclusive: true, exact: false, message: a5.maxLength.message }), n5.dirty()), t12.common.async) - return Promise.all([...t12.data].map((e15, n6) => a5.type._parseAsync(new T3(t12, e15, t12.path, n6)))).then((e15) => _3.mergeArray(n5, e15)); - const r3 = [...t12.data].map((e15, n6) => a5.type._parseSync(new T3(t12, e15, t12.path, n6))); - return _3.mergeArray(n5, r3); - } - get element() { - return this._def.type; - } - min(t12, n5) { - return new e7({ ...this._def, minLength: { value: t12, message: v3.toString(n5) } }); - } - max(t12, n5) { - return new e7({ ...this._def, maxLength: { value: t12, message: v3.toString(n5) } }); - } - length(t12, n5) { - return new e7({ ...this._def, exactLength: { value: t12, message: v3.toString(n5) } }); - } - nonempty(e14) { - return this.min(1, e14); - } - }; - function fe2(e14) { - if (e14 instanceof ge2) { - const t12 = {}; - for (const n5 in e14.shape) { - const a5 = e14.shape[n5]; - t12[n5] = $e2.create(fe2(a5)); - } - return new ge2({ ...e14._def, shape: () => t12 }); - } - return e14 instanceof he2 ? new he2({ ...e14._def, type: fe2(e14.element) }) : e14 instanceof $e2 ? $e2.create(fe2(e14.unwrap())) : e14 instanceof Ie ? Ie.create(fe2(e14.unwrap())) : e14 instanceof ke2 ? ke2.create(e14.items.map((e15) => fe2(e15))) : e14; - } - he2.create = (e14, t12) => new he2({ type: e14, minLength: null, maxLength: null, exactLength: null, typeName: Be2.ZodArray, ...O3(t12) }); - var ge2 = class t10 extends E2 { - constructor() { - super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; - } - _getCached() { - if (null !== this._cached) - return this._cached; - const t12 = this._def.shape(), n5 = e5.objectKeys(t12); - return this._cached = { shape: t12, keys: n5 }, this._cached; - } - _parse(e14) { - if (this._getType(e14) !== s4.object) { - const t13 = this._getOrReturnCtx(e14); - return y3(t13, { code: c2.invalid_type, expected: s4.object, received: t13.parsedType }), S3; - } - const { status: t12, ctx: n5 } = this._processInputParams(e14), { shape: a5, keys: r3 } = this._getCached(), i4 = []; - if (!(this._def.catchall instanceof pe2 && "strip" === this._def.unknownKeys)) - for (const e15 in n5.data) - r3.includes(e15) || i4.push(e15); - const o4 = []; - for (const e15 of r3) { - const t13 = a5[e15], r4 = n5.data[e15]; - o4.push({ key: { status: "valid", value: e15 }, value: t13._parse(new T3(n5, r4, n5.path, e15)), alwaysSet: e15 in n5.data }); - } - if (this._def.catchall instanceof pe2) { - const e15 = this._def.unknownKeys; - if ("passthrough" === e15) - for (const e16 of i4) - o4.push({ key: { status: "valid", value: e16 }, value: { status: "valid", value: n5.data[e16] } }); - else if ("strict" === e15) - i4.length > 0 && (y3(n5, { code: c2.unrecognized_keys, keys: i4 }), t12.dirty()); - else if ("strip" !== e15) - throw new Error("Internal ZodObject error: invalid unknownKeys value."); - } else { - const e15 = this._def.catchall; - for (const t13 of i4) { - const a6 = n5.data[t13]; - o4.push({ key: { status: "valid", value: t13 }, value: e15._parse(new T3(n5, a6, n5.path, t13)), alwaysSet: t13 in n5.data }); - } - } - return n5.common.async ? Promise.resolve().then(async () => { - const e15 = []; - for (const t13 of o4) { - const n6 = await t13.key, a6 = await t13.value; - e15.push({ key: n6, value: a6, alwaysSet: t13.alwaysSet }); - } - return e15; - }).then((e15) => _3.mergeObjectSync(t12, e15)) : _3.mergeObjectSync(t12, o4); - } - get shape() { - return this._def.shape(); - } - strict(e14) { - return v3.errToObj, new t10({ ...this._def, unknownKeys: "strict", ...void 0 !== e14 ? { errorMap: (t12, n5) => { - var a5, r3, i4, s5; - const o4 = null != (i4 = null == (r3 = (a5 = this._def).errorMap) ? void 0 : r3.call(a5, t12, n5).message) ? i4 : n5.defaultError; - return "unrecognized_keys" === t12.code ? { message: null != (s5 = v3.errToObj(e14).message) ? s5 : o4 } : { message: o4 }; - } } : {} }); - } - strip() { - return new t10({ ...this._def, unknownKeys: "strip" }); - } - passthrough() { - return new t10({ ...this._def, unknownKeys: "passthrough" }); - } - extend(e14) { - return new t10({ ...this._def, shape: () => ({ ...this._def.shape(), ...e14 }) }); - } - merge(e14) { - return new t10({ unknownKeys: e14._def.unknownKeys, catchall: e14._def.catchall, shape: () => ({ ...this._def.shape(), ...e14._def.shape() }), typeName: Be2.ZodObject }); - } - setKey(e14, t12) { - return this.augment({ [e14]: t12 }); - } - catchall(e14) { - return new t10({ ...this._def, catchall: e14 }); - } - pick(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(n5)) - n5[t12] && this.shape[t12] && (a5[t12] = this.shape[t12]); - return new t10({ ...this._def, shape: () => a5 }); - } - omit(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) - n5[t12] || (a5[t12] = this.shape[t12]); - return new t10({ ...this._def, shape: () => a5 }); - } - deepPartial() { - return fe2(this); - } - partial(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) { - const e14 = this.shape[t12]; - n5 && !n5[t12] ? a5[t12] = e14 : a5[t12] = e14.optional(); - } - return new t10({ ...this._def, shape: () => a5 }); - } - required(n5) { - const a5 = {}; - for (const t12 of e5.objectKeys(this.shape)) - if (n5 && !n5[t12]) - a5[t12] = this.shape[t12]; - else { - let e14 = this.shape[t12]; - for (; e14 instanceof $e2; ) - e14 = e14._def.innerType; - a5[t12] = e14; - } - return new t10({ ...this._def, shape: () => a5 }); - } - keyof() { - return Ae2(e5.objectKeys(this.shape)); - } - }; - ge2.create = (e14, t12) => new ge2({ shape: () => e14, unknownKeys: "strip", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }), ge2.strictCreate = (e14, t12) => new ge2({ shape: () => e14, unknownKeys: "strict", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }), ge2.lazycreate = (e14, t12) => new ge2({ shape: e14, unknownKeys: "strip", catchall: pe2.create(), typeName: Be2.ZodObject, ...O3(t12) }); - var ye2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = this._def.options; - if (t12.common.async) - return Promise.all(n5.map(async (e15) => { - const n6 = { ...t12, common: { ...t12.common, issues: [] }, parent: null }; - return { result: await e15._parseAsync({ data: t12.data, path: t12.path, parent: n6 }), ctx: n6 }; - })).then(function(e15) { - for (const t13 of e15) - if ("valid" === t13.result.status) - return t13.result; - for (const n7 of e15) - if ("dirty" === n7.result.status) - return t12.common.issues.push(...n7.ctx.common.issues), n7.result; - const n6 = e15.map((e16) => new u2(e16.ctx.common.issues)); - return y3(t12, { code: c2.invalid_union, unionErrors: n6 }), S3; - }); - { - let e15; - const a5 = []; - for (const r4 of n5) { - const n6 = { ...t12, common: { ...t12.common, issues: [] }, parent: null }, i4 = r4._parseSync({ data: t12.data, path: t12.path, parent: n6 }); - if ("valid" === i4.status) - return i4; - "dirty" !== i4.status || e15 || (e15 = { result: i4, ctx: n6 }), n6.common.issues.length && a5.push(n6.common.issues); - } - if (e15) - return t12.common.issues.push(...e15.ctx.common.issues), e15.result; - const r3 = a5.map((e16) => new u2(e16)); - return y3(t12, { code: c2.invalid_union, unionErrors: r3 }), S3; - } - } - get options() { - return this._def.options; - } - }; - ye2.create = (e14, t12) => new ye2({ options: e14, typeName: Be2.ZodUnion, ...O3(t12) }); - var ve2 = (t12) => t12 instanceof Pe2 ? ve2(t12.schema) : t12 instanceof Ne2 ? ve2(t12.innerType()) : t12 instanceof Te2 ? [t12.value] : t12 instanceof Oe ? t12.options : t12 instanceof Ce2 ? e5.objectValues(t12.enum) : t12 instanceof Re2 ? ve2(t12._def.innerType) : t12 instanceof ce2 ? [void 0] : t12 instanceof de2 ? [null] : t12 instanceof $e2 ? [void 0, ...ve2(t12.unwrap())] : t12 instanceof Ie ? [null, ...ve2(t12.unwrap())] : t12 instanceof Le2 || t12 instanceof Ue2 ? ve2(t12.unwrap()) : t12 instanceof Me2 ? ve2(t12._def.innerType) : []; - var be2 = class e8 extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.object) - return y3(t12, { code: c2.invalid_type, expected: s4.object, received: t12.parsedType }), S3; - const n5 = this.discriminator, a5 = t12.data[n5], r3 = this.optionsMap.get(a5); - return r3 ? t12.common.async ? r3._parseAsync({ data: t12.data, path: t12.path, parent: t12 }) : r3._parseSync({ data: t12.data, path: t12.path, parent: t12 }) : (y3(t12, { code: c2.invalid_union_discriminator, options: Array.from(this.optionsMap.keys()), path: [n5] }), S3); - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - static create(t12, n5, a5) { - const r3 = /* @__PURE__ */ new Map(); - for (const e14 of n5) { - const n6 = ve2(e14.shape[t12]); - if (!n6.length) - throw new Error(`A discriminator value for key \`${t12}\` could not be extracted from all schema options`); - for (const a6 of n6) { - if (r3.has(a6)) - throw new Error(`Discriminator property ${String(t12)} has duplicate value ${String(a6)}`); - r3.set(a6, e14); - } - } - return new e8({ typeName: Be2.ZodDiscriminatedUnion, discriminator: t12, options: n5, optionsMap: r3, ...O3(a5) }); - } - }; - function _e2(t12, n5) { - const a5 = o3(t12), r3 = o3(n5); - if (t12 === n5) - return { valid: true, data: t12 }; - if (a5 === s4.object && r3 === s4.object) { - const a6 = e5.objectKeys(n5), r4 = e5.objectKeys(t12).filter((e14) => -1 !== a6.indexOf(e14)), i4 = { ...t12, ...n5 }; - for (const e14 of r4) { - const a7 = _e2(t12[e14], n5[e14]); - if (!a7.valid) - return { valid: false }; - i4[e14] = a7.data; - } - return { valid: true, data: i4 }; - } - if (a5 === s4.array && r3 === s4.array) { - if (t12.length !== n5.length) - return { valid: false }; - const e14 = []; - for (let a6 = 0; a6 < t12.length; a6++) { - const r4 = _e2(t12[a6], n5[a6]); - if (!r4.valid) - return { valid: false }; - e14.push(r4.data); - } - return { valid: true, data: e14 }; - } - return a5 === s4.date && r3 === s4.date && +t12 === +n5 ? { valid: true, data: t12 } : { valid: false }; - } - var Se2 = class extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14), a5 = (e15, a6) => { - if (w3(e15) || w3(a6)) - return S3; - const r3 = _e2(e15.value, a6.value); - return r3.valid ? ((Z2(e15) || Z2(a6)) && t12.dirty(), { status: t12.value, value: r3.data }) : (y3(n5, { code: c2.invalid_intersection_types }), S3); - }; - return n5.common.async ? Promise.all([this._def.left._parseAsync({ data: n5.data, path: n5.path, parent: n5 }), this._def.right._parseAsync({ data: n5.data, path: n5.path, parent: n5 })]).then(([e15, t13]) => a5(e15, t13)) : a5(this._def.left._parseSync({ data: n5.data, path: n5.path, parent: n5 }), this._def.right._parseSync({ data: n5.data, path: n5.path, parent: n5 })); - } - }; - Se2.create = (e14, t12, n5) => new Se2({ left: e14, right: t12, typeName: Be2.ZodIntersection, ...O3(n5) }); - var ke2 = class e9 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.array) - return y3(n5, { code: c2.invalid_type, expected: s4.array, received: n5.parsedType }), S3; - if (n5.data.length < this._def.items.length) - return y3(n5, { code: c2.too_small, minimum: this._def.items.length, inclusive: true, exact: false, type: "array" }), S3; - !this._def.rest && n5.data.length > this._def.items.length && (y3(n5, { code: c2.too_big, maximum: this._def.items.length, inclusive: true, exact: false, type: "array" }), t12.dirty()); - const a5 = [...n5.data].map((e15, t13) => { - const a6 = this._def.items[t13] || this._def.rest; - return a6 ? a6._parse(new T3(n5, e15, n5.path, t13)) : null; - }).filter((e15) => !!e15); - return n5.common.async ? Promise.all(a5).then((e15) => _3.mergeArray(t12, e15)) : _3.mergeArray(t12, a5); - } - get items() { - return this._def.items; - } - rest(t12) { - return new e9({ ...this._def, rest: t12 }); - } - }; - ke2.create = (e14, t12) => { - if (!Array.isArray(e14)) - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - return new ke2({ items: e14, typeName: Be2.ZodTuple, rest: null, ...O3(t12) }); - }; - var xe2 = class e10 extends E2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.object) - return y3(n5, { code: c2.invalid_type, expected: s4.object, received: n5.parsedType }), S3; - const a5 = [], r3 = this._def.keyType, i4 = this._def.valueType; - for (const e15 in n5.data) - a5.push({ key: r3._parse(new T3(n5, e15, n5.path, e15)), value: i4._parse(new T3(n5, n5.data[e15], n5.path, e15)), alwaysSet: e15 in n5.data }); - return n5.common.async ? _3.mergeObjectAsync(t12, a5) : _3.mergeObjectSync(t12, a5); - } - get element() { - return this._def.valueType; - } - static create(t12, n5, a5) { - return new e10(n5 instanceof E2 ? { keyType: t12, valueType: n5, typeName: Be2.ZodRecord, ...O3(a5) } : { keyType: te2.create(), valueType: t12, typeName: Be2.ZodRecord, ...O3(n5) }); - } - }; - var we2 = class extends E2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.map) - return y3(n5, { code: c2.invalid_type, expected: s4.map, received: n5.parsedType }), S3; - const a5 = this._def.keyType, r3 = this._def.valueType, i4 = [...n5.data.entries()].map(([e15, t13], i5) => ({ key: a5._parse(new T3(n5, e15, n5.path, [i5, "key"])), value: r3._parse(new T3(n5, t13, n5.path, [i5, "value"])) })); - if (n5.common.async) { - const e15 = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const n6 of i4) { - const a6 = await n6.key, r4 = await n6.value; - if ("aborted" === a6.status || "aborted" === r4.status) - return S3; - "dirty" !== a6.status && "dirty" !== r4.status || t12.dirty(), e15.set(a6.value, r4.value); - } - return { status: t12.value, value: e15 }; - }); - } - { - const e15 = /* @__PURE__ */ new Map(); - for (const n6 of i4) { - const a6 = n6.key, r4 = n6.value; - if ("aborted" === a6.status || "aborted" === r4.status) - return S3; - "dirty" !== a6.status && "dirty" !== r4.status || t12.dirty(), e15.set(a6.value, r4.value); - } - return { status: t12.value, value: e15 }; - } - } - }; - we2.create = (e14, t12, n5) => new we2({ valueType: t12, keyType: e14, typeName: Be2.ZodMap, ...O3(n5) }); - var Ze2 = class e11 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.parsedType !== s4.set) - return y3(n5, { code: c2.invalid_type, expected: s4.set, received: n5.parsedType }), S3; - const a5 = this._def; - null !== a5.minSize && n5.data.size < a5.minSize.value && (y3(n5, { code: c2.too_small, minimum: a5.minSize.value, type: "set", inclusive: true, exact: false, message: a5.minSize.message }), t12.dirty()), null !== a5.maxSize && n5.data.size > a5.maxSize.value && (y3(n5, { code: c2.too_big, maximum: a5.maxSize.value, type: "set", inclusive: true, exact: false, message: a5.maxSize.message }), t12.dirty()); - const r3 = this._def.valueType; - function i4(e15) { - const n6 = /* @__PURE__ */ new Set(); - for (const a6 of e15) { - if ("aborted" === a6.status) - return S3; - "dirty" === a6.status && t12.dirty(), n6.add(a6.value); - } - return { status: t12.value, value: n6 }; - } - const o4 = [...n5.data.values()].map((e15, t13) => r3._parse(new T3(n5, e15, n5.path, t13))); - return n5.common.async ? Promise.all(o4).then((e15) => i4(e15)) : i4(o4); - } - min(t12, n5) { - return new e11({ ...this._def, minSize: { value: t12, message: v3.toString(n5) } }); - } - max(t12, n5) { - return new e11({ ...this._def, maxSize: { value: t12, message: v3.toString(n5) } }); - } - size(e14, t12) { - return this.min(e14, t12).max(e14, t12); - } - nonempty(e14) { - return this.min(1, e14); - } - }; - Ze2.create = (e14, t12) => new Ze2({ valueType: e14, minSize: null, maxSize: null, typeName: Be2.ZodSet, ...O3(t12) }); - var je2 = class e12 extends E2 { - constructor() { - super(...arguments), this.validate = this.implement; - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.function) - return y3(t12, { code: c2.invalid_type, expected: s4.function, received: t12.parsedType }), S3; - function n5(e15, n6) { - return f({ data: e15, path: t12.path, errorMaps: [t12.common.contextualErrorMap, t12.schemaErrorMap, h3(), l2].filter((e16) => !!e16), issueData: { code: c2.invalid_arguments, argumentsError: n6 } }); - } - function a5(e15, n6) { - return f({ data: e15, path: t12.path, errorMaps: [t12.common.contextualErrorMap, t12.schemaErrorMap, h3(), l2].filter((e16) => !!e16), issueData: { code: c2.invalid_return_type, returnTypeError: n6 } }); - } - const r3 = { errorMap: t12.common.contextualErrorMap }, i4 = t12.data; - if (this._def.returns instanceof Ee2) { - const e15 = this; - return x2(async function(...t13) { - const s5 = new u2([]), o4 = await e15._def.args.parseAsync(t13, r3).catch((e16) => { - throw s5.addIssue(n5(t13, e16)), s5; - }), c3 = await Reflect.apply(i4, this, o4); - return await e15._def.returns._def.type.parseAsync(c3, r3).catch((e16) => { - throw s5.addIssue(a5(c3, e16)), s5; - }); - }); - } - { - const e15 = this; - return x2(function(...t13) { - const s5 = e15._def.args.safeParse(t13, r3); - if (!s5.success) - throw new u2([n5(t13, s5.error)]); - const o4 = Reflect.apply(i4, this, s5.data), c3 = e15._def.returns.safeParse(o4, r3); - if (!c3.success) - throw new u2([a5(o4, c3.error)]); - return c3.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...t12) { - return new e12({ ...this._def, args: ke2.create(t12).rest(le2.create()) }); - } - returns(t12) { - return new e12({ ...this._def, returns: t12 }); - } - implement(e14) { - return this.parse(e14); - } - strictImplement(e14) { - return this.parse(e14); - } - static create(t12, n5, a5) { - return new e12({ args: t12 || ke2.create([]).rest(le2.create()), returns: n5 || le2.create(), typeName: Be2.ZodFunction, ...O3(a5) }); - } - }; - var Pe2 = class extends E2 { - get schema() { - return this._def.getter(); - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - return this._def.getter()._parse({ data: t12.data, path: t12.path, parent: t12 }); - } - }; - Pe2.create = (e14, t12) => new Pe2({ getter: e14, typeName: Be2.ZodLazy, ...O3(t12) }); - var Te2 = class extends E2 { - _parse(e14) { - if (e14.data !== this._def.value) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { received: t12.data, code: c2.invalid_literal, expected: this._def.value }), S3; - } - return { status: "valid", value: e14.data }; - } - get value() { - return this._def.value; - } - }; - function Ae2(e14, t12) { - return new Oe({ values: e14, typeName: Be2.ZodEnum, ...O3(t12) }); - } - Te2.create = (e14, t12) => new Te2({ value: e14, typeName: Be2.ZodLiteral, ...O3(t12) }); - var Oe = class t11 extends E2 { - _parse(t12) { - if ("string" != typeof t12.data) { - const n5 = this._getOrReturnCtx(t12), a5 = this._def.values; - return y3(n5, { expected: e5.joinValues(a5), received: n5.parsedType, code: c2.invalid_type }), S3; - } - if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(t12.data)) { - const e14 = this._getOrReturnCtx(t12), n5 = this._def.values; - return y3(e14, { received: e14.data, code: c2.invalid_enum_value, options: n5 }), S3; - } - return x2(t12.data); - } - get options() { - return this._def.values; - } - get enum() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - get Values() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - get Enum() { - const e14 = {}; - for (const t12 of this._def.values) - e14[t12] = t12; - return e14; - } - extract(e14, n5 = this._def) { - return t11.create(e14, { ...this._def, ...n5 }); - } - exclude(e14, n5 = this._def) { - return t11.create(this.options.filter((t12) => !e14.includes(t12)), { ...this._def, ...n5 }); - } - }; - Oe.create = Ae2; - var Ce2 = class extends E2 { - _parse(t12) { - const n5 = e5.getValidEnumValues(this._def.values), a5 = this._getOrReturnCtx(t12); - if (a5.parsedType !== s4.string && a5.parsedType !== s4.number) { - const t13 = e5.objectValues(n5); - return y3(a5, { expected: e5.joinValues(t13), received: a5.parsedType, code: c2.invalid_type }), S3; - } - if (this._cache || (this._cache = new Set(e5.getValidEnumValues(this._def.values))), !this._cache.has(t12.data)) { - const t13 = e5.objectValues(n5); - return y3(a5, { received: a5.data, code: c2.invalid_enum_value, options: t13 }), S3; - } - return x2(t12.data); - } - get enum() { - return this._def.values; - } - }; - Ce2.create = (e14, t12) => new Ce2({ values: e14, typeName: Be2.ZodNativeEnum, ...O3(t12) }); - var Ee2 = class extends E2 { - unwrap() { - return this._def.type; - } - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - if (t12.parsedType !== s4.promise && false === t12.common.async) - return y3(t12, { code: c2.invalid_type, expected: s4.promise, received: t12.parsedType }), S3; - const n5 = t12.parsedType === s4.promise ? t12.data : Promise.resolve(t12.data); - return x2(n5.then((e15) => this._def.type.parseAsync(e15, { path: t12.path, errorMap: t12.common.contextualErrorMap }))); - } - }; - Ee2.create = (e14, t12) => new Ee2({ type: e14, typeName: Be2.ZodPromise, ...O3(t12) }); - var Ne2 = class extends E2 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === Be2.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(t12) { - const { status: n5, ctx: a5 } = this._processInputParams(t12), r3 = this._def.effect || null, i4 = { addIssue: (e14) => { - y3(a5, e14), e14.fatal ? n5.abort() : n5.dirty(); - }, get path() { - return a5.path; - } }; - if (i4.addIssue = i4.addIssue.bind(i4), "preprocess" === r3.type) { - const e14 = r3.transform(a5.data, i4); - if (a5.common.async) - return Promise.resolve(e14).then(async (e15) => { - if ("aborted" === n5.value) - return S3; - const t13 = await this._def.schema._parseAsync({ data: e15, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : "dirty" === t13.status || "dirty" === n5.value ? k2(t13.value) : t13; - }); - { - if ("aborted" === n5.value) - return S3; - const t13 = this._def.schema._parseSync({ data: e14, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : "dirty" === t13.status || "dirty" === n5.value ? k2(t13.value) : t13; - } - } - if ("refinement" === r3.type) { - const e14 = (e15) => { - const t13 = r3.refinement(e15, i4); - if (a5.common.async) - return Promise.resolve(t13); - if (t13 instanceof Promise) - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - return e15; - }; - if (false === a5.common.async) { - const t13 = this._def.schema._parseSync({ data: a5.data, path: a5.path, parent: a5 }); - return "aborted" === t13.status ? S3 : ("dirty" === t13.status && n5.dirty(), e14(t13.value), { status: n5.value, value: t13.value }); - } - return this._def.schema._parseAsync({ data: a5.data, path: a5.path, parent: a5 }).then((t13) => "aborted" === t13.status ? S3 : ("dirty" === t13.status && n5.dirty(), e14(t13.value).then(() => ({ status: n5.value, value: t13.value })))); - } - if ("transform" === r3.type) { - if (false === a5.common.async) { - const e14 = this._def.schema._parseSync({ data: a5.data, path: a5.path, parent: a5 }); - if (!j2(e14)) - return S3; - const t13 = r3.transform(e14.value, i4); - if (t13 instanceof Promise) - throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); - return { status: n5.value, value: t13 }; - } - return this._def.schema._parseAsync({ data: a5.data, path: a5.path, parent: a5 }).then((e14) => j2(e14) ? Promise.resolve(r3.transform(e14.value, i4)).then((e15) => ({ status: n5.value, value: e15 })) : S3); - } - e5.assertNever(r3); - } - }; - Ne2.create = (e14, t12, n5) => new Ne2({ schema: e14, typeName: Be2.ZodEffects, effect: t12, ...O3(n5) }), Ne2.createWithPreprocess = (e14, t12, n5) => new Ne2({ schema: t12, effect: { type: "preprocess", transform: e14 }, typeName: Be2.ZodEffects, ...O3(n5) }); - var $e2 = class extends E2 { - _parse(e14) { - return this._getType(e14) === s4.undefined ? x2(void 0) : this._def.innerType._parse(e14); - } - unwrap() { - return this._def.innerType; - } - }; - $e2.create = (e14, t12) => new $e2({ innerType: e14, typeName: Be2.ZodOptional, ...O3(t12) }); - var Ie = class extends E2 { - _parse(e14) { - return this._getType(e14) === s4.null ? x2(null) : this._def.innerType._parse(e14); - } - unwrap() { - return this._def.innerType; - } - }; - Ie.create = (e14, t12) => new Ie({ innerType: e14, typeName: Be2.ZodNullable, ...O3(t12) }); - var Re2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14); - let n5 = t12.data; - return t12.parsedType === s4.undefined && (n5 = this._def.defaultValue()), this._def.innerType._parse({ data: n5, path: t12.path, parent: t12 }); - } - removeDefault() { - return this._def.innerType; - } - }; - Re2.create = (e14, t12) => new Re2({ innerType: e14, typeName: Be2.ZodDefault, defaultValue: "function" == typeof t12.default ? t12.default : () => t12.default, ...O3(t12) }); - var Me2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = { ...t12, common: { ...t12.common, issues: [] } }, a5 = this._def.innerType._parse({ data: n5.data, path: n5.path, parent: { ...n5 } }); - return P2(a5) ? a5.then((e15) => ({ status: "valid", value: "valid" === e15.status ? e15.value : this._def.catchValue({ get error() { - return new u2(n5.common.issues); - }, input: n5.data }) })) : { status: "valid", value: "valid" === a5.status ? a5.value : this._def.catchValue({ get error() { - return new u2(n5.common.issues); - }, input: n5.data }) }; - } - removeCatch() { - return this._def.innerType; - } - }; - Me2.create = (e14, t12) => new Me2({ innerType: e14, typeName: Be2.ZodCatch, catchValue: "function" == typeof t12.catch ? t12.catch : () => t12.catch, ...O3(t12) }); - var ze2 = class extends E2 { - _parse(e14) { - if (this._getType(e14) !== s4.nan) { - const t12 = this._getOrReturnCtx(e14); - return y3(t12, { code: c2.invalid_type, expected: s4.nan, received: t12.parsedType }), S3; - } - return { status: "valid", value: e14.data }; - } - }; - ze2.create = (e14) => new ze2({ typeName: Be2.ZodNaN, ...O3(e14) }); - var De2 = Symbol("zod_brand"); - var Le2 = class extends E2 { - _parse(e14) { - const { ctx: t12 } = this._processInputParams(e14), n5 = t12.data; - return this._def.type._parse({ data: n5, path: t12.path, parent: t12 }); - } - unwrap() { - return this._def.type; - } - }; - var Fe2 = class e13 extends E2 { - _parse(e14) { - const { status: t12, ctx: n5 } = this._processInputParams(e14); - if (n5.common.async) { - return (async () => { - const e15 = await this._def.in._parseAsync({ data: n5.data, path: n5.path, parent: n5 }); - return "aborted" === e15.status ? S3 : "dirty" === e15.status ? (t12.dirty(), k2(e15.value)) : this._def.out._parseAsync({ data: e15.value, path: n5.path, parent: n5 }); - })(); - } - { - const e15 = this._def.in._parseSync({ data: n5.data, path: n5.path, parent: n5 }); - return "aborted" === e15.status ? S3 : "dirty" === e15.status ? (t12.dirty(), { status: "dirty", value: e15.value }) : this._def.out._parseSync({ data: e15.value, path: n5.path, parent: n5 }); - } - } - static create(t12, n5) { - return new e13({ in: t12, out: n5, typeName: Be2.ZodPipeline }); - } - }; - var Ue2 = class extends E2 { - _parse(e14) { - const t12 = this._def.innerType._parse(e14), n5 = (e15) => (j2(e15) && (e15.value = Object.freeze(e15.value)), e15); - return P2(t12) ? t12.then((e15) => n5(e15)) : n5(t12); - } - unwrap() { - return this._def.innerType; - } - }; - function Je2(e14, t12) { - const n5 = "function" == typeof e14 ? e14(t12) : "string" == typeof e14 ? { message: e14 } : e14; - return "string" == typeof n5 ? { message: n5 } : n5; - } - function Ve2(e14, t12 = {}, n5) { - return e14 ? ue2.create().superRefine((a5, r3) => { - var i4, s5; - const o4 = e14(a5); - if (o4 instanceof Promise) - return o4.then((e15) => { - var i5, s6; - if (!e15) { - const e16 = Je2(t12, a5), o5 = null == (s6 = null != (i5 = e16.fatal) ? i5 : n5) || s6; - r3.addIssue({ code: "custom", ...e16, fatal: o5 }); - } - }); - if (!o4) { - const e15 = Je2(t12, a5), o5 = null == (s5 = null != (i4 = e15.fatal) ? i4 : n5) || s5; - r3.addIssue({ code: "custom", ...e15, fatal: o5 }); - } - }) : ue2.create(); - } - Ue2.create = (e14, t12) => new Ue2({ innerType: e14, typeName: Be2.ZodReadonly, ...O3(t12) }); - var Be2; - var qe2; - var We2 = { object: ge2.lazycreate }; - (qe2 = Be2 || (Be2 = {})).ZodString = "ZodString", qe2.ZodNumber = "ZodNumber", qe2.ZodNaN = "ZodNaN", qe2.ZodBigInt = "ZodBigInt", qe2.ZodBoolean = "ZodBoolean", qe2.ZodDate = "ZodDate", qe2.ZodSymbol = "ZodSymbol", qe2.ZodUndefined = "ZodUndefined", qe2.ZodNull = "ZodNull", qe2.ZodAny = "ZodAny", qe2.ZodUnknown = "ZodUnknown", qe2.ZodNever = "ZodNever", qe2.ZodVoid = "ZodVoid", qe2.ZodArray = "ZodArray", qe2.ZodObject = "ZodObject", qe2.ZodUnion = "ZodUnion", qe2.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", qe2.ZodIntersection = "ZodIntersection", qe2.ZodTuple = "ZodTuple", qe2.ZodRecord = "ZodRecord", qe2.ZodMap = "ZodMap", qe2.ZodSet = "ZodSet", qe2.ZodFunction = "ZodFunction", qe2.ZodLazy = "ZodLazy", qe2.ZodLiteral = "ZodLiteral", qe2.ZodEnum = "ZodEnum", qe2.ZodEffects = "ZodEffects", qe2.ZodNativeEnum = "ZodNativeEnum", qe2.ZodOptional = "ZodOptional", qe2.ZodNullable = "ZodNullable", qe2.ZodDefault = "ZodDefault", qe2.ZodCatch = "ZodCatch", qe2.ZodPromise = "ZodPromise", qe2.ZodBranded = "ZodBranded", qe2.ZodPipeline = "ZodPipeline", qe2.ZodReadonly = "ZodReadonly"; - var Ke2 = (e14, t12 = { message: `Input not instance of ${e14.name}` }) => Ve2((t13) => t13 instanceof e14, t12); - var He2 = te2.create; - var Ge2 = ae.create; - var Ye2 = ze2.create; - var Qe2 = re2.create; - var Xe2 = ie2.create; - var et = se.create; - var tt = oe2.create; - var nt2 = ce2.create; - var at2 = de2.create; - var rt2 = ue2.create; - var it2 = le2.create; - var st2 = pe2.create; - var ot2 = me2.create; - var ct2 = he2.create; - var dt2 = ge2.create; - var ut2 = ge2.strictCreate; - var lt2 = ye2.create; - var pt2 = be2.create; - var mt2 = Se2.create; - var ht2 = ke2.create; - var ft2 = xe2.create; - var gt2 = we2.create; - var yt2 = Ze2.create; - var vt2 = je2.create; - var bt2 = Pe2.create; - var _t = Te2.create; - var St2 = Oe.create; - var kt2 = Ce2.create; - var xt2 = Ee2.create; - var wt2 = Ne2.create; - var Zt2 = $e2.create; - var jt2 = Ie.create; - var Pt2 = Ne2.createWithPreprocess; - var Tt2 = Fe2.create; - var At2 = () => He2().optional(); - var Ot2 = () => Ge2().optional(); - var Ct2 = () => Xe2().optional(); - var Et2 = { string: (e14) => te2.create({ ...e14, coerce: true }), number: (e14) => ae.create({ ...e14, coerce: true }), boolean: (e14) => ie2.create({ ...e14, coerce: true }), bigint: (e14) => re2.create({ ...e14, coerce: true }), date: (e14) => se.create({ ...e14, coerce: true }) }; - var Nt2 = S3; - var $t2 = Symbol("Let zodToJsonSchema decide on which parser to use"); - var It2 = { name: void 0, $refStrategy: "root", basePath: ["#"], effectStrategy: "input", pipeStrategy: "all", dateStrategy: "format:date-time", mapStrategy: "entries", removeAdditionalStrategy: "passthrough", allowedAdditionalProperties: true, rejectedAdditionalProperties: false, definitionPath: "definitions", target: "jsonSchema7", strictUnions: false, definitions: {}, errorMessages: false, markdownDescription: false, patternStrategy: "escape", applyRegexFlags: false, emailStrategy: "format:email", base64Strategy: "contentEncoding:base64", nameStrategy: "ref", openAiAnyTypeName: "OpenAiAnyType" }; - var Rt2 = (e14) => { - const t12 = ((e15) => "string" == typeof e15 ? { ...It2, name: e15 } : { ...It2, ...e15 })(e14), n5 = void 0 !== t12.name ? [...t12.basePath, t12.definitionPath, t12.name] : t12.basePath; - return { ...t12, flags: { hasReferencedOpenAiAnyType: false }, currentPath: n5, propertyPath: void 0, seen: new Map(Object.entries(t12.definitions).map(([e15, n6]) => [n6._def, { def: n6._def, path: [...t12.basePath, t12.definitionPath, e15], jsonSchema: void 0 }])) }; - }; - function Mt2(e14, t12, n5, a5) { - (null == a5 ? void 0 : a5.errorMessages) && n5 && (e14.errorMessage = { ...e14.errorMessage, [t12]: n5 }); - } - function zt(e14, t12, n5, a5, r3) { - e14[t12] = n5, Mt2(e14, t12, a5, r3); - } - var Dt = (e14, t12) => { - let n5 = 0; - for (; n5 < e14.length && n5 < t12.length && e14[n5] === t12[n5]; n5++) - ; - return [(e14.length - n5).toString(), ...t12.slice(n5)].join("/"); - }; - function Lt2(e14) { - if ("openAi" !== e14.target) - return {}; - const t12 = [...e14.basePath, e14.definitionPath, e14.openAiAnyTypeName]; - return e14.flags.hasReferencedOpenAiAnyType = true, { $ref: "relative" === e14.$refStrategy ? Dt(t12, e14.currentPath) : t12.join("/") }; - } - function Ft2(e14, t12) { - return fn(e14.type._def, t12); - } - function Ut2(e14, t12, n5) { - const a5 = null != n5 ? n5 : t12.dateStrategy; - if (Array.isArray(a5)) - return { anyOf: a5.map((n6, a6) => Ut2(e14, t12, n6)) }; - switch (a5) { - case "string": - case "format:date-time": - return { type: "string", format: "date-time" }; - case "format:date": - return { type: "string", format: "date" }; - case "integer": - return Jt2(e14, t12); - } - } - var Jt2 = (e14, t12) => { - const n5 = { type: "integer", format: "unix-time" }; - if ("openApi3" === t12.target) - return n5; - for (const a5 of e14.checks) - switch (a5.kind) { - case "min": - zt(n5, "minimum", a5.value, a5.message, t12); - break; - case "max": - zt(n5, "maximum", a5.value, a5.message, t12); - } - return n5; - }; - var Vt2 = void 0; - var Bt2 = /^[cC][^\s-]{8,}$/; - var qt2 = /^[0-9a-z]+$/; - var Wt2 = /^[0-9A-HJKMNP-TV-Z]{26}$/; - var Kt2 = /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/; - var Ht = () => (void 0 === Vt2 && (Vt2 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Vt2); - var Gt2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - var Yt2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - var Qt2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - var Xt2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - var en2 = /^[a-zA-Z0-9_-]{21}$/; - var tn2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - function nn2(e14, t12) { - const n5 = { type: "string" }; - if (e14.checks) - for (const a5 of e14.checks) - switch (a5.kind) { - case "min": - zt(n5, "minLength", "number" == typeof n5.minLength ? Math.max(n5.minLength, a5.value) : a5.value, a5.message, t12); - break; - case "max": - zt(n5, "maxLength", "number" == typeof n5.maxLength ? Math.min(n5.maxLength, a5.value) : a5.value, a5.message, t12); - break; - case "email": - switch (t12.emailStrategy) { - case "format:email": - sn(n5, "email", a5.message, t12); - break; - case "format:idn-email": - sn(n5, "idn-email", a5.message, t12); - break; - case "pattern:zod": - on2(n5, Kt2, a5.message, t12); - } - break; - case "url": - sn(n5, "uri", a5.message, t12); - break; - case "uuid": - sn(n5, "uuid", a5.message, t12); - break; - case "regex": - on2(n5, a5.regex, a5.message, t12); - break; - case "cuid": - on2(n5, Bt2, a5.message, t12); - break; - case "cuid2": - on2(n5, qt2, a5.message, t12); - break; - case "startsWith": - on2(n5, RegExp(`^${an2(a5.value, t12)}`), a5.message, t12); - break; - case "endsWith": - on2(n5, RegExp(`${an2(a5.value, t12)}$`), a5.message, t12); - break; - case "datetime": - sn(n5, "date-time", a5.message, t12); - break; - case "date": - sn(n5, "date", a5.message, t12); - break; - case "time": - sn(n5, "time", a5.message, t12); - break; - case "duration": - sn(n5, "duration", a5.message, t12); - break; - case "length": - zt(n5, "minLength", "number" == typeof n5.minLength ? Math.max(n5.minLength, a5.value) : a5.value, a5.message, t12), zt(n5, "maxLength", "number" == typeof n5.maxLength ? Math.min(n5.maxLength, a5.value) : a5.value, a5.message, t12); - break; - case "includes": - on2(n5, RegExp(an2(a5.value, t12)), a5.message, t12); - break; - case "ip": - "v6" !== a5.version && sn(n5, "ipv4", a5.message, t12), "v4" !== a5.version && sn(n5, "ipv6", a5.message, t12); - break; - case "base64url": - on2(n5, Xt2, a5.message, t12); - break; - case "jwt": - on2(n5, tn2, a5.message, t12); - break; - case "cidr": - "v6" !== a5.version && on2(n5, Gt2, a5.message, t12), "v4" !== a5.version && on2(n5, Yt2, a5.message, t12); - break; - case "emoji": - on2(n5, Ht(), a5.message, t12); - break; - case "ulid": - on2(n5, Wt2, a5.message, t12); - break; - case "base64": - switch (t12.base64Strategy) { - case "format:binary": - sn(n5, "binary", a5.message, t12); - break; - case "contentEncoding:base64": - zt(n5, "contentEncoding", "base64", a5.message, t12); - break; - case "pattern:zod": - on2(n5, Qt2, a5.message, t12); - } - break; - case "nanoid": - on2(n5, en2, a5.message, t12); - } - return n5; - } - function an2(e14, t12) { - return "escape" === t12.patternStrategy ? function(e15) { - let t13 = ""; - for (let n5 = 0; n5 < e15.length; n5++) - rn2.has(e15[n5]) || (t13 += "\\"), t13 += e15[n5]; - return t13; - }(e14) : e14; - } - var rn2 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); - function sn(e14, t12, n5, a5) { - var r3; - e14.format || (null == (r3 = e14.anyOf) ? void 0 : r3.some((e15) => e15.format)) ? (e14.anyOf || (e14.anyOf = []), e14.format && (e14.anyOf.push({ format: e14.format, ...e14.errorMessage && a5.errorMessages && { errorMessage: { format: e14.errorMessage.format } } }), delete e14.format, e14.errorMessage && (delete e14.errorMessage.format, 0 === Object.keys(e14.errorMessage).length && delete e14.errorMessage)), e14.anyOf.push({ format: t12, ...n5 && a5.errorMessages && { errorMessage: { format: n5 } } })) : zt(e14, "format", t12, n5, a5); - } - function on2(e14, t12, n5, a5) { - var r3; - e14.pattern || (null == (r3 = e14.allOf) ? void 0 : r3.some((e15) => e15.pattern)) ? (e14.allOf || (e14.allOf = []), e14.pattern && (e14.allOf.push({ pattern: e14.pattern, ...e14.errorMessage && a5.errorMessages && { errorMessage: { pattern: e14.errorMessage.pattern } } }), delete e14.pattern, e14.errorMessage && (delete e14.errorMessage.pattern, 0 === Object.keys(e14.errorMessage).length && delete e14.errorMessage)), e14.allOf.push({ pattern: cn(t12, a5), ...n5 && a5.errorMessages && { errorMessage: { pattern: n5 } } })) : zt(e14, "pattern", cn(t12, a5), n5, a5); - } - function cn(e14, t12) { - var n5; - if (!t12.applyRegexFlags || !e14.flags) - return e14.source; - const a5 = e14.flags.includes("i"), r3 = e14.flags.includes("m"), i4 = e14.flags.includes("s"), s5 = a5 ? e14.source.toLowerCase() : e14.source; - let o4 = "", c3 = false, d2 = false, u3 = false; - for (let e15 = 0; e15 < s5.length; e15++) - if (c3) - o4 += s5[e15], c3 = false; - else { - if (a5) { - if (d2) { - if (s5[e15].match(/[a-z]/)) { - u3 ? (o4 += s5[e15], o4 += `${s5[e15 - 2]}-${s5[e15]}`.toUpperCase(), u3 = false) : "-" === s5[e15 + 1] && (null == (n5 = s5[e15 + 2]) ? void 0 : n5.match(/[a-z]/)) ? (o4 += s5[e15], u3 = true) : o4 += `${s5[e15]}${s5[e15].toUpperCase()}`; - continue; - } - } else if (s5[e15].match(/[a-z]/)) { - o4 += `[${s5[e15]}${s5[e15].toUpperCase()}]`; - continue; - } - } - if (r3) { - if ("^" === s5[e15]) { - o4 += "(^|(?<=[\r\n]))"; - continue; - } - if ("$" === s5[e15]) { - o4 += "($|(?=[\r\n]))"; - continue; - } - } - i4 && "." === s5[e15] ? o4 += d2 ? `${s5[e15]}\r -` : `[${s5[e15]}\r -]` : (o4 += s5[e15], "\\" === s5[e15] ? c3 = true : d2 && "]" === s5[e15] ? d2 = false : d2 || "[" !== s5[e15] || (d2 = true)); - } - try { - new RegExp(o4); - } catch (n6) { - return console.warn(`Could not convert regex pattern at ${t12.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`), e14.source; - } - return o4; - } - function dn(e14, t12) { - var n5, a5, r3, i4, s5, o4, c3; - if ("openAi" === t12.target && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), "openApi3" === t12.target && (null == (n5 = e14.keyType) ? void 0 : n5._def.typeName) === Be2.ZodEnum) - return { type: "object", required: e14.keyType._def.values, properties: e14.keyType._def.values.reduce((n6, a6) => { - var r4; - return { ...n6, [a6]: null != (r4 = fn(e14.valueType._def, { ...t12, currentPath: [...t12.currentPath, "properties", a6] })) ? r4 : Lt2(t12) }; - }, {}), additionalProperties: t12.rejectedAdditionalProperties }; - const d2 = { type: "object", additionalProperties: null != (a5 = fn(e14.valueType._def, { ...t12, currentPath: [...t12.currentPath, "additionalProperties"] })) ? a5 : t12.allowedAdditionalProperties }; - if ("openApi3" === t12.target) - return d2; - if ((null == (r3 = e14.keyType) ? void 0 : r3._def.typeName) === Be2.ZodString && (null == (i4 = e14.keyType._def.checks) ? void 0 : i4.length)) { - const { type: n6, ...a6 } = nn2(e14.keyType._def, t12); - return { ...d2, propertyNames: a6 }; - } - if ((null == (s5 = e14.keyType) ? void 0 : s5._def.typeName) === Be2.ZodEnum) - return { ...d2, propertyNames: { enum: e14.keyType._def.values } }; - if ((null == (o4 = e14.keyType) ? void 0 : o4._def.typeName) === Be2.ZodBranded && e14.keyType._def.type._def.typeName === Be2.ZodString && (null == (c3 = e14.keyType._def.type._def.checks) ? void 0 : c3.length)) { - const { type: n6, ...a6 } = Ft2(e14.keyType._def, t12); - return { ...d2, propertyNames: a6 }; - } - return d2; - } - var un = { ZodString: "string", ZodNumber: "number", ZodBigInt: "integer", ZodBoolean: "boolean", ZodNull: "null" }; - var ln = (e14, t12) => { - const n5 = (e14.options instanceof Map ? Array.from(e14.options.values()) : e14.options).map((e15, n6) => fn(e15._def, { ...t12, currentPath: [...t12.currentPath, "anyOf", `${n6}`] })).filter((e15) => !!e15 && (!t12.strictUnions || "object" == typeof e15 && Object.keys(e15).length > 0)); - return n5.length ? { anyOf: n5 } : void 0; - }; - function pn(e14, t12) { - const n5 = "openAi" === t12.target, a5 = { type: "object", properties: {} }, r3 = [], i4 = e14.shape(); - for (const e15 in i4) { - let s6 = i4[e15]; - if (void 0 === s6 || void 0 === s6._def) - continue; - let o4 = mn(s6); - o4 && n5 && ("ZodOptional" === s6._def.typeName && (s6 = s6._def.innerType), s6.isNullable() || (s6 = s6.nullable()), o4 = false); - const c3 = fn(s6._def, { ...t12, currentPath: [...t12.currentPath, "properties", e15], propertyPath: [...t12.currentPath, "properties", e15] }); - void 0 !== c3 && (a5.properties[e15] = c3, o4 || r3.push(e15)); - } - r3.length && (a5.required = r3); - const s5 = function(e15, t13) { - if ("ZodNever" !== e15.catchall._def.typeName) - return fn(e15.catchall._def, { ...t13, currentPath: [...t13.currentPath, "additionalProperties"] }); - switch (e15.unknownKeys) { - case "passthrough": - return t13.allowedAdditionalProperties; - case "strict": - return t13.rejectedAdditionalProperties; - case "strip": - return "strict" === t13.removeAdditionalStrategy ? t13.allowedAdditionalProperties : t13.rejectedAdditionalProperties; - } - }(e14, t12); - return void 0 !== s5 && (a5.additionalProperties = s5), a5; - } - function mn(e14) { - try { - return e14.isOptional(); - } catch (e15) { - return true; - } - } - var hn2 = (e14, t12, n5) => { - switch (t12) { - case Be2.ZodString: - return nn2(e14, n5); - case Be2.ZodNumber: - return function(e15, t13) { - const n6 = { type: "number" }; - if (!e15.checks) - return n6; - for (const a5 of e15.checks) - switch (a5.kind) { - case "int": - n6.type = "integer", Mt2(n6, "type", a5.message, t13); - break; - case "min": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "minimum", a5.value, a5.message, t13) : zt(n6, "exclusiveMinimum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMinimum = true), zt(n6, "minimum", a5.value, a5.message, t13)); - break; - case "max": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "maximum", a5.value, a5.message, t13) : zt(n6, "exclusiveMaximum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMaximum = true), zt(n6, "maximum", a5.value, a5.message, t13)); - break; - case "multipleOf": - zt(n6, "multipleOf", a5.value, a5.message, t13); - } - return n6; - }(e14, n5); - case Be2.ZodObject: - return pn(e14, n5); - case Be2.ZodBigInt: - return function(e15, t13) { - const n6 = { type: "integer", format: "int64" }; - if (!e15.checks) - return n6; - for (const a5 of e15.checks) - switch (a5.kind) { - case "min": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "minimum", a5.value, a5.message, t13) : zt(n6, "exclusiveMinimum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMinimum = true), zt(n6, "minimum", a5.value, a5.message, t13)); - break; - case "max": - "jsonSchema7" === t13.target ? a5.inclusive ? zt(n6, "maximum", a5.value, a5.message, t13) : zt(n6, "exclusiveMaximum", a5.value, a5.message, t13) : (a5.inclusive || (n6.exclusiveMaximum = true), zt(n6, "maximum", a5.value, a5.message, t13)); - break; - case "multipleOf": - zt(n6, "multipleOf", a5.value, a5.message, t13); - } - return n6; - }(e14, n5); - case Be2.ZodBoolean: - return { type: "boolean" }; - case Be2.ZodDate: - return Ut2(e14, n5); - case Be2.ZodUndefined: - return function(e15) { - return { not: Lt2(e15) }; - }(n5); - case Be2.ZodNull: - return function(e15) { - return "openApi3" === e15.target ? { enum: ["null"], nullable: true } : { type: "null" }; - }(n5); - case Be2.ZodArray: - return function(e15, t13) { - var n6, a5, r3; - const i4 = { type: "array" }; - return (null == (n6 = e15.type) ? void 0 : n6._def) && (null == (r3 = null == (a5 = e15.type) ? void 0 : a5._def) ? void 0 : r3.typeName) !== Be2.ZodAny && (i4.items = fn(e15.type._def, { ...t13, currentPath: [...t13.currentPath, "items"] })), e15.minLength && zt(i4, "minItems", e15.minLength.value, e15.minLength.message, t13), e15.maxLength && zt(i4, "maxItems", e15.maxLength.value, e15.maxLength.message, t13), e15.exactLength && (zt(i4, "minItems", e15.exactLength.value, e15.exactLength.message, t13), zt(i4, "maxItems", e15.exactLength.value, e15.exactLength.message, t13)), i4; - }(e14, n5); - case Be2.ZodUnion: - case Be2.ZodDiscriminatedUnion: - return function(e15, t13) { - if ("openApi3" === t13.target) - return ln(e15, t13); - const n6 = e15.options instanceof Map ? Array.from(e15.options.values()) : e15.options; - if (n6.every((e16) => e16._def.typeName in un && (!e16._def.checks || !e16._def.checks.length))) { - const e16 = n6.reduce((e17, t14) => { - const n7 = un[t14._def.typeName]; - return n7 && !e17.includes(n7) ? [...e17, n7] : e17; - }, []); - return { type: e16.length > 1 ? e16 : e16[0] }; - } - if (n6.every((e16) => "ZodLiteral" === e16._def.typeName && !e16.description)) { - const e16 = n6.reduce((e17, t14) => { - const n7 = typeof t14._def.value; - switch (n7) { - case "string": - case "number": - case "boolean": - return [...e17, n7]; - case "bigint": - return [...e17, "integer"]; - case "object": - if (null === t14._def.value) - return [...e17, "null"]; - default: - return e17; - } - }, []); - if (e16.length === n6.length) { - const t14 = e16.filter((e17, t15, n7) => n7.indexOf(e17) === t15); - return { type: t14.length > 1 ? t14 : t14[0], enum: n6.reduce((e17, t15) => e17.includes(t15._def.value) ? e17 : [...e17, t15._def.value], []) }; - } - } else if (n6.every((e16) => "ZodEnum" === e16._def.typeName)) - return { type: "string", enum: n6.reduce((e16, t14) => [...e16, ...t14._def.values.filter((t15) => !e16.includes(t15))], []) }; - return ln(e15, t13); - }(e14, n5); - case Be2.ZodIntersection: - return function(e15, t13) { - const n6 = [fn(e15.left._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "0"] }), fn(e15.right._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "1"] })].filter((e16) => !!e16); - let a5 = "jsonSchema2019-09" === t13.target ? { unevaluatedProperties: false } : void 0; - const r3 = []; - return n6.forEach((e16) => { - if ("type" in (t14 = e16) && "string" === t14.type || !("allOf" in t14)) { - let t15 = e16; - if ("additionalProperties" in e16 && false === e16.additionalProperties) { - const { additionalProperties: n7, ...a6 } = e16; - t15 = a6; - } else - a5 = void 0; - r3.push(t15); - } else - r3.push(...e16.allOf), void 0 === e16.unevaluatedProperties && (a5 = void 0); - var t14; - }), r3.length ? { allOf: r3, ...a5 } : void 0; - }(e14, n5); - case Be2.ZodTuple: - return function(e15, t13) { - return e15.rest ? { type: "array", minItems: e15.items.length, items: e15.items.map((e16, n6) => fn(e16._def, { ...t13, currentPath: [...t13.currentPath, "items", `${n6}`] })).reduce((e16, t14) => void 0 === t14 ? e16 : [...e16, t14], []), additionalItems: fn(e15.rest._def, { ...t13, currentPath: [...t13.currentPath, "additionalItems"] }) } : { type: "array", minItems: e15.items.length, maxItems: e15.items.length, items: e15.items.map((e16, n6) => fn(e16._def, { ...t13, currentPath: [...t13.currentPath, "items", `${n6}`] })).reduce((e16, t14) => void 0 === t14 ? e16 : [...e16, t14], []) }; - }(e14, n5); - case Be2.ZodRecord: - return dn(e14, n5); - case Be2.ZodLiteral: - return function(e15, t13) { - const n6 = typeof e15.value; - return "bigint" !== n6 && "number" !== n6 && "boolean" !== n6 && "string" !== n6 ? { type: Array.isArray(e15.value) ? "array" : "object" } : "openApi3" === t13.target ? { type: "bigint" === n6 ? "integer" : n6, enum: [e15.value] } : { type: "bigint" === n6 ? "integer" : n6, const: e15.value }; - }(e14, n5); - case Be2.ZodEnum: - return function(e15) { - return { type: "string", enum: Array.from(e15.values) }; - }(e14); - case Be2.ZodNativeEnum: - return function(e15) { - const t13 = e15.values, n6 = Object.keys(e15.values).filter((e16) => "number" != typeof t13[t13[e16]]).map((e16) => t13[e16]), a5 = Array.from(new Set(n6.map((e16) => typeof e16))); - return { type: 1 === a5.length ? "string" === a5[0] ? "string" : "number" : ["string", "number"], enum: n6 }; - }(e14); - case Be2.ZodNullable: - return function(e15, t13) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(e15.innerType._def.typeName) && (!e15.innerType._def.checks || !e15.innerType._def.checks.length)) - return "openApi3" === t13.target ? { type: un[e15.innerType._def.typeName], nullable: true } : { type: [un[e15.innerType._def.typeName], "null"] }; - if ("openApi3" === t13.target) { - const n7 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath] }); - return n7 && "$ref" in n7 ? { allOf: [n7], nullable: true } : n7 && { ...n7, nullable: true }; - } - const n6 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath, "anyOf", "0"] }); - return n6 && { anyOf: [n6, { type: "null" }] }; - }(e14, n5); - case Be2.ZodOptional: - return ((e15, t13) => { - var n6; - if (t13.currentPath.toString() === (null == (n6 = t13.propertyPath) ? void 0 : n6.toString())) - return fn(e15.innerType._def, t13); - const a5 = fn(e15.innerType._def, { ...t13, currentPath: [...t13.currentPath, "anyOf", "1"] }); - return a5 ? { anyOf: [{ not: Lt2(t13) }, a5] } : Lt2(t13); - })(e14, n5); - case Be2.ZodMap: - return function(e15, t13) { - return "record" === t13.mapStrategy ? dn(e15, t13) : { type: "array", maxItems: 125, items: { type: "array", items: [fn(e15.keyType._def, { ...t13, currentPath: [...t13.currentPath, "items", "items", "0"] }) || Lt2(t13), fn(e15.valueType._def, { ...t13, currentPath: [...t13.currentPath, "items", "items", "1"] }) || Lt2(t13)], minItems: 2, maxItems: 2 } }; - }(e14, n5); - case Be2.ZodSet: - return function(e15, t13) { - const n6 = { type: "array", uniqueItems: true, items: fn(e15.valueType._def, { ...t13, currentPath: [...t13.currentPath, "items"] }) }; - return e15.minSize && zt(n6, "minItems", e15.minSize.value, e15.minSize.message, t13), e15.maxSize && zt(n6, "maxItems", e15.maxSize.value, e15.maxSize.message, t13), n6; - }(e14, n5); - case Be2.ZodLazy: - return () => e14.getter()._def; - case Be2.ZodPromise: - return function(e15, t13) { - return fn(e15.type._def, t13); - }(e14, n5); - case Be2.ZodNaN: - case Be2.ZodNever: - return function(e15) { - return "openAi" === e15.target ? void 0 : { not: Lt2({ ...e15, currentPath: [...e15.currentPath, "not"] }) }; - }(n5); - case Be2.ZodEffects: - return function(e15, t13) { - return "input" === t13.effectStrategy ? fn(e15.schema._def, t13) : Lt2(t13); - }(e14, n5); - case Be2.ZodAny: - return Lt2(n5); - case Be2.ZodUnknown: - return function(e15) { - return Lt2(e15); - }(n5); - case Be2.ZodDefault: - return function(e15, t13) { - return { ...fn(e15.innerType._def, t13), default: e15.defaultValue() }; - }(e14, n5); - case Be2.ZodBranded: - return Ft2(e14, n5); - case Be2.ZodReadonly: - case Be2.ZodCatch: - return ((e15, t13) => fn(e15.innerType._def, t13))(e14, n5); - case Be2.ZodPipeline: - return ((e15, t13) => { - if ("input" === t13.pipeStrategy) - return fn(e15.in._def, t13); - if ("output" === t13.pipeStrategy) - return fn(e15.out._def, t13); - const n6 = fn(e15.in._def, { ...t13, currentPath: [...t13.currentPath, "allOf", "0"] }); - return { allOf: [n6, fn(e15.out._def, { ...t13, currentPath: [...t13.currentPath, "allOf", n6 ? "1" : "0"] })].filter((e16) => void 0 !== e16) }; - })(e14, n5); - case Be2.ZodFunction: - case Be2.ZodVoid: - case Be2.ZodSymbol: - default: - return; - } - }; - function fn(e14, t12, n5 = false) { - var a5; - const r3 = t12.seen.get(e14); - if (t12.override) { - const i5 = null == (a5 = t12.override) ? void 0 : a5.call(t12, e14, t12, r3, n5); - if (i5 !== $t2) - return i5; - } - if (r3 && !n5) { - const e15 = gn(r3, t12); - if (void 0 !== e15) - return e15; - } - const i4 = { def: e14, path: t12.currentPath, jsonSchema: void 0 }; - t12.seen.set(e14, i4); - const s5 = hn2(e14, e14.typeName, t12), o4 = "function" == typeof s5 ? fn(s5(), t12) : s5; - if (o4 && yn2(e14, t12, o4), t12.postProcess) { - const n6 = t12.postProcess(o4, e14, t12); - return i4.jsonSchema = o4, n6; - } - return i4.jsonSchema = o4, o4; - } - var gn = (e14, t12) => { - switch (t12.$refStrategy) { - case "root": - return { $ref: e14.path.join("/") }; - case "relative": - return { $ref: Dt(t12.currentPath, e14.path) }; - case "none": - case "seen": - return e14.path.length < t12.currentPath.length && e14.path.every((e15, n5) => t12.currentPath[n5] === e15) ? (console.warn(`Recursive reference detected at ${t12.currentPath.join("/")}! Defaulting to any`), Lt2(t12)) : "seen" === t12.$refStrategy ? Lt2(t12) : void 0; - } - }; - var yn2 = (e14, t12, n5) => (e14.description && (n5.description = e14.description, t12.markdownDescription && (n5.markdownDescription = e14.description)), n5); - var vn2 = (e14, t12) => { - var n5; - const a5 = Rt2(t12); - let r3 = "object" == typeof t12 && t12.definitions ? Object.entries(t12.definitions).reduce((e15, [t13, n6]) => { - var r4; - return { ...e15, [t13]: null != (r4 = fn(n6._def, { ...a5, currentPath: [...a5.basePath, a5.definitionPath, t13] }, true)) ? r4 : Lt2(a5) }; - }, {}) : void 0; - const i4 = "string" == typeof t12 ? t12 : "title" === (null == t12 ? void 0 : t12.nameStrategy) || null == t12 ? void 0 : t12.name, s5 = null != (n5 = fn(e14._def, void 0 === i4 ? a5 : { ...a5, currentPath: [...a5.basePath, a5.definitionPath, i4] }, false)) ? n5 : Lt2(a5), o4 = "object" == typeof t12 && void 0 !== t12.name && "title" === t12.nameStrategy ? t12.name : void 0; - void 0 !== o4 && (s5.title = o4), a5.flags.hasReferencedOpenAiAnyType && (r3 || (r3 = {}), r3[a5.openAiAnyTypeName] || (r3[a5.openAiAnyTypeName] = { type: ["string", "number", "integer", "boolean", "array", "null"], items: { $ref: "relative" === a5.$refStrategy ? "1" : [...a5.basePath, a5.definitionPath, a5.openAiAnyTypeName].join("/") } })); - const c3 = void 0 === i4 ? r3 ? { ...s5, [a5.definitionPath]: r3 } : s5 : { $ref: [..."relative" === a5.$refStrategy ? [] : a5.basePath, a5.definitionPath, i4].join("/"), [a5.definitionPath]: { ...r3, [i4]: s5 } }; - return "jsonSchema7" === a5.target ? c3.$schema = "http://json-schema.org/draft-07/schema#" : "jsonSchema2019-09" !== a5.target && "openAi" !== a5.target || (c3.$schema = "https://json-schema.org/draft/2019-09/schema#"), "openAi" === a5.target && ("anyOf" in c3 || "oneOf" in c3 || "allOf" in c3 || "type" in c3 && Array.isArray(c3.type)) && console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."), c3; - }; - var bn = Object.defineProperty; - var _n2 = (e14, t12) => { - for (var n5 in t12) - bn(e14, n5, { get: t12[n5], enumerable: true }); - }; - var Sn = i3.string(); - var kn2 = i3.number(); - var xn2 = (i3.boolean(), i3.string().min(1)); - var wn = i3.number().int().positive(); - var Zn2 = i3.number().int().nonnegative(); - var jn2 = i3.number().describe("Tagging version number"); - i3.union([i3.string(), i3.number(), i3.boolean()]).optional(); - _n2({}, { ErrorHandlerSchema: () => An2, HandlerSchema: () => Cn2, LogHandlerSchema: () => On2, StorageSchema: () => Tn, StorageTypeSchema: () => Pn2, errorHandlerJsonSchema: () => $n2, handlerJsonSchema: () => Rn, logHandlerJsonSchema: () => In2, storageJsonSchema: () => Nn, storageTypeJsonSchema: () => En }); - var Pn2 = i3.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"); - var Tn = i3.object({ Local: i3.literal("local"), Session: i3.literal("session"), Cookie: i3.literal("cookie") }).describe("Storage type constants for type-safe references"); - var An2 = i3.any().describe("Error handler function: (error, state?) => void"); - var On2 = i3.any().describe("Log handler function: (message, verbose?) => void"); - var Cn2 = i3.object({ Error: An2.describe("Error handler function"), Log: On2.describe("Log handler function") }).describe("Handler interface with error and log functions"); - var En = vn2(Pn2, { target: "jsonSchema7", $refStrategy: "relative", name: "StorageType" }); - var Nn = vn2(Tn, { target: "jsonSchema7", $refStrategy: "relative", name: "Storage" }); - var $n2 = vn2(An2, { target: "jsonSchema7", $refStrategy: "relative", name: "ErrorHandler" }); - var In2 = vn2(On2, { target: "jsonSchema7", $refStrategy: "relative", name: "LogHandler" }); - var Rn = vn2(Cn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Handler" }); - i3.object({ onError: An2.optional().describe("Error handler function: (error, state?) => void"), onLog: On2.optional().describe("Log handler function: (message, verbose?) => void") }).partial(), i3.object({ verbose: i3.boolean().describe("Enable verbose logging for debugging").optional() }).partial(), i3.object({ queue: i3.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(), i3.object({}).partial(), i3.object({ init: i3.boolean().describe("Whether to initialize immediately").optional(), loadScript: i3.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(), i3.object({ disabled: i3.boolean().describe("Set to true to disable").optional() }).partial(), i3.object({ primary: i3.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(), i3.object({ settings: i3.any().optional().describe("Implementation-specific configuration") }).partial(), i3.object({ env: i3.any().optional().describe("Environment dependencies (platform-specific)") }).partial(), i3.object({ type: i3.string().optional().describe("Instance type identifier"), config: i3.any().describe("Instance configuration") }).partial(), i3.object({ collector: i3.any().describe("Collector instance (runtime object)"), config: i3.any().describe("Configuration"), env: i3.any().describe("Environment dependencies") }).partial(), i3.object({ batch: i3.number().optional().describe("Batch size: bundle N events for batch processing"), batched: i3.any().optional().describe("Batch of events to be processed") }).partial(), i3.object({ ignore: i3.boolean().describe("Set to true to skip processing").optional(), condition: i3.string().optional().describe("Condition function: return true to process") }).partial(), i3.object({ sources: i3.record(i3.string(), i3.any()).describe("Map of source instances") }).partial(), i3.object({ destinations: i3.record(i3.string(), i3.any()).describe("Map of destination instances") }).partial(); - _n2({}, { ConsentSchema: () => Un2, DeepPartialEventSchema: () => Gn2, EntitiesSchema: () => Wn, EntitySchema: () => qn, EventSchema: () => Kn2, OrderedPropertiesSchema: () => Ln2, PartialEventSchema: () => Hn2, PropertiesSchema: () => Dn2, PropertySchema: () => zn, PropertyTypeSchema: () => Mn, SourceSchema: () => Bn2, SourceTypeSchema: () => Fn2, UserSchema: () => Jn, VersionSchema: () => Vn2, consentJsonSchema: () => ra, entityJsonSchema: () => na, eventJsonSchema: () => Yn, orderedPropertiesJsonSchema: () => ta, partialEventJsonSchema: () => Qn2, propertiesJsonSchema: () => ea, sourceTypeJsonSchema: () => aa, userJsonSchema: () => Xn }); - var Mn = i3.lazy(() => i3.union([i3.boolean(), i3.string(), i3.number(), i3.record(i3.string(), zn)])); - var zn = i3.lazy(() => i3.union([Mn, i3.array(Mn)])); - var Dn2 = i3.record(i3.string(), zn.optional()).describe("Flexible property collection with optional values"); - var Ln2 = i3.record(i3.string(), i3.tuple([zn, i3.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"); - var Fn2 = i3.union([i3.enum(["web", "server", "app", "other"]), i3.string()]).describe("Source type: web, server, app, other, or custom"); - var Un2 = i3.record(i3.string(), i3.boolean()).describe("Consent requirement mapping (group name \u2192 state)"); - var Jn = Dn2.and(i3.object({ id: i3.string().optional().describe("User identifier"), device: i3.string().optional().describe("Device identifier"), session: i3.string().optional().describe("Session identifier"), hash: i3.string().optional().describe("Hashed identifier"), address: i3.string().optional().describe("User address"), email: i3.string().email().optional().describe("User email address"), phone: i3.string().optional().describe("User phone number"), userAgent: i3.string().optional().describe("Browser user agent string"), browser: i3.string().optional().describe("Browser name"), browserVersion: i3.string().optional().describe("Browser version"), deviceType: i3.string().optional().describe("Device type (mobile, desktop, tablet)"), os: i3.string().optional().describe("Operating system"), osVersion: i3.string().optional().describe("Operating system version"), screenSize: i3.string().optional().describe("Screen dimensions"), language: i3.string().optional().describe("User language"), country: i3.string().optional().describe("User country"), region: i3.string().optional().describe("User region/state"), city: i3.string().optional().describe("User city"), zip: i3.string().optional().describe("User postal code"), timezone: i3.string().optional().describe("User timezone"), ip: i3.string().optional().describe("User IP address"), internal: i3.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties"); - var Vn2 = Dn2.and(i3.object({ source: Sn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: jn2 })).describe("Walker version information"); - var Bn2 = Dn2.and(i3.object({ type: Fn2.describe("Source type identifier"), id: Sn.describe("Source identifier (typically URL on web)"), previous_id: Sn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information"); - var qn = i3.lazy(() => i3.object({ entity: i3.string().describe("Entity name"), data: Dn2.describe("Entity-specific properties"), nested: i3.array(qn).describe("Nested child entities"), context: Ln2.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support"); - var Wn = i3.array(qn).describe("Array of nested entities"); - var Kn2 = i3.object({ name: i3.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: Dn2.describe("Event-specific properties"), context: Ln2.describe("Ordered context properties with priorities"), globals: Dn2.describe("Global properties shared across events"), custom: Dn2.describe("Custom implementation-specific properties"), user: Jn.describe("User identification and attributes"), nested: Wn.describe("Related nested entities"), consent: Un2.describe("Consent states at event time"), id: xn2.describe("Unique event identifier (timestamp-based)"), trigger: Sn.describe("Event trigger identifier"), entity: Sn.describe("Parsed entity from event name"), action: Sn.describe("Parsed action from event name"), timestamp: wn.describe("Unix timestamp in milliseconds since epoch"), timing: kn2.describe("Event processing timing information"), group: Sn.describe("Event grouping identifier"), count: Zn2.describe("Event count in session"), version: Vn2.describe("Walker version information"), source: Bn2.describe("Event source information") }).describe("Complete walkerOS event structure"); - var Hn2 = Kn2.partial().describe("Partial event structure with all fields optional"); - var Gn2 = i3.lazy(() => Kn2.deepPartial()).describe("Deep partial event structure with all nested fields optional"); - var Yn = vn2(Kn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Event" }); - var Qn2 = vn2(Hn2, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialEvent" }); - var Xn = vn2(Jn, { target: "jsonSchema7", $refStrategy: "relative", name: "User" }); - var ea = vn2(Dn2, { target: "jsonSchema7", $refStrategy: "relative", name: "Properties" }); - var ta = vn2(Ln2, { target: "jsonSchema7", $refStrategy: "relative", name: "OrderedProperties" }); - var na = vn2(qn, { target: "jsonSchema7", $refStrategy: "relative", name: "Entity" }); - var aa = vn2(Fn2, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceType" }); - var ra = vn2(Un2, { target: "jsonSchema7", $refStrategy: "relative", name: "Consent" }); - _n2({}, { ConfigSchema: () => ha, LoopSchema: () => oa, MapSchema: () => da, PolicySchema: () => la, ResultSchema: () => fa, RuleSchema: () => pa, RulesSchema: () => ma, SetSchema: () => ca, ValueConfigSchema: () => ua, ValueSchema: () => ia, ValuesSchema: () => sa, configJsonSchema: () => wa, loopJsonSchema: () => va, mapJsonSchema: () => _a, policyJsonSchema: () => Sa, ruleJsonSchema: () => ka, rulesJsonSchema: () => xa, setJsonSchema: () => ba, valueConfigJsonSchema: () => ya, valueJsonSchema: () => ga }); - var ia = i3.lazy(() => i3.union([i3.string().describe('String value or property path (e.g., "data.id")'), i3.number().describe("Numeric value"), i3.boolean().describe("Boolean value"), ua, i3.array(ia).describe("Array of values")])); - var sa = i3.array(ia).describe("Array of transformation values"); - var oa = i3.tuple([ia, ia]).describe("Loop transformation: [source, transform] tuple for array processing"); - var ca = i3.array(ia).describe("Set: Array of values for selection or combination"); - var da = i3.record(i3.string(), ia).describe("Map: Object mapping keys to transformation values"); - var ua = i3.object({ key: i3.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: i3.union([i3.string(), i3.number(), i3.boolean()]).optional().describe("Static primitive value"), fn: i3.string().optional().describe("Custom transformation function as string (serialized)"), map: da.optional().describe("Object mapping: transform event data to structured output"), loop: oa.optional().describe("Loop transformation: [source, transform] for array processing"), set: ca.optional().describe("Set of values: combine or select from multiple values"), consent: Un2.optional().describe("Required consent states to include this value"), condition: i3.string().optional().describe("Condition function as string: return true to include value"), validate: i3.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e14) => Object.keys(e14).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies"); - var la = i3.record(i3.string(), ia).describe("Policy rules for event pre-processing (key \u2192 value mapping)"); - var pa = i3.object({ batch: i3.number().optional().describe("Batch size: bundle N events for batch processing"), condition: i3.string().optional().describe("Condition function as string: return true to process event"), consent: Un2.optional().describe("Required consent states to process this event"), settings: i3.any().optional().describe("Destination-specific settings for this event mapping"), data: i3.union([ia, sa]).optional().describe("Data transformation rules for event"), ignore: i3.boolean().optional().describe("Set to true to skip processing this event"), name: i3.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: la.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination"); - var ma = i3.record(i3.string(), i3.record(i3.string(), i3.union([pa, i3.array(pa)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"); - var ha = i3.object({ consent: Un2.optional().describe("Required consent states to process any events"), data: i3.union([ia, sa]).optional().describe("Global data transformation applied to all events"), mapping: ma.optional().describe("Entity-action specific mapping rules"), policy: la.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations"); - var fa = i3.object({ eventMapping: pa.optional().describe("Resolved mapping rule for event"), mappingKey: i3.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"); - var ga = vn2(ia, { target: "jsonSchema7", $refStrategy: "relative", name: "Value" }); - var ya = vn2(ua, { target: "jsonSchema7", $refStrategy: "relative", name: "ValueConfig" }); - var va = vn2(oa, { target: "jsonSchema7", $refStrategy: "relative", name: "Loop" }); - var ba = vn2(ca, { target: "jsonSchema7", $refStrategy: "relative", name: "Set" }); - var _a = vn2(da, { target: "jsonSchema7", $refStrategy: "relative", name: "Map" }); - var Sa = vn2(la, { target: "jsonSchema7", $refStrategy: "relative", name: "Policy" }); - var ka = vn2(pa, { target: "jsonSchema7", $refStrategy: "relative", name: "Rule" }); - var xa = vn2(ma, { target: "jsonSchema7", $refStrategy: "relative", name: "Rules" }); - var wa = vn2(ha, { target: "jsonSchema7", $refStrategy: "relative", name: "MappingConfig" }); - _n2({}, { BatchSchema: () => Na, ConfigSchema: () => Za, ContextSchema: () => Ta, DLQSchema: () => Ua, DataSchema: () => $a, DestinationPolicySchema: () => Pa, DestinationsSchema: () => za, InitDestinationsSchema: () => Ma, InitSchema: () => Ra, InstanceSchema: () => Ia, PartialConfigSchema: () => ja, PushBatchContextSchema: () => Oa, PushContextSchema: () => Aa, PushEventSchema: () => Ca, PushEventsSchema: () => Ea, PushResultSchema: () => La, RefSchema: () => Da, ResultSchema: () => Fa, batchJsonSchema: () => Wa, configJsonSchema: () => Ja, contextJsonSchema: () => Ba, instanceJsonSchema: () => Ka, partialConfigJsonSchema: () => Va, pushContextJsonSchema: () => qa, resultJsonSchema: () => Ha }); - var Za = i3.object({ consent: Un2.optional().describe("Required consent states to send events to this destination"), settings: i3.any().describe("Implementation-specific configuration").optional(), data: i3.union([ia, sa]).optional().describe("Global data transformation applied to all events for this destination"), env: i3.any().describe("Environment dependencies (platform-specific)").optional(), id: xn2.describe("Destination instance identifier (defaults to destination key)").optional(), init: i3.boolean().describe("Whether to initialize immediately").optional(), loadScript: i3.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: ma.optional().describe("Entity-action specific mapping rules for this destination"), policy: la.optional().describe("Pre-processing policy rules applied before event mapping"), queue: i3.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: i3.boolean().describe("Enable verbose logging for debugging").optional(), onError: An2.optional(), onLog: On2.optional() }).describe("Destination configuration"); - var ja = Za.deepPartial().describe("Partial destination configuration with all fields deeply optional"); - var Pa = la.describe("Destination policy rules for event pre-processing"); - var Ta = i3.object({ collector: i3.any().describe("Collector instance (runtime object)"), config: Za.describe("Destination configuration"), data: i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))]).optional().describe("Transformed event data"), env: i3.any().describe("Environment dependencies") }).describe("Destination context for init and push functions"); - var Aa = Ta.extend({ mapping: pa.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping"); - var Oa = Aa.describe("Batch push context with event-specific mapping"); - var Ca = i3.object({ event: Kn2.describe("The event to process"), mapping: pa.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing"); - var Ea = i3.array(Ca).describe("Array of events with mappings"); - var Na = i3.object({ key: i3.string().describe('Batch key (usually mapping key like "product.view")'), events: i3.array(Kn2).describe("Array of events in batch"), data: i3.array(i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))])).describe("Transformed data for each event"), mapping: pa.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key"); - var $a = i3.union([i3.any(), i3.undefined(), i3.array(i3.union([i3.any(), i3.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"); - var Ia = i3.object({ config: Za.describe("Destination configuration"), queue: i3.array(Kn2).optional().describe("Queued events awaiting consent"), dlq: i3.array(i3.tuple([Kn2, i3.any()])).optional().describe("Dead letter queue (failed events with errors)"), type: i3.string().optional().describe("Destination type identifier"), env: i3.any().optional().describe("Environment dependencies"), init: i3.any().optional().describe("Initialization function"), push: i3.any().describe("Push function for single events"), pushBatch: i3.any().optional().describe("Batch push function"), on: i3.any().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)"); - var Ra = i3.object({ code: Ia.describe("Destination instance with implementation"), config: ja.optional().describe("Partial configuration overrides"), env: i3.any().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration"); - var Ma = i3.record(i3.string(), Ra).describe("Map of destination IDs to initialization configurations"); - var za = i3.record(i3.string(), Ia).describe("Map of destination IDs to runtime instances"); - var Da = i3.object({ id: i3.string().describe("Destination ID"), destination: Ia.describe("Destination instance") }).describe("Destination reference (ID + instance)"); - var La = i3.object({ queue: i3.array(Kn2).optional().describe("Events queued (awaiting consent)"), error: i3.any().optional().describe("Error if push failed") }).describe("Push operation result"); - var Fa = i3.object({ successful: i3.array(Da).describe("Destinations that processed successfully"), queued: i3.array(Da).describe("Destinations that queued events"), failed: i3.array(Da).describe("Destinations that failed to process") }).describe("Overall destination processing result"); - var Ua = i3.array(i3.tuple([Kn2, i3.any()])).describe("Dead letter queue: [(event, error), ...]"); - var Ja = vn2(Za, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationConfig" }); - var Va = vn2(ja, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialDestinationConfig" }); - var Ba = vn2(Ta, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationContext" }); - var qa = vn2(Aa, { target: "jsonSchema7", $refStrategy: "relative", name: "PushContext" }); - var Wa = vn2(Na, { target: "jsonSchema7", $refStrategy: "relative", name: "Batch" }); - var Ka = vn2(Ia, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationInstance" }); - var Ha = vn2(Fa, { target: "jsonSchema7", $refStrategy: "relative", name: "DestinationResult" }); - _n2({}, { CommandTypeSchema: () => Ga, ConfigSchema: () => Ya, DestinationsSchema: () => nr, InitConfigSchema: () => Xa, InstanceSchema: () => ar, PushContextSchema: () => er, SessionDataSchema: () => Qa, SourcesSchema: () => tr, commandTypeJsonSchema: () => rr, configJsonSchema: () => ir, initConfigJsonSchema: () => or, instanceJsonSchema: () => dr, pushContextJsonSchema: () => cr, sessionDataJsonSchema: () => sr }); - var Ga = i3.union([i3.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), i3.string()]).describe("Collector command type: standard commands or custom string for extensions"); - var Ya = i3.object({ run: i3.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: jn2, globalsStatic: Dn2.describe("Static global properties that persist across collector runs"), sessionStatic: i3.record(i3.any()).describe("Static session data that persists across collector runs"), verbose: i3.boolean().describe("Enable verbose logging for debugging"), onError: An2.optional(), onLog: On2.optional() }).describe("Core collector configuration"); - var Qa = Dn2.and(i3.object({ isStart: i3.boolean().describe("Whether this is a new session start"), storage: i3.boolean().describe("Whether storage is available"), id: xn2.describe("Session identifier").optional(), start: wn.describe("Session start timestamp").optional(), marketing: i3.literal(true).optional().describe("Marketing attribution flag"), updated: wn.describe("Last update timestamp").optional(), isNew: i3.boolean().describe("Whether this is a new session").optional(), device: xn2.describe("Device identifier").optional(), count: Zn2.describe("Event count in session").optional(), runs: Zn2.describe("Number of runs").optional() })).describe("Session state and tracking data"); - var Xa = Ya.partial().extend({ consent: Un2.optional().describe("Initial consent state"), user: Jn.optional().describe("Initial user data"), globals: Dn2.optional().describe("Initial global properties"), sources: i3.any().optional().describe("Source configurations"), destinations: i3.any().optional().describe("Destination configurations"), custom: Dn2.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state"); - var er = i3.object({ mapping: ha.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping"); - var tr = i3.record(i3.string(), i3.any()).describe("Map of source IDs to source instances"); - var nr = i3.record(i3.string(), i3.any()).describe("Map of destination IDs to destination instances"); - var ar = i3.object({ push: i3.any().describe("Push function for processing events"), command: i3.any().describe("Command function for walker commands"), allowed: i3.boolean().describe("Whether event processing is allowed"), config: Ya.describe("Current collector configuration"), consent: Un2.describe("Current consent state"), count: i3.number().describe("Event count (increments with each event)"), custom: Dn2.describe("Custom implementation-specific properties"), sources: tr.describe("Registered source instances"), destinations: nr.describe("Registered destination instances"), globals: Dn2.describe("Current global properties"), group: i3.string().describe("Event grouping identifier"), hooks: i3.any().describe("Lifecycle hook functions"), on: i3.any().describe("Event lifecycle configuration"), queue: i3.array(Kn2).describe("Queued events awaiting processing"), round: i3.number().describe("Collector run count (increments with each run)"), session: i3.union([i3.undefined(), Qa]).describe("Current session state"), timing: i3.number().describe("Event processing timing information"), user: Jn.describe("Current user data"), version: i3.string().describe("Walker implementation version") }).describe("Collector instance with state and methods"); - var rr = vn2(Ga, { target: "jsonSchema7", $refStrategy: "relative", name: "CommandType" }); - var ir = vn2(Ya, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorConfig" }); - var sr = vn2(Qa, { target: "jsonSchema7", $refStrategy: "relative", name: "SessionData" }); - var or = vn2(Xa, { target: "jsonSchema7", $refStrategy: "relative", name: "InitConfig" }); - var cr = vn2(er, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorPushContext" }); - var dr = vn2(ar, { target: "jsonSchema7", $refStrategy: "relative", name: "CollectorInstance" }); - _n2({}, { BaseEnvSchema: () => ur, ConfigSchema: () => lr, InitSchema: () => hr, InitSourceSchema: () => fr, InitSourcesSchema: () => gr, InstanceSchema: () => mr, PartialConfigSchema: () => pr, baseEnvJsonSchema: () => yr, configJsonSchema: () => vr, initSourceJsonSchema: () => Sr, initSourcesJsonSchema: () => kr, instanceJsonSchema: () => _r, partialConfigJsonSchema: () => br }); - var ur = i3.object({ push: i3.any().describe("Collector push function"), command: i3.any().describe("Collector command function"), sources: i3.any().optional().describe("Map of registered source instances"), elb: i3.any().describe("Public API function (alias for collector.push)") }).catchall(i3.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"); - var lr = ha.extend({ settings: i3.any().describe("Implementation-specific configuration").optional(), env: ur.optional().describe("Environment dependencies (platform-specific)"), id: xn2.describe("Source identifier (defaults to source key)").optional(), onError: An2.optional(), disabled: i3.boolean().describe("Set to true to disable").optional(), primary: i3.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment"); - var pr = lr.deepPartial().describe("Partial source configuration with all fields deeply optional"); - var mr = i3.object({ type: i3.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: lr.describe("Current source configuration"), push: i3.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: i3.any().optional().describe("Cleanup function called when source is removed"), on: i3.any().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods"); - var hr = i3.any().describe("Source initialization function: (config, env) => Instance | Promise"); - var fr = i3.object({ code: hr.describe("Source initialization function"), config: pr.optional().describe("Partial configuration overrides"), env: ur.partial().optional().describe("Partial environment overrides"), primary: i3.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration"); - var gr = i3.record(i3.string(), fr).describe("Map of source IDs to initialization configurations"); - var yr = vn2(ur, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceBaseEnv" }); - var vr = vn2(lr, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceConfig" }); - var br = vn2(pr, { target: "jsonSchema7", $refStrategy: "relative", name: "PartialSourceConfig" }); - var _r = vn2(mr, { target: "jsonSchema7", $refStrategy: "relative", name: "SourceInstance" }); - var Sr = vn2(fr, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSource" }); - var kr = vn2(gr, { target: "jsonSchema7", $refStrategy: "relative", name: "InitSources" }); - function xr(e14) { - return vn2(e14, { target: "jsonSchema7", $refStrategy: "none" }); - } - var wr = { merge: true, shallow: true, extend: true }; - function Zr(e14, t12 = {}, n5 = {}) { - n5 = { ...wr, ...n5 }; - const a5 = Object.entries(t12).reduce((t13, [a6, r3]) => { - const i4 = e14[a6]; - return n5.merge && Array.isArray(i4) && Array.isArray(r3) ? t13[a6] = r3.reduce((e15, t14) => e15.includes(t14) ? e15 : [...e15, t14], [...i4]) : (n5.extend || a6 in e14) && (t13[a6] = r3), t13; - }, {}); - return n5.shallow ? { ...e14, ...a5 } : (Object.assign(e14, a5), e14); - } - function jr(e14 = "entity action", t12 = {}) { - const n5 = t12.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), a5 = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, r3 = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } }; - return function(e15 = {}) { - var t13; - const n6 = e15.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), a6 = e15.group || "gr0up", r4 = e15.count || 1, i4 = Zr({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${n6}-${a6}-${r4}`, trigger: "test", entity: "entity", action: "action", timestamp: n6, timing: 3.14, group: a6, count: r4, version: { source: "0.3.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e15, { merge: false }); - if (e15.name) { - const [n7, a7] = null != (t13 = e15.name.split(" ")) ? t13 : []; - n7 && a7 && (i4.entity = n7, i4.action = a7); - } - return i4; - }({ ...{ "cart view": { data: { currency: "EUR", value: 2 * a5.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...a5.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: a5.data.price + r3.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...a5, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...r3, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...a5, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...r3, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.elbwalker.com/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...a5, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...a5, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...a5.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n5, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e14], ...t12, name: e14 }); - } - function Pr(e14, t12, n5) { - return function(...a5) { - try { - return e14(...a5); - } catch (e15) { - if (!t12) - return; - return t12(e15); - } finally { - null == n5 || n5(); - } - }; - } - function Tr(e14) { - return void 0 === e14 || /* @__PURE__ */ function(e15, t12) { - return typeof e15 == typeof t12; - }(e14, "") ? e14 : JSON.stringify(e14); - } - function Ar(e14 = {}) { - return Zr({ "Content-Type": "application/json; charset=utf-8" }, e14); - } - function Or(e14, t12, n5 = { transport: "fetch" }) { - switch (n5.transport || "fetch") { - case "beacon": - return function(e15, t13) { - const n6 = Tr(t13), a5 = navigator.sendBeacon(e15, n6); - return { ok: a5, error: a5 ? void 0 : "Failed to send beacon" }; - }(e14, t12); - case "xhr": - return function(e15, t13, n6 = {}) { - const a5 = Ar(n6.headers), r3 = n6.method || "POST", i4 = Tr(t13); - return Pr(() => { - const t14 = new XMLHttpRequest(); - t14.open(r3, e15, false); - for (const e16 in a5) - t14.setRequestHeader(e16, a5[e16]); - t14.send(i4); - const n7 = t14.status >= 200 && t14.status < 300; - return { ok: n7, data: Pr(JSON.parse, () => t14.response)(t14.response), error: n7 ? void 0 : `${t14.status} ${t14.statusText}` }; - }, (e16) => ({ ok: false, error: e16.message }))(); - }(e14, t12, n5); - default: - return async function(e15, t13, n6 = {}) { - const a5 = Ar(n6.headers), r3 = Tr(t13); - return (/* @__PURE__ */ function(e16, t14, n7) { - return async function(...a6) { - try { - return await e16(...a6); - } catch (e17) { - if (!t14) - return; - return await t14(e17); - } finally { - await (null == n7 ? void 0 : n7()); - } - }; - }(async () => { - const t14 = await fetch(e15, { method: n6.method || "POST", headers: a5, keepalive: true, credentials: n6.credentials || "same-origin", mode: n6.noCors ? "no-cors" : "cors", body: r3 }), i4 = n6.noCors ? "" : await t14.text(); - return { ok: t14.ok, data: i4, error: t14.ok ? void 0 : t14.statusText }; - }, (e16) => ({ ok: false, error: e16.message })))(); - }(e14, t12, n5); - } - } - var Er = {}; - r2(Er, { env: () => Nr, events: () => Rr, mapping: () => zr }); - var Nr = {}; - r2(Nr, { init: () => $r, push: () => Ir }); - var $r = { sendWeb: void 0 }; - var Ir = { sendWeb: Object.assign(() => { - }, {}) }; - var Rr = {}; - function Mr() { - const e14 = jr("entity action"); - return JSON.stringify(e14.data); - } - r2(Rr, { entity_action: () => Mr }); - var zr = {}; - r2(zr, { config: () => Lr, entity_action: () => Dr }); - var Dr = { data: "data" }; - var Lr = { entity: { action: Dr } }; - var Fr = {}; - r2(Fr, { MappingSchema: () => Jr, SettingsSchema: () => Ur, mapping: () => Br, settings: () => Vr }); - var Ur = i3.object({ url: i3.string().url().describe("The HTTP endpoint URL to send events to (like https://api.example.com/events)"), headers: i3.record(i3.string()).describe("Additional HTTP headers to include with requests (like { 'Authorization': 'Bearer token', 'Content-Type': 'application/json' })").optional(), method: i3.string().default("POST").describe("HTTP method for the request"), transform: i3.any().describe("Function to transform event data before sending (like (data, config, mapping) => JSON.stringify(data))").optional(), transport: i3.enum(["fetch", "xhr", "beacon"]).default("fetch").describe("Transport method for sending requests") }); - var Jr = i3.object({}); - var Vr = xr(Ur); - var Br = xr(Jr); - var qr = { type: "api", config: {}, push(e14, { config: t12, mapping: n5, data: a5, env: r3 }) { - const { settings: i4 } = t12, { url: s5, headers: o4, method: c3, transform: d2, transport: u3 = "fetch" } = i4 || {}; - if (!s5) - return; - const l3 = void 0 !== a5 ? a5 : e14; - const p2 = d2 ? d2(l3, t12, n5) : JSON.stringify(l3); - ((null == r3 ? void 0 : r3.sendWeb) || Or)(s5, p2, { headers: o4, method: c3, transport: u3 }); - } }; - - // entry.js - async function entry_default(context = {}) { - const { tracker } = context; - const __simulationTracker = tracker; - const window = typeof globalThis.window !== "undefined" ? globalThis.window : void 0; - const document2 = typeof globalThis.document !== "undefined" ? globalThis.document : void 0; - const config = { - sources: { - demo: { - code: c, - config: { - settings: { - events: [ - { - name: "page view", - data: { - title: "Home", - path: "/" - }, - delay: 0 - }, - { - name: "product view", - data: { - id: "P123", - name: "Test Product", - price: 99.99 - }, - delay: 100 - } - ] - } - } - } - }, - destinations: { - demo: { - code: g, - config: { - settings: { - name: "demo" - } - } - }, - api: { - code: qr, - config: { - settings: { - url: "http://localhost:8080/collect" - } - } - } - }, - ...{ - run: true, - globals: { - language: "en" - } - } - }; - const result = await T2(config); - return result; - } - return __toCommonJS(entry_exports); -})(); -//# sourceMappingURL=web-serve.mjs.map diff --git a/packages/docker/package.json b/packages/docker/package.json index cacc9fa9a..a76b0bdac 100644 --- a/packages/docker/package.json +++ b/packages/docker/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/docker", "description": "Pure runtime Docker container for walkerOS - executes pre-built flows", - "version": "0.1.1", + "version": "0.2.1", "type": "module", "main": "./dist/index.mjs", "types": "./dist/index.d.ts", @@ -22,12 +22,14 @@ "dev": "tsx src/index.ts", "start": "node dist/index.mjs", "lint": "tsc && eslint \"src/**/*.ts\"", - "test": "jest" + "test": "jest", + "docker:build": "bash scripts/build.sh", + "docker:test": "bash scripts/build-and-test.sh", + "docker:publish": "bash scripts/publish.sh" }, "dependencies": { "cors": "^2.8.5", - "express": "^4.18.2", - "zod": "^3.23.8" + "express": "^4.18.2" }, "devDependencies": { "@types/cors": "^2.8.17", diff --git a/packages/docker/scripts/build-and-test.sh b/packages/docker/scripts/build-and-test.sh index d1b5ed0f9..34ff1715c 100755 --- a/packages/docker/scripts/build-and-test.sh +++ b/packages/docker/scripts/build-and-test.sh @@ -28,7 +28,7 @@ docker ps -q --filter "ancestor=${FULL_IMAGE}" | xargs -r docker stop > /dev/nul echo "" # Step 1: Build Docker image -echo -e "${BLUE}[1/4] Building Docker image...${NC}" +echo -e "${BLUE}[1/3] Building Docker image...${NC}" docker build \ -f packages/docker/Dockerfile \ -t "${FULL_IMAGE}" \ @@ -36,36 +36,13 @@ docker build \ echo -e "${GREEN}✓ Docker image built: ${FULL_IMAGE}${NC}\n" -# Step 2: Test Bundle Mode -echo -e "${BLUE}[2/4] Testing Bundle Mode...${NC}" +# Step 2: Test Serve Mode +echo -e "${BLUE}[2/3] Testing Serve Mode...${NC}" -# Create temporary directory for bundle output -TEST_DIR=$(mktemp -d) -trap "rm -rf ${TEST_DIR}" EXIT - -docker run --rm \ - -e MODE=bundle \ - -e FLOW=/app/flows/bundle-web.json \ - -v "${TEST_DIR}:/app/dist" \ - -e GA4_MEASUREMENT_ID="G-TEST123" \ - "${FULL_IMAGE}" - -# Verify bundle was created -if [ -f "${TEST_DIR}/walker.js" ]; then - BUNDLE_SIZE=$(stat -f%z "${TEST_DIR}/walker.js" 2>/dev/null || stat -c%s "${TEST_DIR}/walker.js") - echo -e "${GREEN}✓ Bundle mode: walker.js created (${BUNDLE_SIZE} bytes)${NC}\n" -else - echo -e "${RED}✗ Bundle mode: Failed to create walker.js${NC}" - exit 1 -fi - -# Step 3: Test Serve Mode -echo -e "${BLUE}[3/4] Testing Serve Mode...${NC}" - -# Start serve mode container (no FLOW needed) +# Start serve mode container (serve demo files) SERVE_CONTAINER=$(docker run -d \ -e MODE=serve \ - -v "${TEST_DIR}:/app/dist:ro" \ + -e STATIC_DIR=/app/demos \ -p 8081:8080 \ "${FULL_IMAGE}") @@ -82,11 +59,11 @@ else exit 1 fi -# Test static file serving -if curl -sf http://localhost:8081/walker.js | head -c 100 > /dev/null; then +# Test serving demo files (built into image) +if curl -sf http://localhost:8081/demo-collect.mjs | head -c 100 > /dev/null; then echo -e "${GREEN}✓ Serve mode: Static file serving works${NC}\n" else - echo -e "${RED}✗ Serve mode: Failed to serve walker.js${NC}" + echo -e "${RED}✗ Serve mode: Failed to serve demo files${NC}" docker logs "${SERVE_CONTAINER}" docker stop "${SERVE_CONTAINER}" exit 1 @@ -99,13 +76,13 @@ echo "" # Wait a moment for port to be released sleep 1 -# Step 4: Test Collect Mode -echo -e "${BLUE}[4/4] Testing Collect Mode...${NC}" +# Step 3: Test Collect Mode +echo -e "${BLUE}[3/3] Testing Collect Mode...${NC}" -# Start collect mode container (using built-in flow) +# Start collect mode container (using built-in demo) if ! COLLECT_CONTAINER=$(docker run -d \ -e MODE=collect \ - -e FLOW=/app/flows/collect-console.json \ + -e FLOW=/app/demos/demo-collect.mjs \ -p 8080:8080 \ "${FULL_IMAGE}" 2>&1); then echo -e "${RED}✗ Failed to start collect mode container${NC}" diff --git a/packages/docker/scripts/publish.sh b/packages/docker/scripts/publish.sh new file mode 100755 index 000000000..f63c0a878 --- /dev/null +++ b/packages/docker/scripts/publish.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# Publish walkerOS Runtime Docker image to Docker Hub +set -e + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${BLUE}=== Publishing walkerOS Runtime Docker Image ===${NC}\n" + +# Get version from package.json +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DOCKER_DIR="$(dirname "$SCRIPT_DIR")" +VERSION=$(node -p "require('${DOCKER_DIR}/package.json').version") + +echo -e "${BLUE}Runtime Version: ${VERSION}${NC}" +echo -e "${BLUE}Publishing to Docker Hub...${NC}\n" + +# Configuration +IMAGE_NAME="walkeros/docker" +TAGS=("${VERSION}" "latest") + +# Step 1: Build and Test +echo -e "${BLUE}[1/3] Building and testing Docker image...${NC}" +bash "${SCRIPT_DIR}/build-and-test.sh" +echo "" + +# Step 2: Tag +echo -e "${BLUE}[2/3] Tagging images...${NC}" +# The build-and-test script builds as walkeros-test:local, so we need to tag it +docker tag walkeros-test:local "${IMAGE_NAME}:latest" + +for TAG in "${TAGS[@]}"; do + FULL_TAG="${IMAGE_NAME}:${TAG}" + echo -e "${BLUE}Tagging as ${FULL_TAG}...${NC}" + docker tag "${IMAGE_NAME}:latest" "${FULL_TAG}" + echo -e "${GREEN}✓ Tagged ${FULL_TAG}${NC}" +done +echo "" + +# Step 3: Push +echo -e "${BLUE}[3/3] Pushing to Docker Hub...${NC}" +echo -e "${YELLOW}Note: Make sure you're logged in with 'docker login'${NC}\n" + +for TAG in "${TAGS[@]}"; do + FULL_TAG="${IMAGE_NAME}:${TAG}" + echo -e "${BLUE}Pushing ${FULL_TAG}...${NC}" + + if docker push "${FULL_TAG}"; then + echo -e "${GREEN}✓ Pushed ${FULL_TAG}${NC}\n" + else + echo -e "${RED}✗ Failed to push ${FULL_TAG}${NC}" + echo -e "${RED}Make sure you're logged in to Docker Hub${NC}" + exit 1 + fi +done + +# Success +echo -e "${GREEN}=== Publish Complete! ===${NC}" +echo -e "${GREEN}Published images:${NC}" +for TAG in "${TAGS[@]}"; do + echo -e " ${IMAGE_NAME}:${TAG}" +done +echo "" +echo -e "${BLUE}View on Docker Hub: https://hub.docker.com/r/${IMAGE_NAME}${NC}" diff --git a/packages/docker/src/__tests__/serve.integration.test.ts b/packages/docker/src/__tests__/serve.integration.test.ts index 4c331914a..c706f944b 100644 --- a/packages/docker/src/__tests__/serve.integration.test.ts +++ b/packages/docker/src/__tests__/serve.integration.test.ts @@ -1,7 +1,7 @@ /** * Serve Mode Integration Tests * - * Tests the static file server functionality + * Tests the single-file server functionality */ import { spawn, ChildProcess, execSync } from 'child_process'; @@ -22,16 +22,15 @@ describe('Serve Mode Integration', () => { execSync('npm run build', { cwd: projectRoot, stdio: 'inherit' }); } - // Create test static directory - const testDir = join(projectRoot, '.tmp/test-static'); + // Create test file + const testDir = join(projectRoot, '.tmp'); if (!existsSync(testDir)) { mkdirSync(testDir, { recursive: true }); - writeFileSync( - join(testDir, 'index.html'), - 'Test Page', - ); - writeFileSync(join(testDir, 'test.txt'), 'Hello World'); } + writeFileSync( + join(testDir, 'test-bundle.js'), + '(function(){console.log("test bundle");})();', + ); }); beforeEach(() => { @@ -45,15 +44,15 @@ describe('Serve Mode Integration', () => { } }); - it('should start static file server', async () => { - const staticDir = join(projectRoot, '.tmp/test-static'); + it('should start single-file server with default settings', async () => { + const filePath = join(projectRoot, '.tmp/test-bundle.js'); serverProcess = spawn('node', ['dist/index.mjs'], { cwd: projectRoot, env: { ...process.env, MODE: 'serve', - STATIC_DIR: staticDir, + FILE_PATH: filePath, PORT: port.toString(), }, }); @@ -75,17 +74,19 @@ describe('Serve Mode Integration', () => { const health = (await healthRes.json()) as any; expect(health.status).toBe('ok'); expect(health.mode).toBe('serve'); + expect(health.file).toBe(filePath); + expect(health.url).toBe('/walker.js'); }, 35000); - it('should serve static files', async () => { - const staticDir = join(projectRoot, '.tmp/test-static'); + it('should serve single file at default URL', async () => { + const filePath = join(projectRoot, '.tmp/test-bundle.js'); serverProcess = spawn('node', ['dist/index.mjs'], { cwd: projectRoot, env: { ...process.env, MODE: 'serve', - STATIC_DIR: staticDir, + FILE_PATH: filePath, PORT: port.toString(), }, }); @@ -100,17 +101,48 @@ describe('Serve Mode Integration', () => { await waitForServer(`http://localhost:${port}/health`, 30000); - // Test serving HTML file - const htmlRes = await fetch(`http://localhost:${port}/index.html`); - expect(htmlRes.status).toBe(200); - const html = await htmlRes.text(); - expect(html).toContain('Test Page'); - - // Test serving text file - const txtRes = await fetch(`http://localhost:${port}/test.txt`); - expect(txtRes.status).toBe(200); - const txt = await txtRes.text(); - expect(txt).toBe('Hello World'); + // Test serving bundle at default /walker.js + const bundleRes = await fetch(`http://localhost:${port}/walker.js`); + expect(bundleRes.status).toBe(200); + const bundle = await bundleRes.text(); + expect(bundle).toContain('test bundle'); + }, 35000); + + it('should serve file with custom name and path', async () => { + const filePath = join(projectRoot, '.tmp/test-bundle.js'); + + serverProcess = spawn('node', ['dist/index.mjs'], { + cwd: projectRoot, + env: { + ...process.env, + MODE: 'serve', + FILE_PATH: filePath, + SERVE_NAME: 'custom.js', + SERVE_PATH: 'libs/v1', + PORT: port.toString(), + }, + }); + + // Capture output for debugging + serverProcess.stdout?.on('data', (data) => { + console.log(`[Server stdout]: ${data}`); + }); + serverProcess.stderr?.on('data', (data) => { + console.error(`[Server stderr]: ${data}`); + }); + + await waitForServer(`http://localhost:${port}/health`, 30000); + + // Test health endpoint shows custom URL + const healthRes = await fetch(`http://localhost:${port}/health`); + const health = (await healthRes.json()) as any; + expect(health.url).toBe('/libs/v1/custom.js'); + + // Test serving bundle at custom URL + const bundleRes = await fetch(`http://localhost:${port}/libs/v1/custom.js`); + expect(bundleRes.status).toBe(200); + const bundle = await bundleRes.text(); + expect(bundle).toContain('test bundle'); }, 35000); it('should export runServeMode function', async () => { diff --git a/packages/docker/src/index.ts b/packages/docker/src/index.ts index 9ea3b3a7b..823fabaa4 100644 --- a/packages/docker/src/index.ts +++ b/packages/docker/src/index.ts @@ -1,8 +1,23 @@ #!/usr/bin/env node +import { readFileSync } from 'fs'; +import { fileURLToPath } from 'url'; +import path from 'path'; import { runFlow } from './services/runner'; import { runServeMode } from './services/serve'; +// Read version from package.json (ESM-compatible) +const moduleFilename = fileURLToPath(import.meta.url); +const moduleDir = path.dirname(moduleFilename); +const packageJson = JSON.parse( + readFileSync(path.join(moduleDir, '../package.json'), 'utf-8'), +) as { version: string }; + +/** + * Package version - exported for use by @walkeros/cli + */ +export const VERSION = packageJson.version; + /** * walkerOS Docker Container * diff --git a/packages/docker/src/services/serve.ts b/packages/docker/src/services/serve.ts index 17b391b78..6f92dc7d1 100644 --- a/packages/docker/src/services/serve.ts +++ b/packages/docker/src/services/serve.ts @@ -4,11 +4,13 @@ import path from 'path'; export interface ServeConfig { port?: number; host?: string; - staticDir?: string; + servePath?: string; + serveName?: string; + filePath?: string; } /** - * Run serve mode - serve static files (typically generated bundles) + * Run serve mode - serve single file (typically generated bundle) */ export async function runServeMode(config?: ServeConfig): Promise { // Port priority: ENV variable > config > default @@ -19,33 +21,46 @@ export async function runServeMode(config?: ServeConfig): Promise { // Host priority: ENV variable > config > default const host = process.env.HOST || config?.host || '0.0.0.0'; - // Static dir priority: ENV variable > config > default - const staticDir = - process.env.STATIC_DIR || config?.staticDir || path.resolve('/app/dist'); + // File path: ENV variable > config > baked-in default + const filePath = + process.env.FILE_PATH || config?.filePath || '/app/web-serve.js'; - console.log('📁 Serve mode: Starting static file server...'); - console.log(` Directory: ${staticDir}`); - console.log(` Address: http://${host}:${port}`); + // Serve name (filename in URL): ENV variable > config > default + const serveName = process.env.SERVE_NAME || config?.serveName || 'walker.js'; + + // Serve path (URL directory): ENV variable > config > default (empty = root) + const servePath = process.env.SERVE_PATH || config?.servePath || ''; + + // Build full URL path + const urlPath = servePath ? `/${servePath}/${serveName}` : `/${serveName}`; + + console.log('📁 Serve mode: Starting single-file server...'); + console.log(` File: ${filePath}`); + console.log(` URL: http://${host}:${port}${urlPath}`); try { const app = express(); - // Serve static files - app.use(express.static(staticDir)); - // Health check app.get('/health', (req, res) => { res.json({ status: 'ok', timestamp: Date.now(), mode: 'serve', - staticDir, + file: filePath, + url: urlPath, }); }); + // Serve single file at custom URL path + app.get(urlPath, (req, res) => { + res.sendFile(filePath); + }); + // Start server const server = app.listen(port, host, () => { console.log(`✅ Server listening on http://${host}:${port}`); + console.log(` GET ${urlPath} - Bundle file`); console.log(` GET /health - Health check`); }); diff --git a/packages/server/core/CHANGELOG.md b/packages/server/core/CHANGELOG.md index e97f28f9a..cea362eff 100644 --- a/packages/server/core/CHANGELOG.md +++ b/packages/server/core/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/server-core +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/core/package.json b/packages/server/core/package.json index 503d61947..f4f2ec76b 100644 --- a/packages/server/core/package.json +++ b/packages/server/core/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-core", "description": "Server-specific utilities for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -25,7 +25,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/packages/server/destinations/aws/CHANGELOG.md b/packages/server/destinations/aws/CHANGELOG.md index 1781e6d88..ea5da4bd1 100644 --- a/packages/server/destinations/aws/CHANGELOG.md +++ b/packages/server/destinations/aws/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/server-destination-aws +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/server-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/server-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/destinations/aws/package.json b/packages/server/destinations/aws/package.json index fb1dd02d7..b22638f18 100644 --- a/packages/server/destinations/aws/package.json +++ b/packages/server/destinations/aws/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-destination-aws", "description": "AWS server destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "exports": { ".": { @@ -9,10 +9,10 @@ "import": "./dist/index.mjs", "require": "./dist/index.js" }, - "./schemas": { - "types": "./dist/schemas.d.ts", - "import": "./dist/schemas.mjs", - "require": "./dist/schemas.js" + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" }, "./examples": { "types": "./dist/examples/index.d.ts", @@ -33,7 +33,7 @@ }, "dependencies": { "@aws-sdk/client-firehose": "^3.606.0", - "@walkeros/server-core": "0.3.1" + "@walkeros/server-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/server/destinations/aws/src/dev.ts b/packages/server/destinations/aws/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/server/destinations/aws/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/server/destinations/aws/src/firehose/__tests__/firehose.test.ts b/packages/server/destinations/aws/src/firehose/__tests__/firehose.test.ts index f48b1be02..a39ca47f1 100644 --- a/packages/server/destinations/aws/src/firehose/__tests__/firehose.test.ts +++ b/packages/server/destinations/aws/src/firehose/__tests__/firehose.test.ts @@ -1,7 +1,7 @@ import type { Config, Settings, Destination, Env } from '../types'; import type { WalkerOS, Collector } from '@walkeros/core'; import { createEvent, mockEnv } from '@walkeros/core'; -import { examples } from '../'; +import * as examples from '../examples'; const { env } = examples; diff --git a/packages/server/destinations/aws/src/firehose/index.ts b/packages/server/destinations/aws/src/firehose/index.ts index f8aa0a59e..3ac7d1983 100644 --- a/packages/server/destinations/aws/src/firehose/index.ts +++ b/packages/server/destinations/aws/src/firehose/index.ts @@ -6,12 +6,6 @@ import { push } from './push'; // Types export * as DestinationFirehose from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationFirehose: Destination = { type: 'aws-firehose', diff --git a/packages/server/destinations/aws/src/firehose/schemas/index.ts b/packages/server/destinations/aws/src/firehose/schemas/index.ts index 0a8d7f926..49bd37daf 100644 --- a/packages/server/destinations/aws/src/firehose/schemas/index.ts +++ b/packages/server/destinations/aws/src/firehose/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema, FirehoseConfigSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/server/destinations/aws/src/firehose/schemas/mapping.ts b/packages/server/destinations/aws/src/firehose/schemas/mapping.ts index 17f3b6382..5cf06af49 100644 --- a/packages/server/destinations/aws/src/firehose/schemas/mapping.ts +++ b/packages/server/destinations/aws/src/firehose/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * AWS Firehose Mapping Schema diff --git a/packages/server/destinations/aws/src/firehose/schemas/settings.ts b/packages/server/destinations/aws/src/firehose/schemas/settings.ts index 4257749d2..370a1e3e1 100644 --- a/packages/server/destinations/aws/src/firehose/schemas/settings.ts +++ b/packages/server/destinations/aws/src/firehose/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const FirehoseConfigSchema = z.object({ streamName: z diff --git a/packages/server/destinations/aws/src/firehose/types/index.ts b/packages/server/destinations/aws/src/firehose/types/index.ts index a524a0430..286719161 100644 --- a/packages/server/destinations/aws/src/firehose/types/index.ts +++ b/packages/server/destinations/aws/src/firehose/types/index.ts @@ -13,6 +13,8 @@ export interface Settings { firehose?: FirehoseConfig; } +export type InitSettings = Partial; + export interface Mapping {} export interface Env extends DestinationServer.Env { @@ -22,7 +24,7 @@ export interface Env extends DestinationServer.Env { }; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export interface Destination extends DestinationServer.Destination { init: DestinationServer.InitFn; diff --git a/packages/server/destinations/aws/src/index.ts b/packages/server/destinations/aws/src/index.ts index 5c003cfe7..320bcbabc 100644 --- a/packages/server/destinations/aws/src/index.ts +++ b/packages/server/destinations/aws/src/index.ts @@ -1,7 +1,3 @@ // AWS Firehose export { destinationFirehose } from './firehose'; export * as DestinationFirehose from './firehose/types'; -export * as schemas from './firehose/schemas'; - -// Examples -export * as examples from './examples'; diff --git a/packages/server/destinations/aws/src/schemas.ts b/packages/server/destinations/aws/src/schemas.ts index 00c0909b5..72ec27747 100644 --- a/packages/server/destinations/aws/src/schemas.ts +++ b/packages/server/destinations/aws/src/schemas.ts @@ -1,9 +1,3 @@ // Browser-safe schema-only exports // This file exports ONLY schemas without any Node.js dependencies -import { settings, mapping, firehose } from './firehose/schemas'; - -export const schemas = { - settings, - mapping, - firehose, -}; +export { settings, mapping, firehose } from './firehose/schemas'; diff --git a/packages/server/destinations/aws/tsup.config.ts b/packages/server/destinations/aws/tsup.config.ts index 57ef95e3d..fd88983b7 100644 --- a/packages/server/destinations/aws/tsup.config.ts +++ b/packages/server/destinations/aws/tsup.config.ts @@ -14,4 +14,8 @@ export default defineConfig([ terserOptions: {}, }), buildExamples(), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/server/destinations/datamanager/CHANGELOG.md b/packages/server/destinations/datamanager/CHANGELOG.md index 591f4c9cb..e19730cdd 100644 --- a/packages/server/destinations/datamanager/CHANGELOG.md +++ b/packages/server/destinations/datamanager/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/server-core@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/server-core@0.4.0 + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/destinations/datamanager/README.md b/packages/server/destinations/datamanager/README.md index 3254ec393..2f2355f19 100644 --- a/packages/server/destinations/datamanager/README.md +++ b/packages/server/destinations/datamanager/README.md @@ -23,7 +23,7 @@ npm install @walkeros/server-destination-datamanager ## Quick Start -### Minimal Configuration +### Minimal Configuration (AWS Lambda / Serverless) ```typescript import { destinationDataManager } from '@walkeros/server-destination-datamanager'; @@ -35,8 +35,11 @@ const { collector, elb } = await startFlow({ ...destinationDataManager, config: { settings: { - // OAuth 2.0 access token with datamanager scope - accessToken: 'ya29.c.xxx', + // Service account credentials from environment variables + credentials: { + client_email: process.env.GOOGLE_CLIENT_EMAIL!, + private_key: process.env.GOOGLE_PRIVATE_KEY!.replace(/\\n/g, '\n'), + }, // Destination accounts destinations: [ @@ -62,7 +65,36 @@ await elb('order complete', { }); ``` -### Complete Configuration +### GCP Cloud Functions (Application Default Credentials) + +```typescript +import { destinationDataManager } from '@walkeros/server-destination-datamanager'; +import { startFlow } from '@walkeros/collector'; + +// No auth config needed - ADC works automatically on GCP! +const { collector, elb } = await startFlow({ + destinations: { + datamanager: { + ...destinationDataManager, + config: { + settings: { + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, + }, + }, + }, +}); +``` + +### Local Development ```typescript import { destinationDataManager } from '@walkeros/server-destination-datamanager'; @@ -71,7 +103,8 @@ const config = { ...destinationDataManager, config: { settings: { - accessToken: 'ya29.c.xxx', + // Service account JSON file + keyFilename: './service-account.json', // Multiple destinations (max 10) destinations: [ @@ -136,34 +169,141 @@ const config = { ## Authentication -### OAuth 2.0 Setup +The Data Manager destination uses Google Cloud service accounts with automatic +token refresh. The library handles token management automatically - you just +provide credentials and tokens are cached and refreshed as needed. + +### Authentication Methods + +The destination supports three authentication methods (in priority order): + +1. **Inline Credentials** - Best for serverless (AWS Lambda, Docker, K8s) +2. **Service Account File** - Best for local development +3. **Application Default Credentials (ADC)** - Automatic on GCP + +### 1. Inline Credentials (Recommended for Serverless) + +Best for AWS Lambda, Docker, Kubernetes, and other containerized environments +where you manage secrets via environment variables. + +```typescript +import { destinationDataManager } from '@walkeros/server-destination-datamanager'; + +const config = { + ...destinationDataManager, + config: { + settings: { + credentials: { + client_email: process.env.GOOGLE_CLIENT_EMAIL!, + private_key: process.env.GOOGLE_PRIVATE_KEY!.replace(/\\n/g, '\n'), + }, + destinations: [ + /* ... */ + ], + }, + }, +}; +``` + +**Environment Variables:** + +```bash +GOOGLE_CLIENT_EMAIL=service-account@project.iam.gserviceaccount.com +GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIE...\n-----END PRIVATE KEY-----\n" +``` + +**Note:** Use `.replace(/\\n/g, '\n')` to convert escaped newlines from +environment variables. + +### 2. Service Account File (Local Development) + +Best for local development with filesystem access. + +```typescript +const config = { + ...destinationDataManager, + config: { + settings: { + keyFilename: './service-account.json', + destinations: [ + /* ... */ + ], + }, + }, +}; +``` + +### 3. Application Default Credentials (GCP) + +Automatic on Google Cloud Platform - no configuration needed! -1. **Create a Google Cloud Project** - - Go to [Google Cloud Console](https://console.cloud.google.com/) - - Create a new project or select existing +```typescript +const config = { + ...destinationDataManager, + config: { + settings: { + // No auth config needed - ADC used automatically! + destinations: [ + /* ... */ + ], + }, + }, +}; +``` + +**Works automatically on:** -2. **Enable Data Manager API** - - Navigate to APIs & Services > Library - - Search for "Google Data Manager API" - - Click Enable +- Google Cloud Functions +- Google Cloud Run +- Google Compute Engine +- Google Kubernetes Engine +- Any GCP environment with default service account -3. **Create Service Account** - - Go to APIs & Services > Credentials - - Click "Create Credentials" > "Service Account" - - Grant necessary permissions - - Download JSON key file +**Also works with:** -4. **Get Access Token** - ```bash - gcloud auth application-default print-access-token --scopes=https://www.googleapis.com/auth/datamanager - ``` +- `GOOGLE_APPLICATION_CREDENTIALS` environment variable +- gcloud CLI: `gcloud auth application-default login` -### Required Scope +### Creating a Service Account + +1. Go to [Google Cloud Console](https://console.cloud.google.com/) +2. Navigate to **IAM & Admin > Service Accounts** +3. Click **Create Service Account** +4. Name: `walkeros-datamanager` (or your choice) +5. Grant role: **Data Manager Admin** or custom role with datamanager + permissions +6. Click **Keys > Add Key > Create New Key** +7. Select **JSON** format and download + +**For inline credentials:** + +- Extract `client_email` and `private_key` from the JSON +- Store in environment variables or secrets manager + +**For keyFilename:** + +- Set `keyFilename: '/path/to/downloaded-key.json'` + +**For ADC:** + +- Set `GOOGLE_APPLICATION_CREDENTIALS=/path/to/downloaded-key.json` +- Or deploy to GCP where ADC works automatically + +### Required OAuth Scope ``` https://www.googleapis.com/auth/datamanager ``` +This scope is automatically applied - no configuration needed. + +### Token Management + +- **Lifetime:** 1 hour (3600 seconds) +- **Refresh:** Automatic - library handles expiration +- **Caching:** Tokens are cached and reused until expiration +- **Performance:** ~10-50ms overhead per request for token validation + ## Guided Mapping Helpers Define common fields once in Settings instead of repeating them in every event @@ -172,7 +312,7 @@ mapping: ```typescript { settings: { - accessToken: 'ya29.c.xxx', + credentials: { /* ... */ }, destinations: [...], // Guided helpers (apply to all events) @@ -616,23 +756,28 @@ be rejected. ### Settings -| Property | Type | Required | Description | -| -------------------------- | -------------- | -------- | ------------------------------------------- | -| `accessToken` | string | ✓ | OAuth 2.0 access token | -| `destinations` | Destination[] | ✓ | Array of destination accounts (max 10) | -| `eventSource` | EventSource | | Default event source (WEB, APP, etc.) | -| `batchSize` | number | | Max events per batch (max 2000) | -| `batchInterval` | number | | Batch flush interval in ms | -| `validateOnly` | boolean | | Validate without ingestion | -| `url` | string | | Override API endpoint | -| `consent` | Consent | | Request-level consent | -| `testEventCode` | string | | Test event code for debugging | -| `userData` | object | | Guided helper: User data mapping | -| `userId` | string | | Guided helper: First-party user ID | -| `clientId` | string | | Guided helper: GA4 client ID | -| `sessionAttributes` | string | | Guided helper: Privacy-safe attribution | -| `consentAdUserData` | string/boolean | | Consent mapping: Field name or static value | -| `consentAdPersonalization` | string/boolean | | Consent mapping: Field name or static value | +| Property | Type | Required | Description | +| -------------------------- | -------------- | -------- | -------------------------------------------- | +| `credentials` | object | \* | Service account (client_email + private_key) | +| `keyFilename` | string | \* | Path to service account JSON file | +| `scopes` | string[] | | OAuth scopes (default: datamanager scope) | +| `destinations` | Destination[] | ✓ | Array of destination accounts (max 10) | +| `eventSource` | EventSource | | Default event source (WEB, APP, etc.) | +| `batchSize` | number | | Max events per batch (max 2000) | +| `batchInterval` | number | | Batch flush interval in ms | +| `validateOnly` | boolean | | Validate without ingestion | +| `url` | string | | Override API endpoint | +| `consent` | Consent | | Request-level consent | +| `testEventCode` | string | | Test event code for debugging | +| `userData` | object | | Guided helper: User data mapping | +| `userId` | string | | Guided helper: First-party user ID | +| `clientId` | string | | Guided helper: GA4 client ID | +| `sessionAttributes` | string | | Guided helper: Privacy-safe attribution | +| `consentAdUserData` | string/boolean | | Consent mapping: Field name or static value | +| `consentAdPersonalization` | string/boolean | | Consent mapping: Field name or static value | + +**\* One of `credentials`, `keyFilename`, or ADC (automatic) required for +authentication** ### Event Fields diff --git a/packages/server/destinations/datamanager/package.json b/packages/server/destinations/datamanager/package.json index c86230f6a..89ce2df69 100644 --- a/packages/server/destinations/datamanager/package.json +++ b/packages/server/destinations/datamanager/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-destination-datamanager", "description": "Google Data Manager server destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "exports": { ".": { @@ -9,10 +9,10 @@ "import": "./dist/index.mjs", "require": "./dist/index.js" }, - "./schemas": { - "types": "./dist/schemas.d.ts", - "import": "./dist/schemas.mjs", - "require": "./dist/schemas.js" + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" }, "./examples": { "types": "./dist/examples/index.d.ts", @@ -32,8 +32,9 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/server-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/server-core": "0.4.1", + "google-auth-library": "^10.5.0" }, "devDependencies": {}, "repository": { diff --git a/packages/server/destinations/datamanager/src/__tests__/auth.test.ts b/packages/server/destinations/datamanager/src/__tests__/auth.test.ts new file mode 100644 index 000000000..9b9b72af6 --- /dev/null +++ b/packages/server/destinations/datamanager/src/__tests__/auth.test.ts @@ -0,0 +1,231 @@ +import { GoogleAuth, OAuth2Client } from 'google-auth-library'; +import { createAuthClient, getAccessToken, AuthError } from '../auth'; +import type { Settings } from '../types'; + +jest.mock('google-auth-library'); + +describe('Authentication', () => { + let mockOAuth2Client: jest.Mocked; + let mockGoogleAuth: jest.Mocked; + + beforeEach(() => { + jest.clearAllMocks(); + + const getAccessTokenMock = jest + .fn, []>() + .mockResolvedValue({ token: 'default-token', res: null }); + + mockOAuth2Client = { + getAccessToken: getAccessTokenMock, + } as unknown as jest.Mocked; + + mockGoogleAuth = { + getClient: jest.fn().mockResolvedValue(mockOAuth2Client), + } as unknown as jest.Mocked; + + (GoogleAuth as jest.Mock).mockImplementation(() => mockGoogleAuth); + }); + + describe('createAuthClient', () => { + test('creates client with inline credentials', async () => { + const settings: Settings = { + credentials: { + client_email: 'test@example.com', + private_key: + '-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----', + }, + destinations: [], + }; + + const client = await createAuthClient(settings); + + expect(GoogleAuth).toHaveBeenCalledWith({ + credentials: settings.credentials, + scopes: ['https://www.googleapis.com/auth/datamanager'], + }); + expect(client).toBe(mockOAuth2Client); + }); + + test('creates client with keyFilename', async () => { + const settings: Settings = { + keyFilename: '/path/to/key.json', + destinations: [], + }; + + const client = await createAuthClient(settings); + + expect(GoogleAuth).toHaveBeenCalledWith({ + keyFilename: '/path/to/key.json', + scopes: ['https://www.googleapis.com/auth/datamanager'], + }); + expect(client).toBe(mockOAuth2Client); + }); + + test('uses ADC as fallback when no auth config provided', async () => { + const settings: Settings = { + destinations: [], + }; + + const client = await createAuthClient(settings); + + expect(GoogleAuth).toHaveBeenCalledWith({ + scopes: ['https://www.googleapis.com/auth/datamanager'], + }); + expect(client).toBe(mockOAuth2Client); + }); + + test('supports custom scopes', async () => { + const settings: Settings = { + credentials: { + client_email: 'test@example.com', + private_key: + '-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----', + }, + scopes: ['https://www.googleapis.com/auth/custom-scope'], + destinations: [], + }; + + await createAuthClient(settings); + + expect(GoogleAuth).toHaveBeenCalledWith({ + credentials: settings.credentials, + scopes: ['https://www.googleapis.com/auth/custom-scope'], + }); + }); + + test('credentials take priority over keyFilename', async () => { + const settings: Settings = { + credentials: { + client_email: 'test@example.com', + private_key: + '-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----', + }, + keyFilename: '/path/to/key.json', + destinations: [], + }; + + await createAuthClient(settings); + + const callArgs = (GoogleAuth as jest.Mock).mock.calls[0][0]; + expect(callArgs).toHaveProperty('credentials'); + expect(callArgs).not.toHaveProperty('keyFilename'); + }); + + test('throws AuthError on failure', async () => { + const settings: Settings = { + destinations: [], + }; + + const error = new Error('Auth failed'); + mockGoogleAuth.getClient.mockRejectedValue(error); + + await expect(createAuthClient(settings)).rejects.toThrow(AuthError); + await expect(createAuthClient(settings)).rejects.toThrow( + 'Failed to create auth client', + ); + }); + + test('AuthError includes cause', async () => { + const settings: Settings = { + destinations: [], + }; + + const originalError = new Error('Original error'); + mockGoogleAuth.getClient.mockRejectedValue(originalError); + + try { + await createAuthClient(settings); + fail('Should have thrown'); + } catch (error) { + expect(error).toBeInstanceOf(AuthError); + expect((error as AuthError).cause).toBe(originalError); + } + }); + }); + + describe('getAccessToken', () => { + test('returns access token from client', async () => { + (mockOAuth2Client.getAccessToken as jest.Mock).mockResolvedValue({ + token: 'ya29.test_token', + res: null, + }); + + const token = await getAccessToken(mockOAuth2Client); + + expect(token).toBe('ya29.test_token'); + expect(mockOAuth2Client.getAccessToken).toHaveBeenCalled(); + }); + + test('throws AuthError if token is null', async () => { + (mockOAuth2Client.getAccessToken as jest.Mock).mockResolvedValue({ + token: null, + res: null, + }); + + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow(AuthError); + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow( + 'Failed to obtain access token', + ); + }); + + test('throws AuthError if token is undefined', async () => { + (mockOAuth2Client.getAccessToken as jest.Mock).mockResolvedValue({ + token: undefined, + res: null, + }); + + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow(AuthError); + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow( + 'Failed to obtain access token', + ); + }); + + test('throws AuthError on client failure', async () => { + const error = new Error('Token fetch failed'); + (mockOAuth2Client.getAccessToken as jest.Mock).mockRejectedValue(error); + + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow(AuthError); + await expect(getAccessToken(mockOAuth2Client)).rejects.toThrow( + 'Failed to obtain access token', + ); + }); + + test('AuthError includes cause on failure', async () => { + const originalError = new Error('Network error'); + (mockOAuth2Client.getAccessToken as jest.Mock).mockRejectedValue( + originalError, + ); + + try { + await getAccessToken(mockOAuth2Client); + fail('Should have thrown'); + } catch (error) { + expect(error).toBeInstanceOf(AuthError); + expect((error as AuthError).cause).toBe(originalError); + } + }); + }); + + describe('AuthError', () => { + test('has correct name', () => { + const error = new AuthError('Test error'); + expect(error.name).toBe('DataManagerAuthError'); + }); + + test('has correct message', () => { + const error = new AuthError('Test error message'); + expect(error.message).toBe('Test error message'); + }); + + test('can include cause', () => { + const cause = new Error('Root cause'); + const error = new AuthError('Wrapper error', cause); + expect(error.cause).toBe(cause); + }); + + test('is instanceof Error', () => { + const error = new AuthError('Test'); + expect(error).toBeInstanceOf(Error); + }); + }); +}); diff --git a/packages/server/destinations/datamanager/src/__tests__/index.test.ts b/packages/server/destinations/datamanager/src/__tests__/index.test.ts index 1c5c5c9ea..f4c52c51b 100644 --- a/packages/server/destinations/datamanager/src/__tests__/index.test.ts +++ b/packages/server/destinations/datamanager/src/__tests__/index.test.ts @@ -2,16 +2,39 @@ import type { WalkerOS, Collector } from '@walkeros/core'; import type { Config, DestinationInterface, Settings } from '../types'; import { getEvent } from '@walkeros/core'; import { startFlow } from '@walkeros/collector'; +import type { OAuth2Client } from 'google-auth-library'; + +jest.mock('../auth', () => ({ + createAuthClient: jest.fn(), + getAccessToken: jest.fn(), + AuthError: class AuthError extends Error { + constructor( + message: string, + public cause?: Error, + ) { + super(message); + this.name = 'DataManagerAuthError'; + } + }, +})); + +import { createAuthClient, getAccessToken } from '../auth'; describe('Server Destination Data Manager', () => { let destination: DestinationInterface; let elb: WalkerOS.Elb; - const accessToken = 'ya29.c.test_token'; + const mockAuthClient = { + getAccessToken: jest.fn(), + } as unknown as OAuth2Client; const mockFetch = jest.fn(); + const mockAccessToken = 'ya29.c.test_token'; beforeEach(async () => { jest.clearAllMocks(); + (createAuthClient as jest.Mock).mockResolvedValue(mockAuthClient); + (getAccessToken as jest.Mock).mockResolvedValue(mockAccessToken); + // Reset mockFetch to default successful response mockFetch.mockResolvedValue({ ok: true, @@ -45,7 +68,7 @@ describe('Server Destination Data Manager', () => { } describe('init', () => { - test('throws error when accessToken is missing', async () => { + test('throws error when destinations is missing', async () => { const mockCollector = {} as Collector.Instance; await expect( destination.init({ @@ -53,14 +76,14 @@ describe('Server Destination Data Manager', () => { collector: mockCollector, env: {}, }), - ).rejects.toThrow('Config settings accessToken missing'); + ).rejects.toThrow('Config settings destinations missing or empty'); }); - test('throws error when destinations is missing', async () => { + test('throws error when destinations is empty', async () => { const mockCollector = {} as Collector.Instance; await expect( destination.init({ - config: { settings: { accessToken } as Settings }, + config: { settings: { destinations: [] } as Settings }, collector: mockCollector, env: {}, }), @@ -69,7 +92,6 @@ describe('Server Destination Data Manager', () => { test('succeeds with valid configuration', async () => { const config = await getConfig({ - accessToken, destinations: [ { operatingAccount: { @@ -84,7 +106,6 @@ describe('Server Destination Data Manager', () => { expect(config).toEqual( expect.objectContaining({ settings: expect.objectContaining({ - accessToken, destinations: expect.arrayContaining([ expect.objectContaining({ operatingAccount: expect.objectContaining({ @@ -94,6 +115,36 @@ describe('Server Destination Data Manager', () => { }), ]), }), + env: expect.objectContaining({ + authClient: mockAuthClient, + }), + }), + ); + }); + + test('creates auth client during init', async () => { + await getConfig({ + credentials: { + client_email: 'test@example.com', + private_key: + '-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----', + }, + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }); + + expect(createAuthClient).toHaveBeenCalledWith( + expect.objectContaining({ + credentials: expect.objectContaining({ + client_email: 'test@example.com', + }), }), ); }); @@ -101,7 +152,6 @@ describe('Server Destination Data Manager', () => { describe('push', () => { const defaultSettings: Settings = { - accessToken, destinations: [ { operatingAccount: { @@ -122,20 +172,22 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: defaultSettings, + env: { authClient: mockAuthClient, fetch: mockFetch }, }; await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: config.env!, }); + expect(getAccessToken).toHaveBeenCalledWith(mockAuthClient); expect(mockFetch).toHaveBeenCalledWith( 'https://datamanager.googleapis.com/v1/events:ingest', expect.objectContaining({ method: 'POST', headers: expect.objectContaining({ - Authorization: `Bearer ${accessToken}`, + Authorization: `Bearer ${mockAccessToken}`, 'Content-Type': 'application/json', }), }), @@ -153,7 +205,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config: { settings: defaultSettings }, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -182,7 +234,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -208,7 +260,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -230,7 +282,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -245,7 +297,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config: { settings: defaultSettings }, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -272,7 +324,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -296,7 +348,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -317,7 +369,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -338,7 +390,7 @@ describe('Server Destination Data Manager', () => { destination.push(event, { config: { settings: defaultSettings }, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }), ).rejects.toThrow('Data Manager API error (400)'); }); @@ -365,7 +417,7 @@ describe('Server Destination Data Manager', () => { destination.push(event, { config: { settings: defaultSettings }, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }), ).rejects.toThrow('Validation errors'); }); @@ -384,7 +436,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); expect(mockFetch).toHaveBeenCalledWith( @@ -399,7 +451,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -422,7 +473,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -444,7 +495,6 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config: { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -457,7 +507,7 @@ describe('Server Destination Data Manager', () => { }, }, collector: mockCollector, - env: { fetch: customFetch }, + env: { authClient: mockAuthClient, fetch: customFetch }, }); expect(customFetch).toHaveBeenCalled(); @@ -472,7 +522,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -492,7 +541,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -507,7 +556,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -525,7 +573,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -542,7 +590,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -559,7 +606,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -576,7 +623,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -598,7 +644,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -617,7 +663,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -635,7 +680,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -651,7 +696,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -669,7 +713,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -689,7 +733,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -705,7 +748,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); @@ -725,7 +768,6 @@ describe('Server Destination Data Manager', () => { const config: Config = { settings: { - accessToken, destinations: [ { operatingAccount: { @@ -742,7 +784,7 @@ describe('Server Destination Data Manager', () => { await destination.push(event, { config, collector: mockCollector, - env: { fetch: mockFetch }, + env: { authClient: mockAuthClient, fetch: mockFetch }, }); const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body); diff --git a/packages/server/destinations/datamanager/src/auth.ts b/packages/server/destinations/datamanager/src/auth.ts new file mode 100644 index 000000000..51b2fa8e0 --- /dev/null +++ b/packages/server/destinations/datamanager/src/auth.ts @@ -0,0 +1,90 @@ +import { GoogleAuth, type OAuth2Client } from 'google-auth-library'; +import type { Settings } from './types'; + +const DEFAULT_SCOPES = ['https://www.googleapis.com/auth/datamanager']; + +/** + * Authentication error with cause tracking + */ +export class AuthError extends Error { + constructor( + message: string, + public cause?: Error, + ) { + super(message); + this.name = 'DataManagerAuthError'; + } +} + +/** + * Creates Google Auth client based on settings + * + * Authentication priority: + * 1. credentials (inline service account) - if provided + * 2. keyFilename (service account file) - if provided + * 3. Application Default Credentials (ADC) - automatic fallback + * - GOOGLE_APPLICATION_CREDENTIALS env var + * - GCP metadata server (Cloud Functions, Cloud Run, GCE) + * + * @param settings - Configuration with auth options + * @returns OAuth2Client for token retrieval + * @throws AuthError if authentication fails + */ +export async function createAuthClient( + settings: Settings, +): Promise { + const { credentials, keyFilename, scopes = DEFAULT_SCOPES } = settings; + + try { + if (credentials) { + const auth = new GoogleAuth({ + credentials, + scopes, + }); + return (await auth.getClient()) as OAuth2Client; + } + + if (keyFilename) { + const auth = new GoogleAuth({ + keyFilename, + scopes, + }); + return (await auth.getClient()) as OAuth2Client; + } + + const auth = new GoogleAuth({ scopes }); + return (await auth.getClient()) as OAuth2Client; + } catch (error) { + throw new AuthError( + 'Failed to create auth client. Check credentials configuration or ensure GOOGLE_APPLICATION_CREDENTIALS is set.', + error instanceof Error ? error : undefined, + ); + } +} + +/** + * Gets access token from auth client + * Automatically returns cached token if valid or refreshes if expired + * + * @param authClient - OAuth2 client from createAuthClient() + * @returns Fresh access token + * @throws AuthError if token retrieval fails + */ +export async function getAccessToken( + authClient: OAuth2Client, +): Promise { + try { + const tokenResponse = await authClient.getAccessToken(); + + if (!tokenResponse.token) { + throw new AuthError('Auth client returned empty token'); + } + + return tokenResponse.token; + } catch (error) { + throw new AuthError( + 'Failed to obtain access token', + error instanceof Error ? error : undefined, + ); + } +} diff --git a/packages/server/destinations/datamanager/src/config.ts b/packages/server/destinations/datamanager/src/config.ts index c00871b47..c58006db2 100644 --- a/packages/server/destinations/datamanager/src/config.ts +++ b/packages/server/destinations/datamanager/src/config.ts @@ -3,15 +3,13 @@ import { throwError } from '@walkeros/core'; export function getConfig(partialConfig: PartialConfig = {}): Config { const settings = (partialConfig.settings || {}) as Partial; - const { accessToken, destinations } = settings; + const { destinations } = settings; - if (!accessToken) throwError('Config settings accessToken missing'); if (!destinations || destinations.length === 0) throwError('Config settings destinations missing or empty'); const settingsConfig: Settings = { ...settings, - accessToken, destinations, }; diff --git a/packages/server/destinations/datamanager/src/dev.ts b/packages/server/destinations/datamanager/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/server/destinations/datamanager/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/server/destinations/datamanager/src/examples/auth.ts b/packages/server/destinations/datamanager/src/examples/auth.ts new file mode 100644 index 000000000..b9f662e51 --- /dev/null +++ b/packages/server/destinations/datamanager/src/examples/auth.ts @@ -0,0 +1,112 @@ +import type { DestinationDataManager } from '..'; + +/** + * AWS Lambda / Serverless Configuration + * Uses inline credentials from environment variables + * Best for: AWS Lambda, Docker, Kubernetes, any serverless environment + */ +export const awsLambda: DestinationDataManager.Config = { + settings: { + credentials: { + client_email: process.env.GOOGLE_CLIENT_EMAIL || '', + private_key: (process.env.GOOGLE_PRIVATE_KEY || '').replace(/\\n/g, '\n'), + }, + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, +}; + +/** + * GCP Cloud Functions / Cloud Run Configuration + * Uses Application Default Credentials (ADC) - no explicit auth config needed + * Best for: Google Cloud Functions, Cloud Run, GCE, GKE + */ +export const gcpCloudFunctions: DestinationDataManager.Config = { + settings: { + // No auth config needed - ADC works automatically on GCP! + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, +}; + +/** + * Local Development Configuration + * Uses service account JSON file + * Best for: Local development, testing + */ +export const localDevelopment: DestinationDataManager.Config = { + settings: { + keyFilename: './service-account.json', + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, +}; + +/** + * Docker / Kubernetes Configuration + * Uses ADC via GOOGLE_APPLICATION_CREDENTIALS environment variable + * Best for: Docker containers, Kubernetes pods + * + * Setup: + * 1. Mount service account JSON as secret/configmap + * 2. Set GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json + * 3. ADC will automatically use it + */ +export const dockerKubernetes: DestinationDataManager.Config = { + settings: { + // No explicit config - ADC uses GOOGLE_APPLICATION_CREDENTIALS env var + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, +}; + +/** + * Custom Scopes Configuration + * For specific use cases requiring different OAuth scopes + */ +export const customScopes: DestinationDataManager.Config = { + settings: { + credentials: { + client_email: process.env.GOOGLE_CLIENT_EMAIL || '', + private_key: (process.env.GOOGLE_PRIVATE_KEY || '').replace(/\\n/g, '\n'), + }, + scopes: ['https://www.googleapis.com/auth/datamanager'], + destinations: [ + { + operatingAccount: { + accountId: '123-456-7890', + accountType: 'GOOGLE_ADS', + }, + productDestinationId: 'AW-CONVERSION-123', + }, + ], + }, +}; diff --git a/packages/server/destinations/datamanager/src/examples/basic.ts b/packages/server/destinations/datamanager/src/examples/basic.ts index e592b1e09..0861e1a29 100644 --- a/packages/server/destinations/datamanager/src/examples/basic.ts +++ b/packages/server/destinations/datamanager/src/examples/basic.ts @@ -1,11 +1,15 @@ import type { DestinationDataManager } from '..'; /** - * Minimal configuration for Google Data Manager + * Minimal configuration for Google Data Manager with inline credentials */ export const minimal: DestinationDataManager.Config = { settings: { - accessToken: 'ya29.c.xxx', + credentials: { + client_email: 'service-account@project.iam.gserviceaccount.com', + private_key: + '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n', + }, destinations: [ { operatingAccount: { @@ -23,7 +27,11 @@ export const minimal: DestinationDataManager.Config = { */ export const complete: DestinationDataManager.Config = { settings: { - accessToken: 'ya29.c.xxx', + credentials: { + client_email: 'service-account@project.iam.gserviceaccount.com', + private_key: + '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n', + }, destinations: [ { operatingAccount: { @@ -68,11 +76,10 @@ export const complete: DestinationDataManager.Config = { }; /** - * GA4-specific configuration + * GA4-specific configuration using Application Default Credentials */ export const ga4: DestinationDataManager.Config = { settings: { - accessToken: 'ya29.c.xxx', destinations: [ { operatingAccount: { @@ -87,11 +94,11 @@ export const ga4: DestinationDataManager.Config = { }; /** - * Debug configuration with logging enabled + * Debug configuration with logging enabled using keyFilename */ export const debug: DestinationDataManager.Config = { settings: { - accessToken: 'ya29.c.xxx', + keyFilename: './service-account.json', destinations: [ { operatingAccount: { diff --git a/packages/server/destinations/datamanager/src/examples/index.ts b/packages/server/destinations/datamanager/src/examples/index.ts index 026f6f150..70529b887 100644 --- a/packages/server/destinations/datamanager/src/examples/index.ts +++ b/packages/server/destinations/datamanager/src/examples/index.ts @@ -1,2 +1,3 @@ -export * as mapping from './mapping'; +export * as auth from './auth'; export * as basic from './basic'; +export * as mapping from './mapping'; diff --git a/packages/server/destinations/datamanager/src/examples/mapping.ts b/packages/server/destinations/datamanager/src/examples/mapping.ts index eaaf22191..1efd15734 100644 --- a/packages/server/destinations/datamanager/src/examples/mapping.ts +++ b/packages/server/destinations/datamanager/src/examples/mapping.ts @@ -93,7 +93,7 @@ export const mapping = { */ export const userDataMapping: DestinationDataManager.Config = { settings: { - accessToken: 'ya29.c.xxx', + keyFilename: './service-account.json', destinations: [ { operatingAccount: { diff --git a/packages/server/destinations/datamanager/src/index.ts b/packages/server/destinations/datamanager/src/index.ts index ec9910073..0a07fee12 100644 --- a/packages/server/destinations/datamanager/src/index.ts +++ b/packages/server/destinations/datamanager/src/index.ts @@ -1,24 +1,44 @@ import type { DestinationInterface } from './types'; import { getConfig } from './config'; import { push } from './push'; +import { createAuthClient } from './auth'; -// Types export * as DestinationDataManager from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationDataManager: DestinationInterface = { type: 'datamanager', config: {}, - async init({ config: partialConfig }) { + async init({ config: partialConfig, env }) { const config = getConfig(partialConfig); - return config; + + if (!config.settings) { + throw new Error('Settings required for Data Manager destination'); + } + + if ( + !config.settings.destinations || + config.settings.destinations.length === 0 + ) { + throw new Error('At least one destination required in settings'); + } + + try { + const authClient = await createAuthClient(config.settings); + + return { + ...config, + env: { + ...env, + authClient, + }, + }; + } catch (error) { + throw new Error( + `Data Manager authentication failed: ${error instanceof Error ? error.message : 'Unknown error'}`, + ); + } }, async push(event, { config, mapping, data, collector, env }) { diff --git a/packages/server/destinations/datamanager/src/push.ts b/packages/server/destinations/datamanager/src/push.ts index aeb6ecbfe..4675e1a17 100644 --- a/packages/server/destinations/datamanager/src/push.ts +++ b/packages/server/destinations/datamanager/src/push.ts @@ -3,13 +3,13 @@ import type { IngestEventsRequest, IngestEventsResponse } from './types'; import { getMappingValue, isObject } from '@walkeros/core'; import { formatEvent, formatConsent } from './format'; import { createLogger } from './utils'; +import { getAccessToken } from './auth'; export const push: PushFn = async function ( event, { config, mapping, data, collector, env }, ) { const { - accessToken, destinations, eventSource, validateOnly = false, @@ -102,6 +102,10 @@ export const push: PushFn = async function ( dataManagerEvent.consent = requestConsent; } + if (!destinations || destinations.length === 0) { + throw new Error('Destinations are required'); + } + // Build API request const requestBody: IngestEventsRequest = { events: [dataManagerEvent], @@ -121,7 +125,21 @@ export const push: PushFn = async function ( requestBody.testEventCode = testEventCode; } - // Send to Data Manager API + const authClient = env?.authClient; + if (!authClient) { + throw new Error( + 'Auth client not initialized. Ensure init() was called successfully.', + ); + } + + let accessToken: string; + try { + accessToken = await getAccessToken(authClient); + } catch (error) { + logger.error('Authentication failed', { error }); + throw error; + } + const fetchFn = env?.fetch || fetch; const endpoint = `${url}/events:ingest`; diff --git a/packages/server/destinations/datamanager/src/schemas.ts b/packages/server/destinations/datamanager/src/schemas.ts index 4f6d969aa..e81466efa 100644 --- a/packages/server/destinations/datamanager/src/schemas.ts +++ b/packages/server/destinations/datamanager/src/schemas.ts @@ -1,5 +1,3 @@ // Browser-safe schema-only exports // This file exports ONLY schemas without any Node.js dependencies -import { schemas } from './schemas/index'; - -export { schemas }; +export { settings, mapping } from './schemas/index'; diff --git a/packages/server/destinations/datamanager/src/schemas/index.ts b/packages/server/destinations/datamanager/src/schemas/index.ts index c01fcdadb..35e2d7569 100644 --- a/packages/server/destinations/datamanager/src/schemas/index.ts +++ b/packages/server/destinations/datamanager/src/schemas/index.ts @@ -2,13 +2,9 @@ export * from './primitives'; export * from './settings'; export * from './mapping'; -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; -import type { JSONSchema } from '@walkeros/core'; - -export const schemas: Record = { - settings: zodToSchema(SettingsSchema), - mapping: zodToSchema(MappingSchema), -}; +export const settings = zodToSchema(SettingsSchema); +export const mapping = zodToSchema(MappingSchema); diff --git a/packages/server/destinations/datamanager/src/schemas/mapping.ts b/packages/server/destinations/datamanager/src/schemas/mapping.ts index 9cedb5a28..bcbc332bf 100644 --- a/packages/server/destinations/datamanager/src/schemas/mapping.ts +++ b/packages/server/destinations/datamanager/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; // Data Manager uses flexible mapping via walkerOS mapping system // No event-specific mapping schema needed (similar to Meta CAPI pattern) diff --git a/packages/server/destinations/datamanager/src/schemas/primitives.ts b/packages/server/destinations/datamanager/src/schemas/primitives.ts index c85594891..9bc548c2b 100644 --- a/packages/server/destinations/datamanager/src/schemas/primitives.ts +++ b/packages/server/destinations/datamanager/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const AccountTypeSchema = z.enum([ 'GOOGLE_ADS', diff --git a/packages/server/destinations/datamanager/src/schemas/settings.ts b/packages/server/destinations/datamanager/src/schemas/settings.ts index 13d5ae548..c47584bbb 100644 --- a/packages/server/destinations/datamanager/src/schemas/settings.ts +++ b/packages/server/destinations/datamanager/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { DestinationSchema, EventSourceSchema, diff --git a/packages/server/destinations/datamanager/src/types/index.ts b/packages/server/destinations/datamanager/src/types/index.ts index c49ad8dab..70ca4fdec 100644 --- a/packages/server/destinations/datamanager/src/types/index.ts +++ b/packages/server/destinations/datamanager/src/types/index.ts @@ -3,11 +3,30 @@ import type { Destination as CoreDestination, } from '@walkeros/core'; import type { DestinationServer } from '@walkeros/server-core'; +import type { OAuth2Client } from 'google-auth-library'; import type { LogLevel } from '../utils'; export interface Settings { - /** OAuth 2.0 access token with datamanager scope */ - accessToken: string; + /** + * Service account credentials (client_email + private_key) + * Recommended for serverless environments (AWS Lambda, Docker, etc.) + */ + credentials?: { + client_email: string; + private_key: string; + }; + + /** + * Path to service account JSON file + * For local development or environments with filesystem access + */ + keyFilename?: string; + + /** + * OAuth scopes for Data Manager API + * @default ['https://www.googleapis.com/auth/datamanager'] + */ + scopes?: string[]; /** Array of destination accounts and conversion actions/user lists */ destinations: Destination[]; @@ -65,9 +84,12 @@ export interface Mapping { export interface Env extends DestinationServer.Env { fetch?: typeof fetch; + authClient?: OAuth2Client | null; } -export type Types = CoreDestination.Types; +export type InitSettings = Partial; + +export type Types = CoreDestination.Types; export interface DestinationInterface extends DestinationServer.Destination { @@ -96,17 +118,26 @@ export type Rules = WalkerOSMapping.Rules; * https://developers.google.com/data-manager/api/reference/rest/v1/Destination */ export interface Destination { - /** Operating account details */ - operatingAccount: OperatingAccount; + /** Reference identifier for this destination */ + reference?: string; + + /** Login account (account initiating the request) */ + loginAccount?: ProductAccount; + + /** Linked account (child account linked to login account) */ + linkedAccount?: ProductAccount; + + /** Operating account (account where data is sent) */ + operatingAccount?: ProductAccount; /** Product-specific destination ID (conversion action or user list) */ - productDestinationId: string; + productDestinationId?: string; } /** - * Operating account information + * Product account information */ -export interface OperatingAccount { +export interface ProductAccount { /** Account ID (e.g., "123-456-7890" for Google Ads) */ accountId: string; @@ -115,10 +146,12 @@ export interface OperatingAccount { } export type AccountType = + | 'ACCOUNT_TYPE_UNSPECIFIED' | 'GOOGLE_ADS' | 'DISPLAY_VIDEO_ADVERTISER' | 'DISPLAY_VIDEO_PARTNER' - | 'GOOGLE_ANALYTICS_PROPERTY'; + | 'GOOGLE_ANALYTICS_PROPERTY' + | 'DATA_PARTNER'; export type EventSource = 'WEB' | 'APP' | 'IN_STORE' | 'PHONE' | 'OTHER'; @@ -141,15 +174,12 @@ export type ConsentStatus = 'CONSENT_GRANTED' | 'CONSENT_DENIED'; * https://developers.google.com/data-manager/api/reference/rest/v1/events/ingest */ export interface IngestEventsRequest { - /** OAuth 2.0 access token */ - access_token?: string; + /** Array of destinations for these events (max 10) */ + destinations: Destination[]; /** Array of events to ingest (max 2000) */ events: Event[]; - /** Array of destinations for these events (max 10) */ - destinations: Destination[]; - /** Request-level consent (overridden by event-level) */ consent?: Consent; @@ -165,41 +195,111 @@ export interface IngestEventsRequest { * https://developers.google.com/data-manager/api/reference/rest/v1/Event */ export interface Event { - /** Event timestamp in RFC 3339 format */ - eventTimestamp: string; + /** Destination references for routing */ + destinationReferences?: string[]; /** Transaction ID for deduplication (max 512 chars) */ transactionId?: string; - /** Google Analytics client ID (max 255 chars) */ - clientId?: string; + /** Event timestamp in RFC 3339 format */ + eventTimestamp?: string; - /** First-party user ID (max 256 chars) */ - userId?: string; + /** Last updated timestamp in RFC 3339 format */ + lastUpdatedTimestamp?: string; /** User data with identifiers (max 10 identifiers) */ userData?: UserData; + /** Event-level consent (overrides request-level) */ + consent?: Consent; + /** Attribution identifiers */ adIdentifiers?: AdIdentifiers; + /** Currency code (ISO 4217, 3 chars) */ + currency?: string; + /** Conversion value */ conversionValue?: number; - /** Currency code (ISO 4217, 3 chars) */ - currency?: string; + /** Source of the event */ + eventSource?: EventSource; + + /** Device information for the event */ + eventDeviceInfo?: DeviceInfo; /** Shopping cart data */ cartData?: CartData; + /** Custom variables for the event */ + customVariables?: CustomVariable[]; + + /** Experimental fields (subject to change) */ + experimentalFields?: ExperimentalField[]; + + /** User properties */ + userProperties?: UserProperties; + /** Event name for GA4 (max 40 chars, required for GA4) */ eventName?: string; - /** Source of the event */ - eventSource?: EventSource; + /** Google Analytics client ID (max 255 chars) */ + clientId?: string; - /** Event-level consent (overrides request-level) */ - consent?: Consent; + /** First-party user ID (max 256 chars) */ + userId?: string; + + /** Additional event parameters */ + additionalEventParameters?: EventParameter[]; +} + +/** + * Device information + */ +export interface DeviceInfo { + /** User agent string */ + userAgent?: string; +} + +/** + * Custom variable + */ +export interface CustomVariable { + /** Variable name */ + name?: string; + + /** Variable value */ + value?: string; +} + +/** + * Experimental field + */ +export interface ExperimentalField { + /** Field name */ + name?: string; + + /** Field value */ + value?: string; +} + +/** + * User properties + */ +export interface UserProperties { + /** Property values */ + [key: string]: string | number | boolean | undefined; +} + +/** + * Event parameter + */ +export interface EventParameter { + /** Parameter name */ + name?: string; + + /** Parameter value */ + value?: string | number; } /** @@ -242,6 +342,9 @@ export interface Address { * https://developers.google.com/data-manager/api/reference/rest/v1/AdIdentifiers */ export interface AdIdentifiers { + /** Session attributes (privacy-safe attribution) */ + sessionAttributes?: string; + /** Google Click ID (primary attribution) */ gclid?: string; @@ -251,8 +354,8 @@ export interface AdIdentifiers { /** Web-to-app attribution identifier */ wbraid?: string; - /** Session attributes (privacy-safe attribution) */ - sessionAttributes?: string; + /** Device information for landing page */ + landingPageDeviceInfo?: DeviceInfo; } /** diff --git a/packages/server/destinations/datamanager/tsup.config.ts b/packages/server/destinations/datamanager/tsup.config.ts index 73f592873..a86d8dc58 100644 --- a/packages/server/destinations/datamanager/tsup.config.ts +++ b/packages/server/destinations/datamanager/tsup.config.ts @@ -14,4 +14,9 @@ export default defineConfig([ terserOptions: {}, }), buildExamples(), + // Schemas build (separate entry for documentation/tooling) + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/server/destinations/gcp/CHANGELOG.md b/packages/server/destinations/gcp/CHANGELOG.md index 0a8eb8a82..0f97b8e0c 100644 --- a/packages/server/destinations/gcp/CHANGELOG.md +++ b/packages/server/destinations/gcp/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/server-destination-gcp +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/server-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/server-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/destinations/gcp/package.json b/packages/server/destinations/gcp/package.json index 07c59bded..b5b552705 100644 --- a/packages/server/destinations/gcp/package.json +++ b/packages/server/destinations/gcp/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-destination-gcp", "description": "Google Cloud Platform server destination for walkerOS (BigQuery)", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "exports": { ".": { @@ -9,10 +9,10 @@ "import": "./dist/index.mjs", "require": "./dist/index.js" }, - "./schemas": { - "types": "./dist/schemas.d.ts", - "import": "./dist/schemas.mjs", - "require": "./dist/schemas.js" + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -28,7 +28,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^7.8.0", - "@walkeros/server-core": "0.3.1" + "@walkeros/server-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/server/destinations/gcp/src/bigquery/__tests__/index.test.ts b/packages/server/destinations/gcp/src/bigquery/__tests__/index.test.ts index fefc77f71..3b1da370d 100644 --- a/packages/server/destinations/gcp/src/bigquery/__tests__/index.test.ts +++ b/packages/server/destinations/gcp/src/bigquery/__tests__/index.test.ts @@ -1,7 +1,7 @@ import type { Collector } from '@walkeros/core'; import type { Config, Destination, Settings } from '../types'; import { clone, createEvent } from '@walkeros/core'; -import { examples } from '../'; +import * as examples from '../examples'; const { env } = examples; diff --git a/packages/server/destinations/gcp/src/bigquery/index.ts b/packages/server/destinations/gcp/src/bigquery/index.ts index 3944ef704..6496f8291 100644 --- a/packages/server/destinations/gcp/src/bigquery/index.ts +++ b/packages/server/destinations/gcp/src/bigquery/index.ts @@ -5,12 +5,6 @@ import { push } from './push'; // Types export * as DestinationBigQuery from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationBigQuery: Destination = { type: 'gcp-bigquery', diff --git a/packages/server/destinations/gcp/src/bigquery/push.ts b/packages/server/destinations/gcp/src/bigquery/push.ts index 6710b0b57..00e7515fd 100644 --- a/packages/server/destinations/gcp/src/bigquery/push.ts +++ b/packages/server/destinations/gcp/src/bigquery/push.ts @@ -4,10 +4,16 @@ import { isObject, isArray } from '@walkeros/core'; export const push: PushFn = async function ( event, - { config, mapping: _mapping, data, collector, env }, + { config, mapping: _mapping, data }, ) { const { client, datasetId, tableId } = config.settings!; + if (!client || !datasetId || !tableId) { + throw new Error( + 'Missing required BigQuery configuration. Ensure init() was called successfully.', + ); + } + let row: WalkerOS.AnyObject | undefined; if (isObject(data)) { diff --git a/packages/server/destinations/gcp/src/bigquery/schemas/index.ts b/packages/server/destinations/gcp/src/bigquery/schemas/index.ts index 89babc1ce..7a7c2aa47 100644 --- a/packages/server/destinations/gcp/src/bigquery/schemas/index.ts +++ b/packages/server/destinations/gcp/src/bigquery/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/server/destinations/gcp/src/bigquery/schemas/mapping.ts b/packages/server/destinations/gcp/src/bigquery/schemas/mapping.ts index 44e5aa804..c3a191dde 100644 --- a/packages/server/destinations/gcp/src/bigquery/schemas/mapping.ts +++ b/packages/server/destinations/gcp/src/bigquery/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * GCP BigQuery Mapping Schema diff --git a/packages/server/destinations/gcp/src/bigquery/schemas/settings.ts b/packages/server/destinations/gcp/src/bigquery/schemas/settings.ts index e5e6567db..cc20d8384 100644 --- a/packages/server/destinations/gcp/src/bigquery/schemas/settings.ts +++ b/packages/server/destinations/gcp/src/bigquery/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const SettingsSchema = z.object({ client: z diff --git a/packages/server/destinations/gcp/src/bigquery/types/index.ts b/packages/server/destinations/gcp/src/bigquery/types/index.ts index e5fb995b2..ef5d32bf1 100644 --- a/packages/server/destinations/gcp/src/bigquery/types/index.ts +++ b/packages/server/destinations/gcp/src/bigquery/types/index.ts @@ -14,13 +14,22 @@ export interface Settings { bigquery?: BigQueryOptions; } +export interface InitSettings { + projectId: string; + client?: BigQuery; + datasetId?: string; + tableId?: string; + location?: string; + bigquery?: BigQueryOptions; +} + export interface Mapping {} export interface Env extends DestinationServer.Env { BigQuery?: typeof BigQuery; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export interface Destination extends DestinationServer.Destination { init: DestinationServer.InitFn; diff --git a/packages/server/destinations/gcp/src/dev.ts b/packages/server/destinations/gcp/src/dev.ts new file mode 100644 index 000000000..197f1788e --- /dev/null +++ b/packages/server/destinations/gcp/src/dev.ts @@ -0,0 +1 @@ +export * as schemas from './schemas'; diff --git a/packages/server/destinations/gcp/src/index.ts b/packages/server/destinations/gcp/src/index.ts index 8894490da..4bc528f7e 100644 --- a/packages/server/destinations/gcp/src/index.ts +++ b/packages/server/destinations/gcp/src/index.ts @@ -1,4 +1,3 @@ // Google BigQuery export { destinationBigQuery } from './bigquery'; export * as DestinationBigQuery from './bigquery/types'; -export * as schemas from './bigquery/schemas'; diff --git a/packages/server/destinations/gcp/src/schemas.ts b/packages/server/destinations/gcp/src/schemas.ts index 3eda14215..d12d5f0e0 100644 --- a/packages/server/destinations/gcp/src/schemas.ts +++ b/packages/server/destinations/gcp/src/schemas.ts @@ -1,8 +1,3 @@ // Browser-safe schema-only exports // This file exports ONLY schemas without any Node.js dependencies -import { settings, mapping } from './bigquery/schemas'; - -export const schemas = { - settings, - mapping, -}; +export { settings, mapping } from './bigquery/schemas'; diff --git a/packages/server/destinations/gcp/tsup.config.ts b/packages/server/destinations/gcp/tsup.config.ts index 2ee236e92..efbebd245 100644 --- a/packages/server/destinations/gcp/tsup.config.ts +++ b/packages/server/destinations/gcp/tsup.config.ts @@ -13,4 +13,8 @@ export default defineConfig([ entry: ['src/schemas.ts'], terserOptions: {}, }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/server/destinations/meta/CHANGELOG.md b/packages/server/destinations/meta/CHANGELOG.md index d9112ebf6..240f5da99 100644 --- a/packages/server/destinations/meta/CHANGELOG.md +++ b/packages/server/destinations/meta/CHANGELOG.md @@ -1,5 +1,26 @@ # @walkeros/server-destination-meta +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/server-core@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/server-core@0.4.0 + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/destinations/meta/package.json b/packages/server/destinations/meta/package.json index feeacf052..dad1b7fe0 100644 --- a/packages/server/destinations/meta/package.json +++ b/packages/server/destinations/meta/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-destination-meta", "description": "Meta server destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "exports": { ".": { @@ -9,10 +9,10 @@ "import": "./dist/index.mjs", "require": "./dist/index.js" }, - "./schemas": { - "types": "./dist/browser-schemas.d.ts", - "import": "./dist/browser-schemas.mjs", - "require": "./dist/browser-schemas.js" + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" }, "./examples": { "types": "./dist/examples/index.d.ts", @@ -32,8 +32,8 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/server-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/server-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/server/destinations/meta/src/__tests__/index.test.ts b/packages/server/destinations/meta/src/__tests__/index.test.ts index a75db5271..f25535813 100644 --- a/packages/server/destinations/meta/src/__tests__/index.test.ts +++ b/packages/server/destinations/meta/src/__tests__/index.test.ts @@ -2,7 +2,7 @@ import type { WalkerOS, Collector } from '@walkeros/core'; import type { Config, Destination, Settings } from '../types'; import { clone, getEvent } from '@walkeros/core'; import { startFlow } from '@walkeros/collector'; -import { examples } from '../'; +import { examples } from '../dev'; import { hashEvent } from '../hash'; const { env, events, mapping } = examples; diff --git a/packages/server/destinations/meta/src/dev.ts b/packages/server/destinations/meta/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/server/destinations/meta/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/server/destinations/meta/src/index.ts b/packages/server/destinations/meta/src/index.ts index a61f9b965..a3e76b216 100644 --- a/packages/server/destinations/meta/src/index.ts +++ b/packages/server/destinations/meta/src/index.ts @@ -5,12 +5,6 @@ import { push } from './push'; // Types export * as DestinationMeta from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationMeta: Destination = { type: 'meta', diff --git a/packages/server/destinations/meta/src/schemas/index.ts b/packages/server/destinations/meta/src/schemas/index.ts index c850c1693..9dcaf388d 100644 --- a/packages/server/destinations/meta/src/schemas/index.ts +++ b/packages/server/destinations/meta/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/server/destinations/meta/src/schemas/mapping.ts b/packages/server/destinations/meta/src/schemas/mapping.ts index c8544644c..a5049a7ed 100644 --- a/packages/server/destinations/meta/src/schemas/mapping.ts +++ b/packages/server/destinations/meta/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Meta Conversions API Mapping Schema diff --git a/packages/server/destinations/meta/src/schemas/primitives.ts b/packages/server/destinations/meta/src/schemas/primitives.ts index 49fbafb9b..39b01e5ec 100644 --- a/packages/server/destinations/meta/src/schemas/primitives.ts +++ b/packages/server/destinations/meta/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Action Source Enum diff --git a/packages/server/destinations/meta/src/schemas/settings.ts b/packages/server/destinations/meta/src/schemas/settings.ts index 9f0b445c9..78ed2672e 100644 --- a/packages/server/destinations/meta/src/schemas/settings.ts +++ b/packages/server/destinations/meta/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { ActionSourceSchema } from './primitives'; export const SettingsSchema = z.object({ diff --git a/packages/server/destinations/meta/src/types/index.ts b/packages/server/destinations/meta/src/types/index.ts index 8b80e8313..263f9847c 100644 --- a/packages/server/destinations/meta/src/types/index.ts +++ b/packages/server/destinations/meta/src/types/index.ts @@ -14,13 +14,15 @@ export interface Settings { user_data?: WalkerOSMapping.Map; } +export type InitSettings = Partial; + export interface Mapping {} export interface Env extends DestinationServer.Env { sendServer?: typeof sendServer; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export interface Destination extends DestinationServer.Destination { init: DestinationServer.InitFn; diff --git a/packages/server/destinations/meta/tsup.config.ts b/packages/server/destinations/meta/tsup.config.ts index ffec7a8ad..5755b23c8 100644 --- a/packages/server/destinations/meta/tsup.config.ts +++ b/packages/server/destinations/meta/tsup.config.ts @@ -14,4 +14,9 @@ export default defineConfig([ terserOptions: {}, }), buildExamples(), + // Schemas build (separate entry for documentation/tooling) + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/server/sources/express/CHANGELOG.md b/packages/server/sources/express/CHANGELOG.md index a0a5d617f..74aa76412 100644 --- a/packages/server/sources/express/CHANGELOG.md +++ b/packages/server/sources/express/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/server-source-express +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/sources/express/package.json b/packages/server/sources/express/package.json index 303b98620..eda638435 100644 --- a/packages/server/sources/express/package.json +++ b/packages/server/sources/express/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-source-express", "description": "Express server source for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -48,5 +48,17 @@ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/elbwalker" } - ] + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" + } + } } diff --git a/packages/server/sources/express/src/dev.ts b/packages/server/sources/express/src/dev.ts new file mode 100644 index 000000000..197f1788e --- /dev/null +++ b/packages/server/sources/express/src/dev.ts @@ -0,0 +1 @@ +export * as schemas from './schemas'; diff --git a/packages/server/sources/express/src/index.ts b/packages/server/sources/express/src/index.ts index 2fbe860d7..058a46e91 100644 --- a/packages/server/sources/express/src/index.ts +++ b/packages/server/sources/express/src/index.ts @@ -174,6 +174,7 @@ export const sourceExpress = async ( // Export types (avoid re-exporting duplicates from schemas) export type { ExpressSource, + Config, PartialConfig, Types, EventRequest, @@ -183,6 +184,8 @@ export type { Push, Env, Mapping, + InitSettings, + Settings, } from './types'; // Export utils diff --git a/packages/server/sources/express/src/schemas/primitives.ts b/packages/server/sources/express/src/schemas/primitives.ts index 4b95bdc0c..34ae09605 100644 --- a/packages/server/sources/express/src/schemas/primitives.ts +++ b/packages/server/sources/express/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * HTTP methods enum diff --git a/packages/server/sources/express/src/schemas/settings.ts b/packages/server/sources/express/src/schemas/settings.ts index a207a868f..2fe9b2c53 100644 --- a/packages/server/sources/express/src/schemas/settings.ts +++ b/packages/server/sources/express/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { CorsOptionsSchema } from './primitives'; /** diff --git a/packages/server/sources/express/src/types.ts b/packages/server/sources/express/src/types.ts index 73454cc4f..8f2621230 100644 --- a/packages/server/sources/express/src/types.ts +++ b/packages/server/sources/express/src/types.ts @@ -1,12 +1,15 @@ import type { WalkerOS, Source as CoreSource } from '@walkeros/core'; import type { Request, Response, Application } from 'express'; import type { SettingsSchema, CorsOptionsSchema } from './schemas'; -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; // Types inferred from Zod schemas export type Settings = z.infer; export type CorsOptions = z.infer; +// InitSettings: user input (all optional) +export type InitSettings = Partial; + export interface Mapping { // Custom source event mapping properties } @@ -20,7 +23,17 @@ export interface Env extends CoreSource.Env { } // Type bundle (must be after Settings, Mapping, Push, Env are defined) -export type Types = CoreSource.Types; +export type Types = CoreSource.Types< + Settings, + Mapping, + Push, + Env, + InitSettings +>; + +// Convenience type exports +export type Config = CoreSource.Config; +export type PartialConfig = CoreSource.PartialConfig; export interface ExpressSource extends Omit, 'push'> { @@ -29,8 +42,6 @@ export interface ExpressSource server?: ReturnType; // HTTP server (if port configured) } -export type PartialConfig = CoreSource.PartialConfig; - // Event request/response types export interface EventRequest { event: string; diff --git a/packages/server/sources/express/tsup.config.ts b/packages/server/sources/express/tsup.config.ts index f781dc6ca..b470e47f9 100644 --- a/packages/server/sources/express/tsup.config.ts +++ b/packages/server/sources/express/tsup.config.ts @@ -4,4 +4,9 @@ export default defineConfig([ buildModules({ terserOptions: {}, // Don't mangle here }), + // Schemas build (separate entry for documentation/tooling) + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/server/sources/gcp/CHANGELOG.md b/packages/server/sources/gcp/CHANGELOG.md index e6df7e87c..abd088af4 100644 --- a/packages/server/sources/gcp/CHANGELOG.md +++ b/packages/server/sources/gcp/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/server-source-gcp +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/server/sources/gcp/package.json b/packages/server/sources/gcp/package.json index 44c8a7980..3d2527bb8 100644 --- a/packages/server/sources/gcp/package.json +++ b/packages/server/sources/gcp/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/server-source-gcp", "description": "Google Cloud Platform server sources for walkerOS (Cloud Functions)", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -18,7 +18,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "peerDependencies": { "@google-cloud/functions-framework": "^3.0.0" diff --git a/packages/server/sources/gcp/src/cloudfunction/schemas/index.ts b/packages/server/sources/gcp/src/cloudfunction/schemas/index.ts index c8da0e169..838c4c8cb 100644 --- a/packages/server/sources/gcp/src/cloudfunction/schemas/index.ts +++ b/packages/server/sources/gcp/src/cloudfunction/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; // Export primitives diff --git a/packages/server/sources/gcp/src/cloudfunction/schemas/primitives.ts b/packages/server/sources/gcp/src/cloudfunction/schemas/primitives.ts index 4b95bdc0c..34ae09605 100644 --- a/packages/server/sources/gcp/src/cloudfunction/schemas/primitives.ts +++ b/packages/server/sources/gcp/src/cloudfunction/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * HTTP methods enum diff --git a/packages/server/sources/gcp/src/cloudfunction/schemas/settings.ts b/packages/server/sources/gcp/src/cloudfunction/schemas/settings.ts index e4047a5b0..e074f485f 100644 --- a/packages/server/sources/gcp/src/cloudfunction/schemas/settings.ts +++ b/packages/server/sources/gcp/src/cloudfunction/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { CorsOptionsSchema } from './primitives'; /** diff --git a/packages/server/sources/gcp/src/cloudfunction/types.ts b/packages/server/sources/gcp/src/cloudfunction/types.ts index 41cad9d4a..cd7accfc6 100644 --- a/packages/server/sources/gcp/src/cloudfunction/types.ts +++ b/packages/server/sources/gcp/src/cloudfunction/types.ts @@ -1,6 +1,6 @@ import type { WalkerOS, Source as CoreSource } from '@walkeros/core'; import type { SettingsSchema, CorsOptionsSchema } from './schemas'; -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; // Minimal request/response interfaces export interface Request { @@ -21,6 +21,9 @@ export interface Response { export type Settings = z.infer; export type CorsOptions = z.infer; +// InitSettings: user input (all optional) +export type InitSettings = Partial; + export interface Mapping { // Custom source event mapping properties } @@ -34,14 +37,21 @@ export interface Env extends CoreSource.Env { } // Type bundle (must be after Settings, Mapping, Push, Env are defined) -export type Types = CoreSource.Types; +export type Types = CoreSource.Types< + Settings, + Mapping, + Push, + Env, + InitSettings +>; export interface CloudFunctionSource extends Omit, 'push'> { push: Push; } -// Removed custom Config type - using Source.Config directly +// Convenience Config type +export type Config = CoreSource.Config; export type PartialConfig = CoreSource.PartialConfig; // Cloud function source doesn't follow standard Source.Init pattern due to HTTP handler interface diff --git a/packages/server/sources/gcp/src/dev.ts b/packages/server/sources/gcp/src/dev.ts new file mode 100644 index 000000000..637e7ac23 --- /dev/null +++ b/packages/server/sources/gcp/src/dev.ts @@ -0,0 +1 @@ +export { schemas, examples } from './cloudfunction'; diff --git a/packages/web/core/CHANGELOG.md b/packages/web/core/CHANGELOG.md index dbb73c690..17ff9a2f0 100644 --- a/packages/web/core/CHANGELOG.md +++ b/packages/web/core/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/web-core +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/core/package.json b/packages/web/core/package.json index eb83a16a9..68ade2f48 100644 --- a/packages/web/core/package.json +++ b/packages/web/core/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-core", "description": "Web-specific utilities for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -25,7 +25,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1" + "@walkeros/core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/packages/web/destinations/api/CHANGELOG.md b/packages/web/destinations/api/CHANGELOG.md index b713ddbae..368415217 100644 --- a/packages/web/destinations/api/CHANGELOG.md +++ b/packages/web/destinations/api/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/web-destination-api +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/destinations/api/package.json b/packages/web/destinations/api/package.json index 047f36df9..5e3bf33fe 100644 --- a/packages/web/destinations/api/package.json +++ b/packages/web/destinations/api/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-destination-api", "description": "Web API destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,7 +35,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/web/destinations/api/src/dev.ts b/packages/web/destinations/api/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/web/destinations/api/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/web/destinations/api/src/index.test.ts b/packages/web/destinations/api/src/index.test.ts index 083eae4ce..7427ef49d 100644 --- a/packages/web/destinations/api/src/index.test.ts +++ b/packages/web/destinations/api/src/index.test.ts @@ -2,7 +2,7 @@ import type { WalkerOS, Collector } from '@walkeros/core'; import type { DestinationAPI } from '.'; import { startFlow } from '@walkeros/collector'; import { createEvent, clone } from '@walkeros/core'; -import { examples } from '.'; +import { examples } from './dev'; describe('Destination API', () => { const mockSendWeb = jest.fn(); //.mockImplementation(console.log); diff --git a/packages/web/destinations/api/src/index.ts b/packages/web/destinations/api/src/index.ts index 72ad36b7c..d25eca1f9 100644 --- a/packages/web/destinations/api/src/index.ts +++ b/packages/web/destinations/api/src/index.ts @@ -5,12 +5,6 @@ import { getEnv, sendWeb } from '@walkeros/web-core'; // Types export * as DestinationAPI from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationAPI: Destination = { type: 'api', diff --git a/packages/web/destinations/api/src/schemas/index.ts b/packages/web/destinations/api/src/schemas/index.ts index 89babc1ce..7a7c2aa47 100644 --- a/packages/web/destinations/api/src/schemas/index.ts +++ b/packages/web/destinations/api/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/web/destinations/api/src/schemas/mapping.ts b/packages/web/destinations/api/src/schemas/mapping.ts index 877b291ad..af7356f87 100644 --- a/packages/web/destinations/api/src/schemas/mapping.ts +++ b/packages/web/destinations/api/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const MappingSchema = z.object({}); diff --git a/packages/web/destinations/api/src/schemas/settings.ts b/packages/web/destinations/api/src/schemas/settings.ts index 353f97bd5..88b29e9d7 100644 --- a/packages/web/destinations/api/src/schemas/settings.ts +++ b/packages/web/destinations/api/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const SettingsSchema = z.object({ url: z diff --git a/packages/web/destinations/api/src/types/index.ts b/packages/web/destinations/api/src/types/index.ts index b317421c4..1dcb205ce 100644 --- a/packages/web/destinations/api/src/types/index.ts +++ b/packages/web/destinations/api/src/types/index.ts @@ -15,13 +15,16 @@ export interface Settings { transport?: SendWebTransport; } +// InitSettings: user input (all optional) +export type InitSettings = Partial; + export interface Mapping {} export interface Env extends DestinationWeb.Env { sendWeb?: typeof sendWeb; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export type Destination = DestinationWeb.Destination; export type Config = DestinationWeb.Config; diff --git a/packages/web/destinations/api/tsup.config.ts b/packages/web/destinations/api/tsup.config.ts index 67524451e..aa042092e 100644 --- a/packages/web/destinations/api/tsup.config.ts +++ b/packages/web/destinations/api/tsup.config.ts @@ -14,4 +14,8 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/destinations/gtag/CHANGELOG.md b/packages/web/destinations/gtag/CHANGELOG.md index 1f139e087..fa73f4cf9 100644 --- a/packages/web/destinations/gtag/CHANGELOG.md +++ b/packages/web/destinations/gtag/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/web-destination-gtag +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/destinations/gtag/package.json b/packages/web/destinations/gtag/package.json index 0b6e7c2ac..403b16f9f 100644 --- a/packages/web/destinations/gtag/package.json +++ b/packages/web/destinations/gtag/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-destination-gtag", "description": "Unified Google destination for walkerOS (GA4, Ads, GTM)", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,7 +35,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/packages/web/destinations/gtag/src/__tests__/ads.test.ts b/packages/web/destinations/gtag/src/__tests__/ads.test.ts index c2735186e..6dee13a02 100644 --- a/packages/web/destinations/gtag/src/__tests__/ads.test.ts +++ b/packages/web/destinations/gtag/src/__tests__/ads.test.ts @@ -1,5 +1,5 @@ import { initAds, pushAdsEvent } from '../ads'; -import { examples } from '../index'; +import { examples } from '../dev'; import { clone } from '@walkeros/core'; import type { AdsSettings, AdsMapping } from '../types'; diff --git a/packages/web/destinations/gtag/src/__tests__/ga4.test.ts b/packages/web/destinations/gtag/src/__tests__/ga4.test.ts index f95acf762..80581df80 100644 --- a/packages/web/destinations/gtag/src/__tests__/ga4.test.ts +++ b/packages/web/destinations/gtag/src/__tests__/ga4.test.ts @@ -1,5 +1,5 @@ import { initGA4, pushGA4Event } from '../ga4'; -import { examples } from '../index'; +import { examples } from '../dev'; import { clone } from '@walkeros/core'; import type { GA4Settings } from '../types'; diff --git a/packages/web/destinations/gtag/src/__tests__/gtm.test.ts b/packages/web/destinations/gtag/src/__tests__/gtm.test.ts index 68ec97213..83e8ee2b2 100644 --- a/packages/web/destinations/gtag/src/__tests__/gtm.test.ts +++ b/packages/web/destinations/gtag/src/__tests__/gtm.test.ts @@ -1,5 +1,5 @@ import { initGTM, pushGTMEvent } from '../gtm'; -import { examples } from '../index'; +import { examples } from '../dev'; import { clone } from '@walkeros/core'; import type { GTMSettings } from '../types'; import { DestinationWeb } from '@walkeros/web-core'; diff --git a/packages/web/destinations/gtag/src/__tests__/index.test.ts b/packages/web/destinations/gtag/src/__tests__/index.test.ts index 3317bbe7c..ef3733f32 100644 --- a/packages/web/destinations/gtag/src/__tests__/index.test.ts +++ b/packages/web/destinations/gtag/src/__tests__/index.test.ts @@ -1,4 +1,5 @@ -import { destinationGtag, examples, resetConsentState } from '../index'; +import { destinationGtag, resetConsentState } from '../index'; +import { examples } from '../dev'; import type { Settings, Rule, Include } from '../types'; import { type WalkerOS, type Collector } from '@walkeros/core'; import { clone } from '@walkeros/core'; diff --git a/packages/web/destinations/gtag/src/dev.ts b/packages/web/destinations/gtag/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/web/destinations/gtag/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/web/destinations/gtag/src/index.ts b/packages/web/destinations/gtag/src/index.ts index db22bc600..ef24d9748 100644 --- a/packages/web/destinations/gtag/src/index.ts +++ b/packages/web/destinations/gtag/src/index.ts @@ -10,12 +10,6 @@ import { getEnv } from '@walkeros/web-core'; // Types export * as DestinationGtag from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - // Track whether default consent has been set let defaultConsentSet = false; diff --git a/packages/web/destinations/gtag/src/schemas/index.ts b/packages/web/destinations/gtag/src/schemas/index.ts index 7a612514d..c88e6d206 100644 --- a/packages/web/destinations/gtag/src/schemas/index.ts +++ b/packages/web/destinations/gtag/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; import { diff --git a/packages/web/destinations/gtag/src/schemas/mapping.ts b/packages/web/destinations/gtag/src/schemas/mapping.ts index 79310e4e3..7339c443b 100644 --- a/packages/web/destinations/gtag/src/schemas/mapping.ts +++ b/packages/web/destinations/gtag/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { IncludeSchema } from './primitives'; /** diff --git a/packages/web/destinations/gtag/src/schemas/primitives.ts b/packages/web/destinations/gtag/src/schemas/primitives.ts index 47c351c48..bb646cafd 100644 --- a/packages/web/destinations/gtag/src/schemas/primitives.ts +++ b/packages/web/destinations/gtag/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Include configuration for GA4 diff --git a/packages/web/destinations/gtag/src/schemas/settings.ts b/packages/web/destinations/gtag/src/schemas/settings.ts index dc031a8a3..0df0fbff1 100644 --- a/packages/web/destinations/gtag/src/schemas/settings.ts +++ b/packages/web/destinations/gtag/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { ConsentModeSchema, GA4SettingsSchema, diff --git a/packages/web/destinations/gtag/src/types/index.ts b/packages/web/destinations/gtag/src/types/index.ts index dfa56ea68..cf2fc7245 100644 --- a/packages/web/destinations/gtag/src/types/index.ts +++ b/packages/web/destinations/gtag/src/types/index.ts @@ -48,7 +48,7 @@ export interface ConsentMapping { } // Type bundle -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export type Destination = DestinationWeb.Destination; export type Config = DestinationWeb.Config; @@ -70,6 +70,9 @@ export interface Settings { gtm?: GTMSettings; } +// InitSettings: user input (all optional) +export type InitSettings = Partial; + // GA4-specific settings export interface GA4Settings extends BaseSettings { measurementId: string; diff --git a/packages/web/destinations/gtag/tsup.config.ts b/packages/web/destinations/gtag/tsup.config.ts index 30d0ab65b..15be0b18e 100644 --- a/packages/web/destinations/gtag/tsup.config.ts +++ b/packages/web/destinations/gtag/tsup.config.ts @@ -13,4 +13,8 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/destinations/meta/CHANGELOG.md b/packages/web/destinations/meta/CHANGELOG.md index 519de8409..fe22488b8 100644 --- a/packages/web/destinations/meta/CHANGELOG.md +++ b/packages/web/destinations/meta/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/web-destination-meta +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/destinations/meta/package.json b/packages/web/destinations/meta/package.json index 7076240ad..9db936dc4 100644 --- a/packages/web/destinations/meta/package.json +++ b/packages/web/destinations/meta/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-destination-meta", "description": "Meta pixel web destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,7 +35,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": { "@types/facebook-pixel": "^0.0.31" diff --git a/packages/web/destinations/meta/src/dev.ts b/packages/web/destinations/meta/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/web/destinations/meta/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/web/destinations/meta/src/index.test.ts b/packages/web/destinations/meta/src/index.test.ts index 68dddd098..be4e57738 100644 --- a/packages/web/destinations/meta/src/index.test.ts +++ b/packages/web/destinations/meta/src/index.test.ts @@ -2,7 +2,7 @@ import type { WalkerOS } from '@walkeros/core'; import type { DestinationMeta } from '.'; import { startFlow } from '@walkeros/collector'; import { getEvent, clone } from '@walkeros/core'; -import { examples } from '.'; +import { examples } from './dev'; const { events, mapping } = examples; diff --git a/packages/web/destinations/meta/src/index.ts b/packages/web/destinations/meta/src/index.ts index b2049adf0..1c080ea10 100644 --- a/packages/web/destinations/meta/src/index.ts +++ b/packages/web/destinations/meta/src/index.ts @@ -6,12 +6,6 @@ import { getEnv } from '@walkeros/web-core'; // Types export * as DestinationMeta from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationMeta: Destination = { type: 'meta-pixel', diff --git a/packages/web/destinations/meta/src/schemas/index.ts b/packages/web/destinations/meta/src/schemas/index.ts index c850c1693..9dcaf388d 100644 --- a/packages/web/destinations/meta/src/schemas/index.ts +++ b/packages/web/destinations/meta/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/web/destinations/meta/src/schemas/mapping.ts b/packages/web/destinations/meta/src/schemas/mapping.ts index 1603283e0..10c745501 100644 --- a/packages/web/destinations/meta/src/schemas/mapping.ts +++ b/packages/web/destinations/meta/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { StandardEventName, CustomEventName } from './primitives'; export const MappingSchema = z.object({ diff --git a/packages/web/destinations/meta/src/schemas/primitives.ts b/packages/web/destinations/meta/src/schemas/primitives.ts index fc0b4af8f..4c9286d04 100644 --- a/packages/web/destinations/meta/src/schemas/primitives.ts +++ b/packages/web/destinations/meta/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Meta Pixel ID diff --git a/packages/web/destinations/meta/src/schemas/settings.ts b/packages/web/destinations/meta/src/schemas/settings.ts index 1217198f0..63b3c84f3 100644 --- a/packages/web/destinations/meta/src/schemas/settings.ts +++ b/packages/web/destinations/meta/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { PixelId } from './primitives'; export const SettingsSchema = z.object({ diff --git a/packages/web/destinations/meta/src/types/index.ts b/packages/web/destinations/meta/src/types/index.ts index c587acfca..5d14f0aac 100644 --- a/packages/web/destinations/meta/src/types/index.ts +++ b/packages/web/destinations/meta/src/types/index.ts @@ -15,6 +15,8 @@ export interface Settings { pixelId: string; } +export type InitSettings = Partial; + export interface Mapping { track?: StandardEventNames; trackCustom?: string; @@ -31,7 +33,7 @@ export interface Env extends DestinationWeb.Env { }; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export type Destination = DestinationWeb.Destination; export type Config = DestinationWeb.Config; diff --git a/packages/web/destinations/meta/tsup.config.ts b/packages/web/destinations/meta/tsup.config.ts index 30d0ab65b..15be0b18e 100644 --- a/packages/web/destinations/meta/tsup.config.ts +++ b/packages/web/destinations/meta/tsup.config.ts @@ -13,4 +13,8 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/destinations/piwikpro/CHANGELOG.md b/packages/web/destinations/piwikpro/CHANGELOG.md index d1a5d6026..21cf2c33b 100644 --- a/packages/web/destinations/piwikpro/CHANGELOG.md +++ b/packages/web/destinations/piwikpro/CHANGELOG.md @@ -1,5 +1,26 @@ # @walkeros/web-destination-piwikpro +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-core@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-core@0.4.0 + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/destinations/piwikpro/package.json b/packages/web/destinations/piwikpro/package.json index a89993d04..7b3bd4830 100644 --- a/packages/web/destinations/piwikpro/package.json +++ b/packages/web/destinations/piwikpro/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-destination-piwikpro", "description": "Piwik PRO destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,8 +35,8 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/web-core": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/web-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/web/destinations/piwikpro/src/dev.ts b/packages/web/destinations/piwikpro/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/web/destinations/piwikpro/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/web/destinations/piwikpro/src/index.test.ts b/packages/web/destinations/piwikpro/src/index.test.ts index b19af4999..9fd582fe8 100644 --- a/packages/web/destinations/piwikpro/src/index.test.ts +++ b/packages/web/destinations/piwikpro/src/index.test.ts @@ -2,7 +2,7 @@ import type { WalkerOS } from '@walkeros/core'; import type { DestinationPiwikPro } from '.'; import { startFlow } from '@walkeros/collector'; import { getEvent } from '@walkeros/core'; -import { examples } from '.'; +import { examples } from './dev'; const { events, mapping } = examples; diff --git a/packages/web/destinations/piwikpro/src/index.ts b/packages/web/destinations/piwikpro/src/index.ts index 73ae618db..0543ce66d 100644 --- a/packages/web/destinations/piwikpro/src/index.ts +++ b/packages/web/destinations/piwikpro/src/index.ts @@ -6,12 +6,6 @@ import { getEnv } from '@walkeros/web-core'; // Types export * as DestinationPiwikPro from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationPiwikPro: Destination = { type: 'piwikpro', diff --git a/packages/web/destinations/piwikpro/src/schemas/index.ts b/packages/web/destinations/piwikpro/src/schemas/index.ts index 89babc1ce..7a7c2aa47 100644 --- a/packages/web/destinations/piwikpro/src/schemas/index.ts +++ b/packages/web/destinations/piwikpro/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/web/destinations/piwikpro/src/schemas/mapping.ts b/packages/web/destinations/piwikpro/src/schemas/mapping.ts index f70cd1e0f..c233204ed 100644 --- a/packages/web/destinations/piwikpro/src/schemas/mapping.ts +++ b/packages/web/destinations/piwikpro/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const MappingSchema = z.object({ goalId: z.string().describe('ID to count the event as a goal (like 1)'), diff --git a/packages/web/destinations/piwikpro/src/schemas/settings.ts b/packages/web/destinations/piwikpro/src/schemas/settings.ts index 72aa8ee29..c00461977 100644 --- a/packages/web/destinations/piwikpro/src/schemas/settings.ts +++ b/packages/web/destinations/piwikpro/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; export const SettingsSchema = z.object({ appId: z diff --git a/packages/web/destinations/piwikpro/src/types/index.ts b/packages/web/destinations/piwikpro/src/types/index.ts index 7b441a72f..ea34e9d25 100644 --- a/packages/web/destinations/piwikpro/src/types/index.ts +++ b/packages/web/destinations/piwikpro/src/types/index.ts @@ -16,6 +16,8 @@ export interface Settings { url: string; } +export type InitSettings = Partial; + export interface Mapping { goalId?: string; goalValue?: string; @@ -38,7 +40,7 @@ export interface Env extends DestinationWeb.Env { }; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export type Destination = DestinationWeb.Destination; export type Config = DestinationWeb.Config; diff --git a/packages/web/destinations/piwikpro/tsup.config.ts b/packages/web/destinations/piwikpro/tsup.config.ts index 30d0ab65b..15be0b18e 100644 --- a/packages/web/destinations/piwikpro/tsup.config.ts +++ b/packages/web/destinations/piwikpro/tsup.config.ts @@ -13,4 +13,8 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/destinations/plausible/CHANGELOG.md b/packages/web/destinations/plausible/CHANGELOG.md index 4864f5b3a..c9f04fe10 100644 --- a/packages/web/destinations/plausible/CHANGELOG.md +++ b/packages/web/destinations/plausible/CHANGELOG.md @@ -1,5 +1,24 @@ # @walkeros/web-destination-plausible +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/destinations/plausible/package.json b/packages/web/destinations/plausible/package.json index 430d5a7ed..89993b688 100644 --- a/packages/web/destinations/plausible/package.json +++ b/packages/web/destinations/plausible/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-destination-plausible", "description": "Plausible web destination for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,7 +35,7 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/web-core": "0.3.1" + "@walkeros/web-core": "0.4.1" }, "devDependencies": {}, "repository": { diff --git a/packages/web/destinations/plausible/src/dev.ts b/packages/web/destinations/plausible/src/dev.ts new file mode 100644 index 000000000..706f4127d --- /dev/null +++ b/packages/web/destinations/plausible/src/dev.ts @@ -0,0 +1,2 @@ +export * as schemas from './schemas'; +export * as examples from './examples'; diff --git a/packages/web/destinations/plausible/src/index.test.ts b/packages/web/destinations/plausible/src/index.test.ts index dc4d2e848..d57a77edd 100644 --- a/packages/web/destinations/plausible/src/index.test.ts +++ b/packages/web/destinations/plausible/src/index.test.ts @@ -3,7 +3,7 @@ import type { DestinationPlausible } from '.'; import type { DestinationWeb } from '@walkeros/web-core'; import { startFlow } from '@walkeros/collector'; import { getEvent, mockEnv } from '@walkeros/core'; -import { examples } from '.'; +import { examples } from './dev'; const { events, mapping } = examples; diff --git a/packages/web/destinations/plausible/src/index.ts b/packages/web/destinations/plausible/src/index.ts index 098b6ef8b..8989bfe77 100644 --- a/packages/web/destinations/plausible/src/index.ts +++ b/packages/web/destinations/plausible/src/index.ts @@ -6,12 +6,6 @@ import { getEnv } from '@walkeros/web-core'; // Types export * as DestinationPlausible from './types'; -// Examples -export * as examples from './examples'; - -// Schemas -export * as schemas from './schemas'; - export const destinationPlausible: Destination = { type: 'plausible', diff --git a/packages/web/destinations/plausible/src/schemas/index.ts b/packages/web/destinations/plausible/src/schemas/index.ts index 89babc1ce..7a7c2aa47 100644 --- a/packages/web/destinations/plausible/src/schemas/index.ts +++ b/packages/web/destinations/plausible/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { MappingSchema } from './mapping'; diff --git a/packages/web/destinations/plausible/src/schemas/mapping.ts b/packages/web/destinations/plausible/src/schemas/mapping.ts index b00dba24c..69b9b11a6 100644 --- a/packages/web/destinations/plausible/src/schemas/mapping.ts +++ b/packages/web/destinations/plausible/src/schemas/mapping.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Plausible Mapping Schema diff --git a/packages/web/destinations/plausible/src/schemas/settings.ts b/packages/web/destinations/plausible/src/schemas/settings.ts index 852af8902..fbb45147b 100644 --- a/packages/web/destinations/plausible/src/schemas/settings.ts +++ b/packages/web/destinations/plausible/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; const hostnameRegex = /^(?=.{1,253}$)(?!-)[A-Za-z0-9-]{1,63}(?; + export interface Mapping {} export interface Env extends DestinationWeb.Env { @@ -28,7 +30,7 @@ export interface Env extends DestinationWeb.Env { }; } -export type Types = CoreDestination.Types; +export type Types = CoreDestination.Types; export type Destination = DestinationWeb.Destination; export type Config = DestinationWeb.Config; diff --git a/packages/web/destinations/plausible/tsup.config.ts b/packages/web/destinations/plausible/tsup.config.ts index 30d0ab65b..15be0b18e 100644 --- a/packages/web/destinations/plausible/tsup.config.ts +++ b/packages/web/destinations/plausible/tsup.config.ts @@ -13,4 +13,8 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/sources/browser/CHANGELOG.md b/packages/web/sources/browser/CHANGELOG.md index f40c02122..0888250fe 100644 --- a/packages/web/sources/browser/CHANGELOG.md +++ b/packages/web/sources/browser/CHANGELOG.md @@ -1,5 +1,36 @@ # @walkeros/web-source-browser +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/collector@0.4.1 + - @walkeros/web-core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/collector@0.4.0 + - @walkeros/web-core@0.4.0 + +## 0.3.2 + +### Patch Changes + +- Fix browser source initialization failure when session tracking is enabled. + The browser source was creating an incomplete collector interface missing the + `command` function, causing session initialization to fail with "command is + not a function" error. The fix ensures the `command` function from the + environment is properly passed through to session initialization. + ## 0.3.1 ### Patch Changes diff --git a/packages/web/sources/browser/package.json b/packages/web/sources/browser/package.json index 591091ed0..0b531da93 100644 --- a/packages/web/sources/browser/package.json +++ b/packages/web/sources/browser/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-source-browser", "description": "Browser DOM source for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -11,6 +11,11 @@ "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -25,8 +30,8 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/collector": "0.3.1", - "@walkeros/web-core": "0.3.1" + "@walkeros/collector": "0.4.1", + "@walkeros/web-core": "0.4.1" }, "repository": { "url": "git+https://github.com/elbwalker/walkerOS.git", diff --git a/packages/web/sources/browser/src/dev.ts b/packages/web/sources/browser/src/dev.ts new file mode 100644 index 000000000..197f1788e --- /dev/null +++ b/packages/web/sources/browser/src/dev.ts @@ -0,0 +1 @@ +export * as schemas from './schemas'; diff --git a/packages/web/sources/browser/src/index.ts b/packages/web/sources/browser/src/index.ts index 241903465..c0c95e6cb 100644 --- a/packages/web/sources/browser/src/index.ts +++ b/packages/web/sources/browser/src/index.ts @@ -20,9 +20,6 @@ export * as SourceBrowser from './types'; // Export examples export * as examples from './examples'; -// Export schemas -export * as schemas from './schemas'; - // Export walker utility functions export { getAllEvents, @@ -46,7 +43,7 @@ export const sourceBrowser: Source.Init = async ( config: Partial>, env: Env, ) => { - const { elb, window, document } = env; + const { elb, command, window, document } = env; const userSettings = config?.settings || {}; const actualWindow = @@ -89,7 +86,7 @@ export const sourceBrowser: Source.Init = async ( if (settings.session && elb) { const sessionConfig = typeof settings.session === 'boolean' ? {} : settings.session; - sessionStart(elb, sessionConfig); + sessionStart(elb, sessionConfig, command); } // Setup global triggers (click, submit) when DOM is ready @@ -146,7 +143,7 @@ export const sourceBrowser: Source.Init = async ( if (settings.session && context && elb) { const sessionConfig = typeof settings.session === 'boolean' ? {} : settings.session; - sessionStart(elb, sessionConfig); + sessionStart(elb, sessionConfig, command); } break; diff --git a/packages/web/sources/browser/src/schemas/index.ts b/packages/web/sources/browser/src/schemas/index.ts index 7cf93f4e0..49b04c9b3 100644 --- a/packages/web/sources/browser/src/schemas/index.ts +++ b/packages/web/sources/browser/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; import { TaggerSchema } from './tagger'; diff --git a/packages/web/sources/browser/src/schemas/primitives.ts b/packages/web/sources/browser/src/schemas/primitives.ts index 7abe3783c..d8003aa2e 100644 --- a/packages/web/sources/browser/src/schemas/primitives.ts +++ b/packages/web/sources/browser/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * Data attribute prefix diff --git a/packages/web/sources/browser/src/schemas/settings.ts b/packages/web/sources/browser/src/schemas/settings.ts index d12f4a831..87371d314 100644 --- a/packages/web/sources/browser/src/schemas/settings.ts +++ b/packages/web/sources/browser/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { DataAttributePrefix, JavaScriptVarName, diff --git a/packages/web/sources/browser/src/schemas/tagger.ts b/packages/web/sources/browser/src/schemas/tagger.ts index 0fbd78069..c203cce4e 100644 --- a/packages/web/sources/browser/src/schemas/tagger.ts +++ b/packages/web/sources/browser/src/schemas/tagger.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { DataAttributePrefix } from './primitives'; /** diff --git a/packages/web/sources/browser/src/session.ts b/packages/web/sources/browser/src/session.ts index 3186804d0..9b5b2a93e 100644 --- a/packages/web/sources/browser/src/session.ts +++ b/packages/web/sources/browser/src/session.ts @@ -4,26 +4,32 @@ import { SessionConfig, } from '@walkeros/web-core'; -export function createSessionStart(elb: Elb.Fn) { +export function createSessionStart(elb: Elb.Fn, command?: Collector.CommandFn) { return function ( options: { config?: SessionConfig; data?: Collector.SessionData } = {}, ): void | Collector.SessionData { const { config = {} } = options; - return sessionStart(elb, { - ...config, - pulse: config.pulse !== undefined ? config.pulse : true, - }); + return sessionStart( + elb, + { + ...config, + pulse: config.pulse !== undefined ? config.pulse : true, + }, + command, + ); }; } export function sessionStart( elb: Elb.Fn, config: SessionConfig = {}, + command?: Collector.CommandFn, ): void | Collector.SessionData { // Create minimal collector interface for sessionStart that needs elb and group tracking const collectorInterface: Partial = { push: elb, group: undefined, // Session tracking doesn't need group initially + command, // Include command for session to call walker command }; return sessionStartOrg({ diff --git a/packages/web/sources/browser/src/types/index.ts b/packages/web/sources/browser/src/types/index.ts index db9ab7559..add0b4b13 100644 --- a/packages/web/sources/browser/src/types/index.ts +++ b/packages/web/sources/browser/src/types/index.ts @@ -1,7 +1,7 @@ import type { Source, Elb, Collector } from '@walkeros/core'; import type { SessionConfig, SessionCallback } from '@walkeros/web-core'; import type { SettingsSchema } from '../schemas'; -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; // Export browser-specific elb types export * from './elb'; @@ -38,7 +38,9 @@ export interface Env extends Source.BaseEnv { document?: Document; } -export type Types = Source.Types; +export type Types = Source.Types; + +export type Config = Source.Config; export interface Context { elb: Elb.Fn; diff --git a/packages/web/sources/browser/tsup.config.ts b/packages/web/sources/browser/tsup.config.ts index a95bf0a46..df01ba631 100644 --- a/packages/web/sources/browser/tsup.config.ts +++ b/packages/web/sources/browser/tsup.config.ts @@ -11,4 +11,9 @@ export default defineConfig([ buildModules(), buildBrowser({ globalName }), buildES5({ globalName }), + // Schemas build (separate entry for documentation/tooling) + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/packages/web/sources/dataLayer/CHANGELOG.md b/packages/web/sources/dataLayer/CHANGELOG.md index 3cac795e2..c78045bc9 100644 --- a/packages/web/sources/dataLayer/CHANGELOG.md +++ b/packages/web/sources/dataLayer/CHANGELOG.md @@ -1,5 +1,26 @@ # @walkeros/web-source-datalayer +## 0.4.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/collector@0.4.1 + - @walkeros/core@0.4.1 + +## 0.4.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/collector@0.4.0 + - @walkeros/core@0.4.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/web/sources/dataLayer/package.json b/packages/web/sources/dataLayer/package.json index aacfbd9f8..91ed6ed3c 100644 --- a/packages/web/sources/dataLayer/package.json +++ b/packages/web/sources/dataLayer/package.json @@ -1,7 +1,7 @@ { "name": "@walkeros/web-source-datalayer", "description": "DataLayer source for walkerOS", - "version": "0.3.1", + "version": "0.4.1", "license": "MIT", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -16,6 +16,11 @@ "types": "./dist/examples/index.d.ts", "import": "./dist/examples/index.mjs", "require": "./dist/examples/index.js" + }, + "./dev": { + "types": "./dist/dev.d.ts", + "import": "./dist/dev.mjs", + "require": "./dist/dev.js" } }, "files": [ @@ -30,8 +35,8 @@ "update": "npx npm-check-updates -u && npm update" }, "dependencies": { - "@walkeros/core": "0.3.1", - "@walkeros/collector": "0.3.1" + "@walkeros/core": "0.4.1", + "@walkeros/collector": "0.4.1" }, "devDependencies": { "@types/gtag.js": "^0.0.20" diff --git a/packages/web/sources/dataLayer/src/dev.ts b/packages/web/sources/dataLayer/src/dev.ts new file mode 100644 index 000000000..197f1788e --- /dev/null +++ b/packages/web/sources/dataLayer/src/dev.ts @@ -0,0 +1 @@ +export * as schemas from './schemas'; diff --git a/packages/web/sources/dataLayer/src/index.ts b/packages/web/sources/dataLayer/src/index.ts index f7004dbed..d387b7372 100644 --- a/packages/web/sources/dataLayer/src/index.ts +++ b/packages/web/sources/dataLayer/src/index.ts @@ -5,9 +5,6 @@ import { interceptDataLayer, processExistingEvents } from './interceptor'; // Export types for external usage export * as SourceDataLayer from './types'; -// Export schemas -export * as schemas from './schemas'; - // Export examples export * from './examples'; diff --git a/packages/web/sources/dataLayer/src/schemas/index.ts b/packages/web/sources/dataLayer/src/schemas/index.ts index c8da0e169..838c4c8cb 100644 --- a/packages/web/sources/dataLayer/src/schemas/index.ts +++ b/packages/web/sources/dataLayer/src/schemas/index.ts @@ -1,4 +1,4 @@ -import { zodToSchema } from '@walkeros/core'; +import { zodToSchema } from '@walkeros/core/dev'; import { SettingsSchema } from './settings'; // Export primitives diff --git a/packages/web/sources/dataLayer/src/schemas/primitives.ts b/packages/web/sources/dataLayer/src/schemas/primitives.ts index c9452ece7..821e8a499 100644 --- a/packages/web/sources/dataLayer/src/schemas/primitives.ts +++ b/packages/web/sources/dataLayer/src/schemas/primitives.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; /** * JavaScript variable name diff --git a/packages/web/sources/dataLayer/src/schemas/settings.ts b/packages/web/sources/dataLayer/src/schemas/settings.ts index aacf2e955..254a21ebe 100644 --- a/packages/web/sources/dataLayer/src/schemas/settings.ts +++ b/packages/web/sources/dataLayer/src/schemas/settings.ts @@ -1,4 +1,4 @@ -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; import { JavaScriptVarName, EventPrefix } from './primitives'; /** diff --git a/packages/web/sources/dataLayer/src/types/index.ts b/packages/web/sources/dataLayer/src/types/index.ts index 938252853..0dc8b8da4 100644 --- a/packages/web/sources/dataLayer/src/types/index.ts +++ b/packages/web/sources/dataLayer/src/types/index.ts @@ -1,6 +1,6 @@ import type { WalkerOS, Source, Elb } from '@walkeros/core'; import type { SettingsSchema } from '../schemas'; -import { z } from '@walkeros/core'; +import { z } from '@walkeros/core/dev'; declare global { interface Window { @@ -21,6 +21,9 @@ export interface Settings extends Omit { filter?: (event: unknown) => WalkerOS.PromiseOrValue; } +// InitSettings: user input (all optional) +export type InitSettings = Partial; + export interface Mapping {} export type Push = Elb.Fn; @@ -29,7 +32,9 @@ export interface Env extends Source.BaseEnv { window?: Window & typeof globalThis; } -export type Types = Source.Types; +export type Types = Source.Types; + +export type Config = Source.Config; export type DataLayerEvent = { event: string; diff --git a/packages/web/sources/dataLayer/tsup.config.ts b/packages/web/sources/dataLayer/tsup.config.ts index 30d0ab65b..0336c68ad 100644 --- a/packages/web/sources/dataLayer/tsup.config.ts +++ b/packages/web/sources/dataLayer/tsup.config.ts @@ -13,4 +13,9 @@ export default defineConfig([ buildExamples(), buildBrowser({ globalName }), buildES5({ globalName }), + // Schemas build (separate entry for documentation/tooling) + buildModules({ + entry: ['src/dev.ts'], + outDir: 'dist', + }), ]); diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md index cd607f445..87d117740 100644 --- a/website/CHANGELOG.md +++ b/website/CHANGELOG.md @@ -1,5 +1,40 @@ # @walkeros/website +## 0.3.1 + +### Patch Changes + +- dev entry +- Updated dependencies + - @walkeros/web-destination-plausible@0.4.1 + - @walkeros/web-destination-piwikpro@0.4.1 + - @walkeros/web-destination-gtag@0.4.1 + - @walkeros/web-destination-meta@0.4.1 + - @walkeros/web-destination-api@0.4.1 + - @walkeros/web-source-browser@0.4.1 + - @walkeros/collector@0.4.1 + - @walkeros/walker.js@0.4.1 + - @walkeros/core@0.4.1 + +## 0.3.0 + +### Minor Changes + +- Consolidate schemas and examples under `/dev` export + +### Patch Changes + +- Updated dependencies + - @walkeros/web-destination-plausible@0.4.0 + - @walkeros/web-destination-piwikpro@0.4.0 + - @walkeros/web-destination-gtag@0.4.0 + - @walkeros/web-destination-meta@0.4.0 + - @walkeros/web-destination-api@0.4.0 + - @walkeros/web-source-browser@0.4.0 + - @walkeros/collector@0.4.0 + - @walkeros/walker.js@0.4.0 + - @walkeros/core@0.4.0 + ## 0.2.2 ### Patch Changes diff --git a/website/docs/apps/cli.mdx b/website/docs/apps/cli.mdx new file mode 100644 index 000000000..984468987 --- /dev/null +++ b/website/docs/apps/cli.mdx @@ -0,0 +1,1158 @@ +--- +title: CLI +description: walkerOS command-line tool for building, testing, and running flows +sidebar_position: 2 +package: '@walkeros/cli' +--- + +# walkerOS CLI + +The walkerOS CLI (`@walkeros/cli`) is a command-line tool for building, testing, and running event collection flows. It handles the complete workflow from configuration to deployment—bundling flows into optimized JavaScript, testing with simulated events, and running collection servers locally or in Docker. + +If you're familiar with tools like **Segment's CLI** or **Amplitude's SDK**—the walkerOS CLI is your build pipeline for analytics infrastructure. + +## Installation + +### Global Installation (Recommended) + +Install globally to use the `walkeros` command anywhere: + + + +### Local Installation + +Install in your project for team consistency: + + + +## Commands Overview + +| Command | Purpose | Use Case | +|---------|---------|----------| +| `bundle` | Build production-ready bundle from flow config | Create deployable JavaScript from configuration | +| `simulate` | Test flow with sample events (mocked) | Validate configuration before deployment | +| `push` | Execute event with real API calls | Integration testing, production validation | +| `run collect` | Start HTTP event collection server | Accept incoming events via HTTP POST | +| `run serve` | Serve web bundles as static files | Host browser tracking scripts | + +## Getting Started + +Before using the CLI, you need a [flow configuration file](/docs/getting-started/flow). Here's a minimal example: + + + +Save this as `flow.json`. + +## Bundle Command + +The `bundle` command builds production-ready JavaScript bundles from flow configurations. + +### Use Case + +You've defined your sources, destinations, and transformations in a flow configuration file. Now you need to: +- Download the required npm packages +- Bundle everything into a single optimized JavaScript file +- Deploy it to production (Docker, Cloud Run, serverless functions) + +The bundle command handles all of this. + +### Basic Usage + + + +This creates an optimized bundle at the path specified in `build.output`. + +### Step-by-Step Guide + +**1. Create a flow configuration** + +Create `server-collect.json`: + + + +**2. Bundle the flow** + + + +Output: +``` +📦 Downloading packages from npm... +✓ @walkeros/collector@latest +✓ @walkeros/server-source-express@latest +✓ @walkeros/destination-demo@latest + +🔨 Bundling... +✓ Bundle created: ./dist/server-flow.mjs + +📊 Bundle Statistics: + Size: 45.2 KB (minified) + Packages: 3 + Format: ESM +``` + +**3. Review the bundle** + + + +The bundle is now ready to deploy! + +### Options + + [options]`} + language="bash" +/> + +| Option | Description | +|--------|-------------| +| `-e, --env ` | Build specific environment (for multi-env configs) | +| `--all` | Build all environments | +| `-s, --stats` | Show bundle statistics | +| `--json` | Output statistics as JSON (for CI/CD) | +| `--no-cache` | Skip package cache, download fresh | +| `--local` | Execute locally without Docker | +| `-v, --verbose` | Detailed logging | + +### Multi-Environment Example + + + +## Simulate Command + +The `simulate` command tests your flow configuration with sample events without deploying to production. + +### Use Case + +Before deploying your flow, you want to: +- Verify your configuration is valid +- Test event transformations and mappings +- See what data would be sent to destinations +- Debug issues locally + +Simulate executes your flow with test events and captures all destination API calls. + +### Basic Usage + + + +### Step-by-Step Guide + +**1. Create a flow to test** + +Create `test-flow.json`: + + + +**2. Run simulation** + + + +**3. Review output** + +```json +{ + "success": true, + "event": { + "name": "page view", + "entity": "page", + "action": "view", + "data": { + "title": "Welcome to Analytics", + "path": "/welcome" + }, + "timestamp": 1701234567890 + }, + "captured": [ + { + "destination": "demo", + "event": { + "name": "pageview", + "data": { + "page_title": "Welcome to Analytics", + "page_path": "/welcome" + } + } + } + ] +} +``` + +The simulation shows: +- ✅ Event was processed successfully +- ✅ Mapping transformed `"page view"` → `"pageview"` +- ✅ Data mapping extracted `title` → `page_title` and `path` → `page_path` + +### Options + + [options]`} + language="bash" +/> + +| Option | Description | +|--------|-------------| +| `--event ` | Event JSON string to test | +| `--event-file ` | Path to JSON file with event(s) | +| `--json` | Output as JSON | +| `--local` | Execute locally without Docker | +| `-v, --verbose` | Detailed logging | + +### Multiple Events + +Test multiple events at once: + + events.json + +# Simulate all events +walkeros simulate flow.json --event-file events.json`} + language="bash" +/> + +## Push Command + +The `push` command executes your flow with a real event, making actual API calls to your configured destinations. Unlike `simulate` which mocks API calls for safe testing, `push` performs real HTTP requests—ideal for integration testing and production validation. + +### Use Case + +You've validated your configuration with `simulate` and now need to: +- Test with real third-party APIs (GA4, Meta, BigQuery, etc.) +- Verify production credentials and endpoints work +- Debug actual API responses and errors +- Perform integration testing before deployment + +Push is your bridge between local testing and production deployment. + +### Basic Usage + + + +### Step-by-Step Guide + +**1. Create a flow configuration** + +Create `api-flow.json` with a destination that makes real HTTP calls: + + + +**2. Create an event file** + +Create `event.json`: + + + +**3. Push the event** + + + +**4. Review the output** + +``` +📥 Loading event... +📦 Loading flow configuration... +🔨 Bundling flow configuration... +🖥️ Executing in server environment (Node.js)... +Pushing event: order complete +✅ Event pushed successfully + Event ID: 1701234567890-abc12-1 + Entity: order + Action: complete + Duration: 1234ms +``` + +The event was sent to your real API endpoint! + +### Options + + [options]`} + language="bash" +/> + +| Option | Description | +|--------|-------------| +| `-e, --event ` | **Required.** Event to push (JSON string, file path, or URL) | +| `--env ` | Environment name (for multi-environment configs) | +| `--json` | Output results as JSON | +| `-v, --verbose` | Verbose output with debug information | +| `-s, --silent` | Suppress output (for CI/CD) | +| `--local` | Execute in local Node.js instead of Docker | + +### Event Input Formats + +The `--event` parameter accepts three formats: + +**Inline JSON string:** + + +**File path:** + + +**URL:** + + +### Push vs Simulate + +| Feature | `push` | `simulate` | +|---------|--------|------------| +| API Calls | Real HTTP requests | Mocked (captured) | +| Use Case | Integration testing | Safe local testing | +| Side Effects | Full (writes to DBs, sends to APIs) | None | +| Output | Success/error from real APIs | Captured call data | + +**When to use each:** +- Use `simulate` first to validate configuration without side effects +- Use `push` to verify real integrations work before deployment + +### JSON Output + +For CI/CD pipelines, use `--json` for machine-readable output: + + + +Output: +```json +{ + "success": true, + "event": { + "id": "1701234567890-abc12-1", + "name": "page view", + "entity": "page", + "action": "view" + }, + "duration": 1234 +} +``` + +On error: +```json +{ + "success": false, + "error": "Connection refused: https://your-endpoint.com/events", + "duration": 5023 +} +``` + +### Multi-Environment + +Push to specific environments: + + + +## Run Collect Command + +The `run collect` command starts an HTTP server that accepts events and processes them through your flow. + +### Use Case + +You need an HTTP endpoint to: +- Receive events from browser clients, mobile apps, or server-side sources +- Process events through your collector and destinations +- Test the full event pipeline locally before deploying to production + +This is similar to running a Segment or Jitsu collection endpoint. + +### Basic Usage + + + +### Step-by-Step Guide + +**1. Create a collection flow** + +Create `collect.json`: + + + +**2. Start the collector** + + + +Output: +``` +📦 Bundling flow... +✓ Bundle ready + +🚀 Starting collection server... +✓ Server running on http://localhost:8080 +✓ Endpoint: POST http://localhost:8080/collect +✓ Health check: GET http://localhost:8080/health +``` + +**3. Send test events** + +Open a new terminal and send events: + + + +**4. See events in console** + +The collector terminal shows: +``` +[Event Collector] page view + data: {"title":"Home Page","path":"/"} + user.id: user123 + timestamp: 1701234567890 + +[Event Collector] product view + data: {"id":"P123","name":"Laptop","price":999} + timestamp: 1701234567891 +``` + +### Options + + [options]`} + language="bash" +/> + +| Option | Description | +|--------|-------------| +| `--port ` | Server port (default: 8080) | +| `--local` | Execute locally without Docker | +| `-v, --verbose` | Detailed logging | + +### Running Pre-Built Bundles + +You can also run pre-built bundles directly: + + + +## Run Serve Command + +The `run serve` command serves web bundles as static files for browser-side tracking. + +### Use Case + +You've created a web flow (browser event tracking) and need to: +- Host the JavaScript bundle for your website to load +- Test browser tracking locally before deploying to a CDN +- Serve multiple versions or configurations + +This is like hosting a tracking script (similar to Segment's analytics.js or Amplitude's SDK). + +### Basic Usage + + + +### Step-by-Step Guide + +**1. Create a web flow** + +Create `web-track.json`: + + + +**2. Start the serve mode** + + + +Output: +``` +📦 Bundling flow... +✓ Bundle ready: tracker.js + +🌐 Starting static file server... +✓ Server running on http://localhost:3000 +✓ Script available at: http://localhost:3000/scripts/tracker.js +✓ Health check: GET http://localhost:3000/health +``` + +**3. Use in HTML** + +Create `test.html`: + + + + + Test Tracking + + + +

Welcome

+ + +`} + language="html" +/> + +**4. Test in browser** + +Open `test.html` in your browser. Events will be sent to `http://localhost:8080/collect`. + +### Options + + [options]`} + language="bash" +/> + +| Option | Description | +|--------|-------------| +| `--port ` | Server port (default: 3000) | +| `--path ` | URL path to serve script (default: `/`) | +| `--name ` | Script filename (default: from config) | +| `--local` | Execute locally without Docker | +| `-v, --verbose` | Detailed logging | + +## Complete Example: Web → Server Flow + +This example demonstrates a complete analytics pipeline: +- Browser events captured by web flow +- Sent to server collection endpoint +- Logged to console (swap for BigQuery in production) + +### 1. Create Server Collection Flow + +Create `server-collect.json`: + + + +### 2. Create Web Tracking Flow + +Create `web-track.json`: + + + +### 3. Start Collection Server + +Terminal 1: + + + +### 4. Start Web Server + +Terminal 2: + + + +### 5. Test in Browser + +Create `demo.html`: + + + + + + + +

+ Welcome to walkerOS +

+ + + + +`} + language="html" +/> + +Open in browser. Terminal 1 shows: +``` +[Server Logger] page view +[Server Logger] promotion view +[Server Logger] promotion cta +[Server Logger] custom event +``` + +## Global Options + +These options work with all commands: + + + +| Option | Description | +|--------|-------------| +| `--local` | Execute without Docker (faster, requires local Node.js) | +| `--verbose` | Show detailed logs | +| `--silent` | Suppress output | +| `--json` | Output as JSON (for CI/CD) | +| `--help` | Show help for command | +| `--version` | Show CLI version | + +## Execution Modes + +### Docker Mode (Default) + +By default, the CLI uses Docker for isolated execution: + + + +**Advantages**: +- Consistent environment across machines +- Isolated from local Node.js setup +- Reproducible builds + +**Requirements**: +- Docker installed and running + +### Local Mode + +Use `--local` to execute in your current Node.js environment: + + + +**Advantages**: +- Faster execution (no container startup) +- No Docker dependency +- Useful in CI/CD or containers + +**Requirements**: +- Node.js 18+ installed locally + +## CI/CD Integration + +### GitHub Actions + + stats.json + + - name: Upload bundles + uses: actions/upload-artifact@v3 + with: + name: flows + path: dist/`} + language="yaml" +/> + +### Docker Build + + + +## Troubleshooting + +### Package Download Issues + +If packages fail to download: + + + +### Docker Permission Issues + +On Linux, you may need to run Docker commands with sudo or add your user to the `docker` group: + + + +### Port Already in Use + +If the port is already in use: + + + +## Next Steps + +- **[Flow Configuration](/docs/getting-started/flow)** - Learn about flow config structure +- **[Docker Deployment](/docs/apps/docker)** - Deploy flows to production +- **[Sources](/docs/sources/)** - Explore event sources +- **[Destinations](/docs/destinations/)** - Configure analytics tools +- **[Mapping](/docs/mapping)** - Transform events for destinations diff --git a/website/docs/apps/docker.mdx b/website/docs/apps/docker.mdx new file mode 100644 index 000000000..c9fe51873 --- /dev/null +++ b/website/docs/apps/docker.mdx @@ -0,0 +1,865 @@ +--- +title: Docker +description: Deploy walkerOS flows with Docker containers +sidebar_position: 3 +package: '@walkeros/docker' +--- + +# walkerOS Docker + +The walkerOS Docker package (`@walkeros/docker`) is a **pure runtime container** for executing pre-built flow bundles in production. It's designed for fast startup (< 1 second), minimal footprint (~150-200MB), and cloud-native deployment. + +**Key Philosophy**: Docker handles runtime, [CLI](/docs/apps/cli) handles build-time. You bundle with the CLI, deploy with Docker. + +## What It Does + +- ✅ **Executes pre-built `.mjs` bundles** from the CLI +- ✅ **Runs collection servers** (HTTP endpoints for event ingestion) +- ✅ **Serves static files** (web tracking scripts) +- ✅ **Sub-1 second startup** - No npm downloads, no build steps +- ✅ **Production-ready** - Health checks, non-root user, signal handling + +## What It Doesn't Do + +- ❌ **No bundling** - Flows must be pre-built with the CLI +- ❌ **No package downloads** - All dependencies must be bundled +- ❌ **No configuration generation** - Configuration comes from your bundle + +Think of it as the **deployment target**, not the build tool. + +## Prerequisites + +- Docker installed ([Get Docker](https://docs.docker.com/get-docker/)) +- (Optional) Pre-built flow bundle from the [CLI](/docs/apps/cli) + +## Quick Start with Demos + +The Docker image includes demo bundles for instant testing. + +### Demo: Event Collection + + + +Output: +``` +✓ Loading flow: /app/demos/demo-collect.mjs +✓ Starting collection server on port 8080 +✓ Health check available at /health + +[Demo Output] page view +[Demo Output] product add +``` + +The demo is self-contained and generates test events automatically. + +### Demo: Static File Serving + + + +Visit `http://localhost:3000/demo-serve.js` to download the demo web bundle. + +## Configuration + +The Docker container is configured via environment variables: + +### Collect Mode + + + +| Environment Variable | Required | Default | Description | +|---------------------|----------|---------|-------------| +| `MODE` | Yes | - | Must be `collect` | +| `FLOW` | Yes | - | Path to pre-built `.mjs` bundle | +| `PORT` | No | `8080` | Server port | +| `HOST` | No | `0.0.0.0` | Bind address | + +### Serve Mode + + + +| Environment Variable | Required | Default | Description | +|---------------------|----------|---------|-------------| +| `MODE` | Yes | - | Must be `serve` | +| `STATIC_DIR` | No | `/app/dist` | Directory to serve | +| `PORT` | No | `3000` | Server port | +| `HOST` | No | `0.0.0.0` | Bind address | + +## Deployment Workflows + +### Workflow 1: Volume Mount (Development) + +Mount pre-built bundles directly into the container. + +**1. Build with CLI** + + + +This creates `dist/flow.mjs`. + +**2. Run with Docker** + + + +**3. Test it** + + + +**4. View logs** + + + +### Workflow 2: Custom Docker Image (Production) + +Build a custom Docker image with your bundle baked in. + +**1. Build with CLI** + + + +**2. Create Dockerfile** + + process.exit(r.statusCode === 200 ? 0 : 1))"`} + language="dockerfile" +/> + +**3. Build image** + + + +**4. Run it** + + + +**5. Push to registry** + + + +### Workflow 3: Multi-Stage Build + +Build and bundle in a single Dockerfile. + + + +Build and run: + + + +## Docker Compose + +### Single Service + + + +Run it: + + + +### Multiple Services (Web + Server) + + + +## Cloud Deployment + +### Google Cloud Run + +Cloud Run is ideal for serverless deployment of walkerOS flows. + +#### Deploy Collection Endpoint + +**1. Create server flow** + +Create `bigquery-collect.json`: + + + +:::tip Starting with Console +The config above includes **both** BigQuery and console destinations. This is a best practice: +- Console logs help debug issues in Cloud Run logs +- Start with console only, verify events flow correctly +- Then uncomment BigQuery destination for production + +To start console-only: remove the `bigquery` destination block. +::: + +**2. Bundle the flow** + + + +**3. Create Dockerfile** + + + +**4. Build and push to Google Container Registry** + + + +**5. Deploy to Cloud Run** + + + +**6. Get the URL** + + + +**7. Test it** + + + +**8. View logs** + + + +You should see console logs showing the received events. + +#### Deploy Web Bundle Server + +**1. Create web flow** + +Create `web-tracker.json`: + + + +**2. Bundle** + + + +This creates `tracker.js`. + +**3. Create Dockerfile for serving** + + + +**4. Deploy to Cloud Run** + + + +**5. Use in your website** + + +`} + language="html" +/> + +:::tip Production Considerations +For production, consider: +- **Use a CDN**: Serve static files from Cloud Storage + Cloud CDN instead of Cloud Run +- **Custom domain**: Map your own domain (e.g., `cdn.example.com/tracker.js`) +- **Versioning**: Include version in filename (e.g., `tracker.v1.2.3.js`) +- **Caching**: Set appropriate cache headers +::: + +### AWS (ECS/Fargate) + +Similar workflow for AWS: + + + +### Kubernetes + +Deploy to any Kubernetes cluster: + + + +Apply: + + + +## Health Checks + +The Docker container provides a `/health` endpoint: + + + +Response: + + + +Use this for: +- Docker health checks +- Kubernetes liveness/readiness probes +- Load balancer health checks +- Monitoring systems + +## Monitoring and Logs + +### View Docker Logs + + + +### Cloud Run Logs + + + +### Structured Logging + +For better observability, use structured logging in your destinations: + + + +## Security + +The Docker image follows security best practices: + +- ✅ **Non-root user** - Runs as `walker` (UID 1001) +- ✅ **Minimal base** - Alpine Linux (~150-200MB) +- ✅ **No build tools** - Production dependencies only +- ✅ **Signal handling** - Graceful shutdown with Tini +- ✅ **Health checks** - Built-in endpoint for orchestrators + +### Environment Secrets + +For sensitive configuration (API keys, credentials), use environment variables: + + + +Reference secrets in your flow configuration using environment variable substitution. + +## Performance + +### Startup Time + +- **Cold start**: < 1 second (flow already bundled) +- **Warm start**: < 100ms (container reuse) + +### Resource Usage + +Typical resource consumption: + +| Metric | Idle | Active (1000 req/min) | +|--------|------|----------------------| +| Memory | ~50MB | ~100-150MB | +| CPU | < 1% | 5-15% | +| Startup | < 1s | < 1s | + +### Scaling + +The container is designed for horizontal scaling: + + + +## Troubleshooting + +### Container Won't Start + + + +### Events Not Being Received + + + +### Port Conflicts + + + +### Bundle Not Found + + + +## Next Steps + +- **[CLI](/docs/apps/cli)** - Learn how to build flows +- **[Flow Configuration](/docs/getting-started/flow)** - Understand flow structure +- **[Sources](/docs/sources/)** - Configure event sources +- **[Destinations](/docs/destinations/)** - Set up analytics destinations +- **[Docker Hub](https://hub.docker.com/r/walkeros/docker)** - Official Docker images diff --git a/website/docs/apps/walkerjs.mdx b/website/docs/apps/walkerjs.mdx index 347d8235b..0992c544e 100644 --- a/website/docs/apps/walkerjs.mdx +++ b/website/docs/apps/walkerjs.mdx @@ -5,7 +5,7 @@ sidebar_position: 1 package: '@walkeros/walker.js' --- -import * as schemas from '@walkeros/walker.js/src/schemas'; +import * as schemas from '@walkeros/walker.js/src/dev'; # walker.js diff --git a/website/docs/collector/index.mdx b/website/docs/collector/index.mdx index f68c0ead6..20e5acef1 100644 --- a/website/docs/collector/index.mdx +++ b/website/docs/collector/index.mdx @@ -6,9 +6,9 @@ package: '@walkeros/collector' sidebar_position: 2 --- -import { schemas } from '@walkeros/collector'; +import { schemas } from '@walkeros/collector/dev'; -export const collectorSchema = schemas.schemas.settings; +export const collectorSchema = schemas.settings; # Collector diff --git a/website/docs/destinations/server/aws.mdx b/website/docs/destinations/server/aws.mdx index 2ba9215d9..784d914d7 100644 --- a/website/docs/destinations/server/aws.mdx +++ b/website/docs/destinations/server/aws.mdx @@ -5,7 +5,7 @@ path: /docs/destinations/server/aws sidebar_position: 1 package: '@walkeros/server-destination-aws' --- -import { schemas } from '@walkeros/server-destination-aws/schemas'; +import { schemas } from '@walkeros/server-destination-aws/dev'; # AWS Firehose diff --git a/website/docs/destinations/server/datamanager.mdx b/website/docs/destinations/server/datamanager.mdx index 429f35f89..9078bc318 100644 --- a/website/docs/destinations/server/datamanager.mdx +++ b/website/docs/destinations/server/datamanager.mdx @@ -5,7 +5,7 @@ path: /docs/destinations/server/datamanager sidebar_position: 4 package: '@walkeros/server-destination-datamanager' --- -import { schemas } from '@walkeros/server-destination-datamanager/schemas'; +import { schemas } from '@walkeros/server-destination-datamanager/dev'; # Google Data Manager diff --git a/website/docs/destinations/server/gcp.mdx b/website/docs/destinations/server/gcp.mdx index 467a8fe23..ee08e08de 100644 --- a/website/docs/destinations/server/gcp.mdx +++ b/website/docs/destinations/server/gcp.mdx @@ -5,7 +5,7 @@ path: /docs/destinations/server/gcp sidebar_position: 2 package: '@walkeros/server-destination-gcp' --- -import { schemas } from '@walkeros/server-destination-gcp/schemas'; +import { schemas } from '@walkeros/server-destination-gcp/dev'; # GCP BigQuery diff --git a/website/docs/destinations/server/meta-capi.mdx b/website/docs/destinations/server/meta-capi.mdx index 3ea072777..86a0e2269 100644 --- a/website/docs/destinations/server/meta-capi.mdx +++ b/website/docs/destinations/server/meta-capi.mdx @@ -5,7 +5,7 @@ path: /docs/destinations/server/meta-capi sidebar_position: 3 package: '@walkeros/server-destination-meta' --- -import { schemas } from '@walkeros/server-destination-meta/schemas'; +import { schemas } from '@walkeros/server-destination-meta/dev'; # Meta Conversions API diff --git a/website/docs/destinations/web/api.mdx b/website/docs/destinations/web/api.mdx index 24a7e3e5e..d02a71740 100644 --- a/website/docs/destinations/web/api.mdx +++ b/website/docs/destinations/web/api.mdx @@ -8,7 +8,7 @@ sidebar_position: 1 import { getEvent } from '@walkeros/core'; import destinationWebAPI from '@walkeros/web-destination-api'; -import { examples, schemas } from '@walkeros/web-destination-api'; +import { examples, schemas } from '@walkeros/web-destination-api/dev'; export const destination = { ...destinationWebAPI, examples }; diff --git a/website/docs/destinations/web/gtag/ads.mdx b/website/docs/destinations/web/gtag/ads.mdx index 269542982..186094b69 100644 --- a/website/docs/destinations/web/gtag/ads.mdx +++ b/website/docs/destinations/web/gtag/ads.mdx @@ -7,7 +7,7 @@ package: '@walkeros/web-destination-gtag' import { createEvent } from '@walkeros/core'; import destinationGtag from '@walkeros/web-destination-gtag'; -import { examples, schemas } from '@walkeros/web-destination-gtag'; +import { examples, schemas } from '@walkeros/web-destination-gtag/dev'; export const destination = { ...destinationGtag, examples }; diff --git a/website/docs/destinations/web/gtag/ga4.mdx b/website/docs/destinations/web/gtag/ga4.mdx index abae47579..53fd45be9 100644 --- a/website/docs/destinations/web/gtag/ga4.mdx +++ b/website/docs/destinations/web/gtag/ga4.mdx @@ -7,7 +7,7 @@ package: '@walkeros/web-destination-gtag' import { getEvent } from '@walkeros/core'; import destinationGtag from '@walkeros/web-destination-gtag'; -import { examples, schemas } from '@walkeros/web-destination-gtag'; +import { examples, schemas } from '@walkeros/web-destination-gtag/dev'; export const destination = { ...destinationGtag, examples }; diff --git a/website/docs/destinations/web/gtag/gtm.mdx b/website/docs/destinations/web/gtag/gtm.mdx index 2cd9802d5..dba486215 100644 --- a/website/docs/destinations/web/gtag/gtm.mdx +++ b/website/docs/destinations/web/gtag/gtm.mdx @@ -7,7 +7,7 @@ package: '@walkeros/web-destination-gtag' import { getEvent } from '@walkeros/core'; import destinationGtag from '@walkeros/web-destination-gtag'; -import { examples, schemas } from '@walkeros/web-destination-gtag'; +import { examples, schemas } from '@walkeros/web-destination-gtag/dev'; export const destination = { ...destinationGtag, examples }; diff --git a/website/docs/destinations/web/gtag/index.mdx b/website/docs/destinations/web/gtag/index.mdx index 303c4bc0a..6430c8996 100644 --- a/website/docs/destinations/web/gtag/index.mdx +++ b/website/docs/destinations/web/gtag/index.mdx @@ -5,7 +5,7 @@ sidebar_position: 1 package: '@walkeros/web-destination-gtag' --- -import { schemas } from '@walkeros/web-destination-gtag'; +import { schemas } from '@walkeros/web-destination-gtag/dev'; # Google Gtag diff --git a/website/docs/destinations/web/meta-pixel.mdx b/website/docs/destinations/web/meta-pixel.mdx index beb23ff14..166e0e809 100644 --- a/website/docs/destinations/web/meta-pixel.mdx +++ b/website/docs/destinations/web/meta-pixel.mdx @@ -8,7 +8,7 @@ package: '@walkeros/web-destination-meta' import { getEvent } from '@walkeros/core'; import destinationMetaPixel from '@walkeros/web-destination-meta'; -import { examples, schemas } from '@walkeros/web-destination-meta'; +import { examples, schemas } from '@walkeros/web-destination-meta/dev'; export const destination = { ...destinationMetaPixel, examples }; diff --git a/website/docs/destinations/web/piwikpro.mdx b/website/docs/destinations/web/piwikpro.mdx index f5b1e6b0c..d84a4c073 100644 --- a/website/docs/destinations/web/piwikpro.mdx +++ b/website/docs/destinations/web/piwikpro.mdx @@ -8,7 +8,7 @@ package: '@walkeros/web-destination-piwikpro' import { getEvent } from '@walkeros/core'; import destinationPiwikPro from '@walkeros/web-destination-piwikpro'; -import { examples, schemas } from '@walkeros/web-destination-piwikpro'; +import { examples, schemas } from '@walkeros/web-destination-piwikpro/dev'; export const destination = { ...destinationPiwikPro, examples }; diff --git a/website/docs/destinations/web/plausible.mdx b/website/docs/destinations/web/plausible.mdx index 8234e28bd..311a76476 100644 --- a/website/docs/destinations/web/plausible.mdx +++ b/website/docs/destinations/web/plausible.mdx @@ -8,7 +8,7 @@ package: '@walkeros/web-destination-plausible' import { getEvent } from '@walkeros/core'; import destinationPlausible from '@walkeros/web-destination-plausible'; -import { examples, schemas } from '@walkeros/web-destination-plausible'; +import { examples, schemas } from '@walkeros/web-destination-plausible/dev'; export const destination = { ...destinationPlausible, examples }; diff --git a/website/docs/getting-started/flow.mdx b/website/docs/getting-started/flow.mdx new file mode 100644 index 000000000..1f875c857 --- /dev/null +++ b/website/docs/getting-started/flow.mdx @@ -0,0 +1,476 @@ +--- +title: Flow Configuration +description: Understanding the walkerOS flow configuration file structure +sidebar_position: 4 +--- + +# Flow Configuration + +Flow configuration is walkerOS's **"configuration as code"** approach. A single JSON file defines your entire event collection pipeline—sources, collector, destinations, and build settings—making it portable, version-controlled, and deployable across environments. + +## Philosophy + +If you're familiar with **Segment**, **Jitsu**, or **Amplitude**—think of flow configuration as your sources, destinations, and transformation rules defined in one file instead of a web UI. This approach provides: + +- **Version control**: Track changes in git like any other code +- **Reproducibility**: Same config = same behavior across environments +- **Portability**: Move between local, staging, and production seamlessly +- **Transparency**: No hidden settings in external dashboards + +## Configuration Structure + +A flow configuration has two main sections: + +1. **`flow`** - Runtime configuration (sources, destinations, collector) +2. **`build`** - Build-time configuration (packages, output format, optimization) + +### Basic Example + + + +This creates an HTTP event collection endpoint that logs events to the console. + +## Flow Section + +The `flow` section defines **runtime behavior**—what happens when your application runs. + +### Platform + +Specifies the execution environment: + + + +**Options**: +- `"server"` - Node.js server environment (HTTP endpoints, cloud functions) +- `"web"` - Browser environment (client-side tracking) + +### Sources + +Sources capture events from various inputs. Each source needs: +- **`code`** - The imported function name (from `build.packages.imports`) +- **`config`** - Source-specific settings + + + +**Common Sources**: +- `@walkeros/server-source-express` - HTTP event collection endpoint +- `@walkeros/web-source-browser` - Browser DOM event tracking +- `@walkeros/web-source-dataLayer` - DataLayer integration + +See [Sources documentation](/docs/sources/) for all available options. + +### Destinations + +Destinations receive processed events and send them to analytics tools, databases, or APIs. Structure is similar to sources: + + + +**Configuration Options**: +- **`settings`** - Destination-specific configuration (API keys, endpoints, etc.) +- **`mapping`** - Event transformation rules (see [Mapping documentation](/docs/mapping)) +- **`consent`** - Required consent states +- **`policy`** - Processing rules + +**Common Destinations**: +- `@walkeros/destination-demo` - Console logging (great for testing) +- `@walkeros/server-destination-gcp` - Google BigQuery +- `@walkeros/server-destination-aws` - AWS services +- `@walkeros/web-destination-gtag` - Google Analytics 4 +- `@walkeros/web-destination-meta-pixel` - Meta Pixel + +See [Destinations documentation](/docs/destinations/) for all available options. + +### Collector + +The collector processes events from sources and routes them to destinations. + + + +**Options**: +- **`run`** - Whether to start the collector automatically (default: `true`) +- **`globals`** - Properties added to every event +- **`consent`** - Default consent state + +See [Collector documentation](/docs/collector/) for complete options. + +## Build Section + +The `build` section defines **build-time behavior**—how your flow is bundled into executable code. + +### Packages + +Specifies npm packages to download and bundle: + + + +**Properties**: +- **`version`** - npm version (semver or "latest") +- **`imports`** - Array of named exports to import + +### Output Options + + + +**Properties**: +- **`output`** - Output file path (default: `./dist/bundle.js`) +- **`minify`** - Minify the output (default: `true`) +- **`format`** - Output format: `"esm"`, `"cjs"`, or `"iife"` (default: `"esm"`) + +### Web-Specific Options + +For browser bundles (`platform: "web"`): + + + +**Properties**: +- **`windowCollector`** - Global variable name for collector instance +- **`windowElb`** - Global variable name for event tracking function + +## Multi-Environment Configuration + +For managing dev/staging/production environments in one file: + + + +Build specific environments using the CLI: + + + +## Complete Example + +Here's a production-ready flow that accepts HTTP events and sends them to BigQuery: + + + +## Programmatic Usage + +You can also use flow configuration programmatically with the `startFlow` function: + + + +See the [Collector documentation](/docs/collector/) for complete API reference. + +## Next Steps + +- **[CLI](/docs/apps/cli)** - Learn how to bundle and test flows +- **[Docker](/docs/apps/docker)** - Deploy flows in containers +- **[Sources](/docs/sources/)** - Explore available event sources +- **[Destinations](/docs/destinations/)** - Configure analytics destinations +- **[Mapping](/docs/mapping)** - Transform events for destinations diff --git a/website/docs/sources/web/browser/index.mdx b/website/docs/sources/web/browser/index.mdx index 7d6c61eac..26ca5b3bd 100644 --- a/website/docs/sources/web/browser/index.mdx +++ b/website/docs/sources/web/browser/index.mdx @@ -6,7 +6,7 @@ package: '@walkeros/web-source-browser' --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import { schemas } from '@walkeros/web-source-browser'; +import { schemas } from '@walkeros/web-source-browser/dev'; diff --git a/website/docs/sources/web/browser/tagger.mdx b/website/docs/sources/web/browser/tagger.mdx index e2732b3f1..b1b915dca 100644 --- a/website/docs/sources/web/browser/tagger.mdx +++ b/website/docs/sources/web/browser/tagger.mdx @@ -4,7 +4,7 @@ description: HTML data attribute generator for walkerOS event tracking package: '@walkeros/web-source-browser' path: packages/web/sources/browser --- -import { schemas } from '@walkeros/web-source-browser'; +import { schemas } from '@walkeros/web-source-browser/dev'; # Tagger diff --git a/website/docs/sources/web/dataLayer/index.mdx b/website/docs/sources/web/dataLayer/index.mdx index 21e9ac7b0..c9957c468 100644 --- a/website/docs/sources/web/dataLayer/index.mdx +++ b/website/docs/sources/web/dataLayer/index.mdx @@ -5,7 +5,7 @@ path: /docs/sources/web/dataLayer sidebar_position: 2 package: '@walkeros/web-source-datalayer' --- -import { schemas } from '@walkeros/web-source-datalayer'; +import { schemas } from '@walkeros/web-source-datalayer/dev'; diff --git a/website/package.json b/website/package.json index 5164e661e..c422e7263 100644 --- a/website/package.json +++ b/website/package.json @@ -1,6 +1,6 @@ { "name": "@walkeros/website", - "version": "0.2.2", + "version": "0.3.1", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -16,51 +16,51 @@ "format:mdx": "remark docs --output --quiet" }, "dependencies": { - "@docusaurus/core": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", - "@docusaurus/theme-live-codeblock": "^3.7.0", - "@docusaurus/theme-mermaid": "^3.7.0", - "@iconify/react": "^5.2.1", - "@walkeros/collector": "*", - "@walkeros/core": "*", - "@walkeros/explorer": "^0.3.0", - "@walkeros/walker.js": "*", - "@walkeros/web-destination-api": "*", - "@walkeros/web-destination-gtag": "*", - "@walkeros/web-destination-meta": "*", - "@walkeros/web-destination-piwikpro": "*", - "@walkeros/web-destination-plausible": "*", - "@walkeros/web-source-browser": "*", + "@docusaurus/core": "^3.9.2", + "@docusaurus/preset-classic": "^3.9.2", + "@docusaurus/theme-live-codeblock": "^3.9.2", + "@docusaurus/theme-mermaid": "^3.9.2", + "@iconify/react": "^6.0.2", + "@walkeros/collector": "0.4.1", + "@walkeros/core": "0.4.1", + "@walkeros/explorer": "^0.3.1", + "@walkeros/walker.js": "0.4.1", + "@walkeros/web-destination-api": "0.4.1", + "@walkeros/web-destination-gtag": "0.4.1", + "@walkeros/web-destination-meta": "0.4.1", + "@walkeros/web-destination-piwikpro": "0.4.1", + "@walkeros/web-destination-plausible": "0.4.1", + "@walkeros/web-source-browser": "0.4.1", "css-loader": "^7.1.2", "prism-react-renderer": "^2.4.1", - "react": "^19.1.0", - "react-dom": "^19.1.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", "react-simple-code-editor": "^0.14.1", - "sass": "^1.86.3", - "sass-loader": "^16.0.5", + "sass": "^1.94.2", + "sass-loader": "^16.0.6", "style-loader": "^4.0.0", - "tailwind-merge": "^2.5.5" + "tailwind-merge": "^3.4.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.7.0", - "@docusaurus/tsconfig": "^3.7.0", - "@docusaurus/types": "^3.7.0", + "@docusaurus/module-type-aliases": "^3.9.2", + "@docusaurus/tsconfig": "^3.9.2", + "@docusaurus/types": "^3.9.2", "@heroicons/react": "^2.2.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/postcss": "^4.1.6", - "@tailwindcss/typography": "^0.5.16", - "autoprefixer": "^10.4.21", + "@tailwindcss/postcss": "^4.1.17", + "@tailwindcss/typography": "^0.5.19", + "autoprefixer": "^10.4.22", "clsx": "^2.1.1", - "daisyui": "^5.0.35", - "postcss": "^8.5.3", - "prettier": "^3.5.3", + "daisyui": "^5.5.5", + "postcss": "^8.5.6", + "prettier": "^3.6.2", "remark-cli": "^12.0.1", "remark-mdx": "^3.1.1", "remark-preset-lint-consistent": "^6.0.1", "remark-preset-lint-recommended": "^7.0.1", - "tailwindcss": "^4.1.6", - "typescript": "~5.8.3" + "tailwindcss": "^4.1.17", + "typescript": "~5.9.3" }, "browserslist": { "production": [ diff --git a/website/sidebars.ts b/website/sidebars.ts index 6bc5a2505..68921ac5d 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -103,7 +103,7 @@ const sidebars: SidebarsConfig = { type: 'doc', id: 'apps/index', }, - items: ['apps/walkerjs'], + items: ['apps/walkerjs', 'apps/cli', 'apps/docker'], }, { type: 'category',